agent-authoring-guide
Skill1 starsChanged 13 days agoMITView on GitHub
Use when writing or editing an agent file, a skill, AGENTS.md, or any document agents are pointed at, including when adding a new domain expert, for the schema and the writing rules that make agents behave predictably.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- project-skeleton/AGENTS.mdAGENTS.md
- adversarial-attackSkill
- docs-writingSkill
- glossary-and-decisionsSkill
- handoffSkill
- independent-reviewSkill
- performance-reviewSkill
- process-retrospectiveSkill
- pull-request-evidenceSkill
- release-processSkill
- requirements-interviewSkill
- resume-sessionSkill
- slice-into-tasksSkill
- systematic-debuggingSkill
- test-driven-slicesSkill
- threat-checkSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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 29
One home per fact: If two files say the same thing, one of them will go stale.
- Distinctive: line 33
Cut no-ops: If deleting a sentence doesn't change behaviour when you test the file, delete it.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent authoring guide
Files and their jobs
| File | Loaded | Keep it |
AGENTS.md | every session, every agent | short: a start/end routine, ground rules, and pointers |
agents/**.md | when that role is active | one role: mission, inputs, steps, boundaries |
skills/*/SKILL.md | when a role lists it, or a tool matches its description | one procedure, with completion criteria |
CODING_STANDARDS.md | at review only | detailed judgement rules |
| docs, checklists | on demand, through a pointer | reference material |
Agent frontmatter follows agents/_schema.md. Skill frontmatter is name (the folder name)
plus description: one sentence starting "Use when…", naming the situations that should
trigger it.
Writing rules
- Every step ends with "Done when:" followed by a condition someone else could check. Vague endings ("review carefully") lead to stopping early.
- Say what to do, rather than what not to do. Prohibitions can prime the very behaviour they forbid. Keep a "never" only for a hard guardrail, and pair it with the alternative ("Locked tests change only through test-designer. If one looks wrong, explain it in the handoff").
- Point to material, don't paste it. A pointer says what the material is and when to read it. Inline only what every path through the procedure needs.
- One home per fact. If two files say the same thing, one of them will go stale.
- Don't restate the discoverable. Directory layouts, scripts and config can be read directly. Document what can't be: conventions, reasons, and traps.
- Use established terms ("red", "seam", "frontier", "one-way door") and define new ones once, in the glossary.
- Cut no-ops. If deleting a sentence doesn't change behaviour when you test the file, delete it.
- Steps for sequences, tables for reference. Split a file when later steps tempt agents to rush earlier ones, or when it serves two unrelated situations.
Adding a domain expert
- Copy
agents/domains/_template/toagents/domains/<id>/. - In
agent.md, fill intrigger_keywordsandtrigger_paths(how the orchestrator finds you) andconsulted_by(which roles ask you questions), then the mission and procedure: what you check, and how you answer a consult. - In
checklist.md, write the domain's review checklist. Reviewers and the adversary read it. - In
gates.toml(optional), add deterministic checks in gate-profile format. Put scripts inchecks/. - In
skills/<name>/SKILL.md(optional), add domain procedures. - Enable it per project (
--domains <id>, ordomainsin.agentic/config.toml), then runinstall --update. Done when:adapters/build.pylists the agent in REGISTRY.md, and a consult on a sample task produces a useful answer.
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.

