agents-md
SKILL.md
AGENTS.md Creation & Refactoring
Create minimal, focused AGENTS.md files that use progressive disclosure.
Core Principles
- Instruction budget: LLMs can follow ~150-200 instructions consistently. Every token loads on every request.
- Progressive disclosure: Give agents only what they need now, point elsewhere for specifics.
- Avoid staleness: Don't document file paths—they change. Document capabilities and domain concepts.
What Belongs in Root AGENTS.md
Only these essentials:
- One-sentence project description (anchors agent decisions)
- Package manager (if not npm)
- Non-standard build/typecheck commands
Everything else goes elsewhere.
Refactoring Workflow
When refactoring an existing AGENTS.md:
- Find contradictions: Identify conflicting instructions, ask user which to keep
- Extract essentials: Pull out only what belongs at root level
- Group the rest: Organize into logical categories (TypeScript, testing, API design, etc.)
- Create file structure: Output minimal root + separate files with markdown links
- Flag for deletion: Remove instructions that are:
- Redundant (agent already knows)
- Too vague to be actionable
- Overly obvious ("write clean code")
Progressive Disclosure Patterns
Separate Files
# Root AGENTS.md
For TypeScript conventions, see docs/TYPESCRIPT.md
Nested Documentation
docs/
├── TYPESCRIPT.md → references TESTING.md
├── TESTING.md → references test runners
└── BUILD.md → references build config
Monorepo Structure
| Level | Content |
|---|---|
| Root | Monorepo purpose, navigation, shared tools |
| Package | Package purpose, tech stack, conventions |
Example Minimal AGENTS.md
React component library for accessible data visualization.
Uses pnpm workspaces.
## Conventions
- TypeScript: see docs/TYPESCRIPT.md
- Testing: see docs/TESTING.md
- API patterns: see docs/API.md
Anti-Patterns to Fix
- Auto-generated files: Bloated with "useful for most scenarios" content
- File path documentation: Goes stale quickly, poisons context
- Accumulated rules: "Ball of mud" from months of one-off additions
- Forcing language: Excessive "ALWAYS", "NEVER", all-caps directives
- Obvious instructions: Things the model already knows
Creation Workflow
When creating a new AGENTS.md:
- Ask user for one-sentence project description
- Identify package manager (default npm needs no mention)
- Check for non-standard build/typecheck commands
- Keep it under 10 lines if possible
- Create separate docs/ files for domain-specific guidance
Weekly Installs
9
Repository
sebastiaanwoute…otagentsGitHub Stars
1
First Seen
Jan 24, 2026
Security Audits
Installed on
claude-code6
opencode5
gemini-cli5
github-copilot5
codex5
amp4