agent-instructions
Skill1 starsChanged 50 days agoMITView on GitHub
Create, audit, shrink or restructure an AGENTS.md instruction file. Use when writing a repository's AGENTS.md, auditing one for stale or oversized guidance, deciding what belongs in persistent instructions versus a skill, a document or a lint rule, or migrating instruction files between agent harnesses. Not for editing ordinary project documentation.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- devantler-tech/agent-skillstheir own version, first seen Oct 31, 2026
- The-Vibe-Company/companion-skillstheir own version, first seen Oct 20, 2026
- LuisUrrutia/skillstheir own version, first seen Oct 18, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Oct 13, 2026
- krema/agent-skillstheir own version, first seen Oct 13, 2026
- EpicenterHQ/epicentertheir own version, first seen Oct 8, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- EpicenterHQ/epicenter★ 4.8ksame name
- murphytrueman/design-system-ops★ 197same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- devantler-tech/agent-skills★ 3same name
- LuisUrrutia/skills★ 2same name
- The-Vibe-Company/companion-skills★ 1same name
- chinthakat/agent-skills★ 0same name
- juancamiloqhz/skills★ 0same name
- krema/agent-skills★ 0same 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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-orchestrationSkill
- backlog-maintenanceSkill
- estimate-timeSkill
- fabSkill
- independent-reviewSkill
- memory-hygieneSkill
- open-project-terminalSkill
- project-docsSkill
- testingSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Not for editing ordinary project documentation — a README, an ARCHITECTURE.md, an ADR — unless the question in front of you is specifically …
- Distinctive: line 28
Ask in this order and stop at the first yes:
- Distinctive: line 43
Do not weaken a rule that prevents a real safety or correctness failure merely because it costs tokens.
- Distinctive: line 51
Verify commands before documenting them: Run the terminating, read-only form — build, test, lint, single-test — and record what it actually …
- Distinctive: line 106
Every command verified versus every command inferred, called out separately.
- Distinctive: line 108
Before and after size (lines, words, bytes) for create, audit and shrink modes.
“Common” is measured: kept by at least 6 in 10 of the 9 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 instructions
An instruction file is configuration the agent obeys with full confidence, not documentation a human skims. A stale command in it is followed to the letter; an oversized one dilutes every rule in it on every task. This skill covers the whole lifecycle: writing one, checking one's health, cutting one down, and deciding where a given rule actually belongs.
Task classification
| Signal | Mode | Reference |
| The repository has no instruction file, or what exists is a stub that doesn't cover the sections below | Create | references/patterns.md |
| A file exists and needs a health check — stale commands or paths, drift from the repo, missing coverage, unclear whether it earns its cost | Audit | references/audit.md |
| A file has grown into an encyclopedia and needs cutting down without losing what actually holds | Shrink | references/audit.md |
| A specific rule needs a home, independent of touching the file itself | Place | the test below |
Not for editing ordinary project documentation — a README, an ARCHITECTURE.md, an ADR — unless the question in front of you is specifically whether content belongs there instead of in the instruction file.
The placement test
Ask in this order and stop at the first yes:
| Question | Destination |
| Would its absence make a current frontier agent decide materially worse on most tasks? | The instruction file |
| Is it a recurring procedure with a sharp trigger, needed on a minority of tasks? | A skill |
| Is it detail only one mode of that skill needs? | That skill's references |
| Is it a fact about this project rather than a portable practice? | The project's code, config, an architecture doc, an ADR, a runbook |
| Can a script, linter, type checker, test or CI job decide it? | Tooling |
| None of the above | Nothing — leave it out |
The decisive framing: if this rule disappeared, would current agents get it wrong often enough to justify paying for it repeatedly? If no, delete it. If the answer is "only in one narrow situation," that is a skill or a reference, not a persistent rule.
Do not weaken a rule that prevents a real safety or correctness failure merely because it costs tokens. The two failure modes are not symmetric — an agent that skips a rule because it was cut for brevity fails the same way whether the rule was five words or fifty.
Invariants
These hold across all four modes.
- Verify commands before documenting them. Run the terminating, read-only form — build, test,
lint, single-test — and record what it actually printed. Never run what doesn't exit, can't be
undone, or rewrites tracked source (dev servers, migrations, deploys,
--fixlinters); use a bounded probe (--help,--dry-run, a list-only mode) instead, or mark the entry inferred and say so. Drop a command that fails unless it failed only for a missing local credential or service — then keep it and name the prerequisite inline. - A stale command or path is a defect, not cosmetic. The file is obeyed with full confidence, so wrong is worse than missing. Fix it in the same change that touches the section, or report it with file and line if fixing it is out of scope for the current task.
- Distinguish portable practice from a fact about this project. Test project specificity
against a different project, not a different agent: a rule that would still be true in a
different project belongs in a skill, not copied into this file; a rule that would stop being
true there is specific to this project and belongs here. Harness specificity is a separate axis
— a rule true of only one harness belongs in that harness's own narrower file
(
references/harness-loading.mdcovers where each harness looks), never duplicated into the shared root file, whether or not it is also project-specific. - The root file must be true for its entire scope. Nothing in it may hold for one subproject and not another; move what doesn't generalize into a nested file for the subtree it actually describes.
- Nested files exist only for a genuine scope difference, never as pagination. A nested file must be self-contained for its subtree, must never contradict the root, and the root holds only what is true everywhere. Splitting a file because it got long, rather than because two subtrees genuinely differ, produces files that don't stand alone and a root that stops being universally true.
- Never duplicate the README, the code, or another instruction file. Restating something readable elsewhere costs tokens on every task and goes stale the moment the source changes without the copy following. Link or point instead.
- Measure the file's real cost — don't guess it. Line count, word count and byte size are one
command away; use them, especially against the harness budgets in
references/harness-loading.md, rather than eyeballing whether a file "feels big." - Route by requirement, not by product. A routing entry states what must happen — a review, a
security pass — and prefers the harness's own capability where it fits, naming a portable skill
as the fallback. An entry that makes an installed skill "always win" over a native capability
denies the harness its own maintained tool; treat it as a defect. Skill precedence and name
collisions per harness are in
references/harness-loading.md.
Harness loading
Where an instruction file is discovered and how much of it survives varies by harness, and both
failure modes are silent: a file in the wrong location never loads, and a file past a harness's
byte budget gets truncated with no error the user sees. references/harness-loading.md has the
verified facts for the two harnesses this repository targets, marked clearly where something is
confirmed versus inferred — read it before creating an adapter, sizing a global file, or explaining
why a rule isn't being followed. Two facts to carry into every mode without opening the reference:
keep a global or user-scope file small because it is paid for on every task, and keep a
project or nested chain small because its cumulative size is subject to a budget (Codex's
project_doc_max_bytes) that truncates silently past it — indistinguishable, from the agent's
behavior, from a rule it chose to ignore.
Output contract
Whichever mode ran, report:
- What changed, section by section, and why — citing the placement test or the audit finding that drove it, not just "cleaned up."
- Every command verified versus every command inferred, called out separately. Never present an inferred command as verified.
- Before and after size (lines, words, bytes) for create, audit and shrink modes.
- For place mode: the destination the rule landed in and the one-line reason, quoting which row of the test matched.
- Any file this change makes an adapter necessary for, and whether that adapter was created — see
references/harness-loading.md. - Anything left unresolved and why: a command that couldn't be verified in this environment, a section whose placement is genuinely ambiguous, a nested file whose scope boundary needs the user's call.
References
references/harness-loading.md— where each targeted harness discovers an instruction file, what gates or truncates it, and how to confirm what actually loaded.references/audit.md— what to measure, how to detect staleness, and how to shrink a file that has grown past what it should carry.references/patterns.md— what a good instruction file contains, section by section, the anti-patterns that inflate one, how to write a nested file that survives on its own, and worked global, project and nested examples to calibrate scope and size against.
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.

