agents-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
More from sebastiaanwouters/dotagents
flyctl
Deploy and manage apps on Fly.io using flyctl CLI. Triggers on: fly deploy, fly.io, flyctl, deploy to fly. Handles launch, deploy, scale, secrets, volumes, databases.
79teacher
Guide learning and deep understanding through proven methodologies (Socratic, Feynman, Problem-Based). Use when user says "help me understand", "teach me", "explain this", "learn about", "socratic", "feynman", "problem-based", "I don't understand", "confused about", "why does", or wants to truly grasp a concept.
77chef
Telegram communication for AI agents. ALL methods are BLOCKING. Use for user interviews, status updates, and feedback collection.
34bitwarden
Retrieves API keys, passwords, secrets from Bitwarden vault using bw CLI. Triggers on missing env variables, missing API keys, missing secrets, "secret not found", "env not set", or "use bw".
29librarian
Use for code research that needs dependency internals, upstream implementation examples, or external prior art. Always delegate to a subagent that investigates with opensrc and web search, then return only distilled findings, versions, paths, and links.
29frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications. Generates creative, polished code that avoids generic AI aesthetics.
28