sync-agents
Skill1 starsChanged 4 months agoMITView on GitHub
Use when the user asks to create or update an AGENTS.md file, or when setting up agent context for a project. Generates a concise onboarding document for AI agents working in a codebase.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-browserSkill
- analyze-issueSkill
- brainstormSkill
- code-reviewSkill
- debuggingSkill
- executeSkill
- find-skillsSkill
- frontend-designSkill
- gather-contextSkill
- obsidianSkill
- planSkill
- specSkill
- sync-docsSkill
- testingSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
If an agent can figure it out by reading a file, don't put it in AGENTS.md.
- Distinctive: line 89
No duplication: If it's in another doc, link to it.
- Distinctive: line 94
Omit empty sections: If there are no gotchas, don't include the heading.
- Distinctive: line 98
Read existing AGENTS.md if present
- Distinctive: line 100
Update only sections that drifted — don't rewrite the whole file
- Distinctive: line 102
Wait for approval before saving
- Distinctive: line 106
Read the existing file
- Distinctive: line 108
Update only what drifted — add new patterns/gotchas, remove stale ones, update commands if scripts changed
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Sync Agents
Overview
Generate or update AGENTS.md — a concise onboarding file that gives AI agents
the minimum context needed to work effectively. The agent has tools to
explore the codebase — AGENTS.md should only contain what those tools can't
easily discover: conventions, gotchas, architectural decisions, and process.
Announce at start: "Using sync-agents skill to update AGENTS.md."
Core Principle
AGENTS.md is not documentation. It's a cheat sheet for things that are non-obvious, counter-intuitive, or expensive to discover by reading code. If an agent can figure it out by reading a file, don't put it in AGENTS.md.
What NOT to include
- Module structure listings — agents can use
gather-context, glob, and directory reads to discover files. Listing every file wastes context tokens. - Full API route catalogs — agents can grep for route definitions.
- Database schema tables — agents can read the schema file.
- Things already in other docs — link to them, don't duplicate them.
- Obvious conventions — "use TypeScript" when every file is
.tsis noise. - README content — AGENTS.md is not a README.
What TO include
- One-line project description + architecture
- Repo layout (top-level dirs only, one word each)
- Commands (dev, build, test, lint, typecheck)
- Pre-commit gate
- Tech stack table (only non-obvious choices or specific versions that matter)
- Key architectural patterns — things an agent would get wrong if it guessed
- Known gotchas — things that look wrong but are correct, or correct but break things
- Conventions and non-negotiables — rules that differ from standard practice
- Links to docs — one section pointing at SPEC.md, TODO.md, etc.
Template
# {ProjectName} — Agent Context
{One paragraph: what it does, what stack, what architecture.}
## Repo layout
{Top-level dirs only. No nested trees. No file-level descriptions.}
## Commands
{Only the commands an agent needs to run. Group by purpose.}
The pre-commit gate is: {commands}. All must pass before committing.
## Tech stack
| Layer | Choice |
|---|---|
{Only layers where the choice matters or is non-obvious.}
## Key architectural patterns
{2-4 patterns max. Only things that are non-obvious or easy to get wrong.
Each pattern: name + 2-3 sentences.}
## Known gotchas
{Only things an agent would break or "fix" incorrectly.}
## Further reading
- **`docs/{file}`** — {what it covers}Writing Rules
- No hard line limit, but keep it tight. Known gotchas and architectural patterns will grow naturally — that's fine. The enemy is filler: module listings, duplicated content, obvious conventions. Cut those ruthlessly.
- No module structure listings. Agents have
gather-context, glob, and directory reads for that. - No duplication. If it's in another doc, link to it.
- Gotchas are specific and rare. "tldraw v4:
createTLStore()with no args" not "be careful with libraries." - Patterns explain why, not what. "readOnly arrives via stateless message in the connected hook, not onAuthenticated" not "there's a readOnly system."
- Omit empty sections. If there are no gotchas, don't include the heading.
Process
- Read existing
AGENTS.mdif present - Scan codebase for what changed (commands, deps, patterns, gotchas)
- Update only sections that drifted — don't rewrite the whole file
- Present a diff summary to the user
- Wait for approval before saving
Updating an Existing AGENTS.md
- Read the existing file
- Compare against current codebase state
- Update only what drifted — add new patterns/gotchas, remove stale ones, update commands if scripts changed
- Trim any sections that violate the rules above (module listings, duplication)
- Present diff summary: "Updating 3 sections: Commands (added
db:migrate), Tech stack (added Stripe), Gotchas (added webhook ordering). Removed server module listing (agent can discover it)." - Wait for approval before saving
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.

