agent-conduct
Skill1 starsChanged 40 days agoMITView on GitHub
Mandatory safety rules for all agents. Read before starting any work.
- Deletes or force-pushes
- Commits and pushes
5 other projects use a version of this.
Adopted by
Most recently taken up by
- github/squadtheir own version, first seen Nov 8, 2026
- MarioJames/skill-foundrytheir own version, first seen Nov 1, 2026
- microsoft/github-vteam-industry-demostheir own version, first seen Oct 25, 2026
- github/gh-awtheir own version, first seen May 27, 2026
- Azure/apiops-clitheir own version, first seen Apr 27, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- github/gh-aw★ 5.6ksame name
- github/squad★ 3.4ksame name
- Azure/apiops-cli★ 32same name
- microsoft/github-vteam-industry-demos★ 2same name
- MarioJames/skill-foundry★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- bugfixSkill
- code-smellsSkill
- deliverSkill
- final-responseSkill
- frontend-designSkill
- go-conventionsSkill
- go-implementorSkill
- go-reviewerSkill
- go-test-strengthSkill
- implementation-principlesSkill
- nextflow-conventionsSkill
- nextflow-implementorSkill
- nextflow-reviewerSkill
- nextjs-fastapi-conventionsSkill
- nextjs-fastapi-implementorSkill
- nextjs-fastapi-reviewerSkill
- orchestratorSkill
- phase-creatorSkill
- phase-reviewerSkill
- prose-principlesSkill
- pr-resolverSkill
- pr-reviewerSkill
- python-conventionsSkill
- python-implementorSkill
- python-reviewerSkill
- spec-authorSkill
- spec-proofreaderSkill
- spec-reviewerSkill
- spec-writerSkill
- subagentsSkill
- swift-conventionsSkill
- swift-implementorSkill
- swift-reviewerSkill
- testing-principlesSkill
- tightenSkill
- unslopSkill
- verificationSkill
- writing-for-agentsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. 0 are common, 18 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
18
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 12
Write only inside the repository, a designated Git worktree of the same repository, or a harness-provided scratchpad/temp directory.
- Very specific: line 16
Before any file-writing command, confirm the target is within one of those locations.
- Distinctive: line 23
Create new PR branches from the freshly fetched base, from the main clone:
- Very specific: line 29
Use a short topic and eight random hex digits.
- Distinctive: line 41
Remove a merged PR worktree through post-merge cleanup, never when a worker finishes.
- Distinctive: line 58
Only their throwaway files and edits are authorized for discard.
- Very specific: line 62
Use language-appropriate test temp dirs (t.TempDir(), tmp_path, etc.).
- Very specific: line 63
If a temp file is truly needed, prefer the harness-provided scratchpad directory.
- Very specific: line 65
Put every new source file in an existing package.
- Distinctive: line 70
Avoid triggering VS Code modal confirmation prompts:
- Very specific: line 72
No interactive commands (ssh, less, vi).
- Distinctive: line 74
No port-listening processes without background mode.
- Very specific: line 78
NEVER push to master, main, or develop branches, including normal and force pushes.
- Very specific: line 82
Keep the task's feature branch rebased on the latest remote develop, unless the caller or PR specifies another base.
- Very specific: line 92
After those gates pass, push the rebased feature branch with --force-with-lease.
- Very specific: line 97
Verify the remote feature-branch tip before rebasing and use it as the explicit expected SHA in the lease.
- Distinctive: line 100
Do not push other branches unless the user asks or the task is working on a PR and a push is needed to update the PR, rerun checks, or …
- Very specific: line 103
Do NOT modify .git/ internals.
- Very specific: line 104
Use targeted git add <file> over git add ..
- Distinctive: line 105
Before deleting a clone, worktree, or local branch, inspect the work that deletion puts at risk.
- Distinctive: line 108
Check at-risk uncommitted changes, untracked/ignored files, and stashes.
- Distinctive: line 109
Every at-risk commit or file must be verified preserved outside the deletion scope, verified integrated, or explicitly authorized for …
- Distinctive: line 116
After the hosting service confirms a task PR merged, apply post-merge cleanup.
- Distinctive: line 124
Do NOT install system packages.
- Distinctive: line 125
Do NOT modify files outside the current task's scope.
- Distinctive: line 131
When a distinct issue appears during implementation, review, or verification, read bugfix routing.
- Distinctive: line 143
Never paper over, work around, or hallucinate results to satisfy a request that is blocked by an outside constraint (e.g.
- Distinctive: line 149
If you hit such a blocker:
- Distinctive: line 151
Stop work on the affected task immediately.
- Distinctive: line 152
Do NOT write code that fakes the capability, returns mock values to make tests pass, silently narrows scope, or pretends success.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Conduct
These rules apply to ALL agents regardless of skill.
Workspace Boundary
- Write only inside the repository, a designated Git worktree of the same
repository, or a harness-provided scratchpad/temp directory. Actual harness
restrictions still apply; this rule grants no extra filesystem access.
Redirecting command output to
/dev/nullis fine. - Before any file-writing command, confirm the target is within one of those
locations. Create worktrees with normal Git commands, not clones or edits
to
.git/internals. - For PR branch work, the workflow owner creates one shared worktree before the first worker starts. Reuse it for implementor commits, reviewer reads, local gates, pushes, pr-resolver fixes, and rebases. Workers never create their own worktree for that branch; resume in the recorded worktree.
Create new PR branches from the freshly fetched base, from the main clone:
git fetch origin && git worktree add --no-track -b <topic>-<8 hex> ../<repo>-<topic> origin/<base>Use a short topic and eight random hex digits. Keep the worktree beside the main clone, never inside a clone. For an existing branch, reuse its worktree or attach that branch without
-b. Dependent branches use the recorded SHA under routing.- Reserve harness per-agent worktrees for throwaway experiments whose results are reported back, not retained as PR branches.
- Give every worker the worktree's absolute path and require branch work only there. Reviewers leave it unchanged; mutants and experiments belong in a scratch copy or scratchpad.
- Record the branch and worktree path in its branch-owned checklist's queue entry. In committed records, make the path relative to the main clone.
- Remove a merged PR worktree through post-merge cleanup, never when a worker finishes. Keep unmerged worktrees and branches until the user or caller authorizes deletion, then apply the Git Safety deletion checks.
Scratch Copies
A scratch copy is a temporary detached worktree in a scratchpad/temp directory:
git worktree add --detach <scratchpad-or-tmp path> <sha>Include the branch's topic or checklist ID in the scratch copy's path.
Workers may create these for read-only checks or throwaway edits (mutants,
bisects, base comparisons). Never commit in them. Before reporting back,
apply the Git Safety deletion checks, then git worktree remove --force <path>.
Only their throwaway files and edits are authorized for discard.
Scratch Work
- Use language-appropriate test temp dirs (
t.TempDir(),tmp_path, etc.). - If a temp file is truly needed, prefer the harness-provided scratchpad
directory; otherwise use
.tmp/agent/in the repo and clean up. - Put every new source file in an existing package. A stray
.goor.pyoutside one confuses tooling.
Terminal Safety
Avoid triggering VS Code modal confirmation prompts:
- No interactive commands (
ssh,less,vi). Usegit --no-pager, etc. - No
sudo. No broadrm -rf. - No port-listening processes without background mode.
Git Safety
- NEVER push to
master,main, ordevelopbranches, including normal and force pushes. Check the destination ref, not just the checked-out branch. - On the first authorized push, set the feature branch's own upstream with
git push -u <remote> <branch>. - Keep the task's feature branch rebased on the latest remote
develop, unless the caller or PR specifies another base. If remotedevelopis confirmed absent, resolve the configured remote's default branch instead. A failed fetch is a blocker, not evidence that a branch is absent. Retain the resolved base throughout the task. Deferred branches with an unmerged dependency follow the base transition and publication hold in routing. Fetch before checking whether it is current. When that base has advanced, rebase onto it instead of merging it into the feature branch. Resolve conflicts and rerun the applicable quality gates on the rebased result. - After those gates pass, push the rebased feature branch with
--force-with-lease. The user gives standing authorization for this; no separate request or confirmation is needed. Deferred branches held for recording or dependency merge remain local under bugfix routing. Verify the remote feature-branch tip before rebasing and use it as the explicit expected SHA in the lease. If the lease fails, inspect and reconcile the intervening work before retrying; never use plain--force. - Do not push other branches unless the user asks or the task is working on a PR and a push is needed to update the PR, rerun checks, or request review, or the push applies the standing rebase authorization above.
- Do NOT modify
.git/internals. - Use targeted
git add <file>overgit add .. - Before deleting a clone, worktree, or local branch, inspect the work that
deletion puts at risk. For a clone, check all local branches with
git log --branches --not --remotesand inspect detached HEADs too. Check at-risk uncommitted changes, untracked/ignored files, and stashes. Every at-risk commit or file must be verified preserved outside the deletion scope, verified integrated, or explicitly authorized for discard. For squash merges, verify the merged PR head and resulting integration diff; account for commits beyond that head too. Linked worktrees share branches and stashes; unrelated surviving work need not be cleaned. Report what was checked and how at-risk work was accounted for. Retain unaccounted-for work. These checks do not authorize deletion. - After the hosting service confirms a task PR merged, apply post-merge cleanup. The user gives standing authorization to delete its verified local task branch, remove its clean disposable worktree, and prune stale remote-tracking refs without asking again. This does not authorize remote branch or clone deletion.
General
- Do NOT install system packages.
- Do NOT modify files outside the current task's scope.
- For heavy work on shared or quota-constrained machines, read shared resources.
Discovered Issues
When a distinct issue appears during implementation, review, or verification, read bugfix routing. Workers report the evidence to their caller before changing incidental code; the caller applies the routing rules. A directly invoked agent is its own caller.
Completion And Live Work
For delegated or background work, read completion and liveness.
Honesty About Blockers
Never paper over, work around, or hallucinate results to satisfy a request that is blocked by an outside constraint (e.g. a third-party API does not support the operation, required data is unavailable, the environment lacks needed capability, requirements contradict each other).
If you hit such a blocker:
- Stop work on the affected task immediately.
- Do NOT write code that fakes the capability, returns mock values to make tests pass, silently narrows scope, or pretends success.
- Revert partial changes that only exist to mask the blocker.
- Report to your caller: what was requested, what specifically makes it impossible, and 1-3 plausible alternatives or clarifications.
The orchestrating skill (bugfix, orchestrator, spec-writer) decides how to record and route the blocker - your job is to surface it cleanly, not to push past it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

