AGENTS.md Skill
Create or update AGENTS.md to help LLM coding agents work effectively in this repository.
Purpose
AGENTS.md is repository-specific guidance for LLM agents. Unlike README (for humans), AGENTS.md focuses on:
- Exact commands with flags (
pytest -v not "run tests")
- Common gotchas with specifics ("Mock HOME needs both environ and Path.home patches")
- Task-to-file mapping ("Add CLI command → src/cli.py")
- Patterns with ✅/❌ code examples
Target audience: LLM agents starting fresh
Quality: Under 100 lines, actionable, specific
Location: Repository root only
Workflow
Step 1: Determine Mode
Check if AGENTS.md exists at repository root:
- CREATE: Generate new AGENTS.md from scratch
- UPDATE: Read existing file, add/update sections preserving user customizations
Step 2: Invoke prompt-engineer Skill
REQUIRED: Use Skill tool to invoke prompt-engineer skill.
Why: AGENTS.md is for LLM agents. Apply prompt engineering principles: explicit instructions, important info first (primacy bias), specific over vague, examples over explanations.
Step 3: Systematic Exploration
Explore repository to gather content for AGENTS.md sections:
PRIORITY 1: Commands (document first)
- Check Makefile (
make help), Justfile (just --list), package.json (scripts)
- Read README.md Getting Started section
- Check CI config (.github/workflows/) for canonical commands
- Document: setup, build, run, test (full + file), lint, format
PRIORITY 2: Common Gotchas (high value)
- Search for comments with "NOTE:", "WARNING:", "FIXME:", "HACK:"
- Read existing AGENTS.md/CLAUDE.md if present
- Complex setup requirements (env vars, external services)
- Version-specific issues
Additional discovery:
- Project identity: name, description, type (library/CLI/webapp)
- Project structure: source, tests, config directories
- Tech stack: language+version, framework+version, key libraries
- Key patterns: architecture (MVC/components), naming conventions
- Testing: framework, locations, commands
- Key files by task: map tasks to specific files
Step 4: Write or Update AGENTS.md
Generate AGENTS.md using this structure (see references/templates.md for full template):
Sections (in order):
- Quick Commands - Most important, goes first
- Project Structure - Directory tree with annotations
- Tech Stack - Versions and key libraries
- Key Patterns - ✅/❌ code examples required
- Testing - Commands and structure
- Common Gotchas - Specific, numbered list
- Key Files by Task - Task-to-file mapping table
Quality standards:
- Under 100 lines (60 ideal, complex repos up to 100)
- Specific: Include versions ("React 18"), exact commands, actual paths
- Examples over prose
- Commands first (most used)
- No sensitive info (no API keys, credentials, tokens)
Step 5: File Operations
CREATE mode:
- Generate complete AGENTS.md
- Write to
{git_root}/AGENTS.md
- Validate: <100 lines, commands first, all sections, no secrets
- Report: path, line count, key sections
UPDATE mode:
- Compare existing vs new findings
- Preserve user customizations
- Add new findings, update outdated info
- Use Edit tool for precise changes
- Report: what was added/updated
Post-Implementation Checklist
After implementing features, check if AGENTS.md needs updating:
Add when:
Examples:
- Implement new CLI command → Add to "Quick Commands" + "Key Files by Task"
- Discover HOME mocking issue → Add to "Common Gotchas"
- Establish naming convention → Add to "Key Patterns" with ✅/❌ examples
- Add new test fixture pattern → Update "Testing" section
Boundaries
✅ Always:
- Read actual files (don't guess)
- Run commands to verify (
make help, just --list)
- Include ✅/❌ code examples for patterns
- Preserve user customizations in UPDATE mode
⚠️ Ask first:
- Major restructuring of existing AGENTS.md
- Removing user-added content
🚫 Never:
- Include sensitive info (API keys, credentials, tokens)
- Write AGENTS.md to subdirectories (root only)
- Duplicate content already in README
- Add generic advice ("write good code")
Tips
- Commands most important - Put first, use exact syntax with flags
- Gotchas are high-value - Specific details beat vague warnings
- Examples beat prose -
user_email = get_email() not "get the email"
- Focus on what's NOT in README - Assume agents read README first
- Update mode: merge, don't replace - Preserve user customizations
See references/templates.md for the complete AGENTS.md structure template.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: agents-md-63description: This skill should be used when the user asks to 'create AGENTS.md', 'update AGENTS.md', 'add to AGENTS.md', 'document the repo', 'write repo documentation', 'create repository guide', 'document patterns', 'document conventions', 'add coding guidelines', or after implementing features to document new patterns, conventions, commands, or gotchas that should be added to AGENTS.md. Also triggers when noticing undocumented patterns, repeated gotchas, or missing workflow documentation. Use when this capability is needed.4---56# AGENTS.md Skill78Create or update AGENTS.md to help LLM coding agents work effectively in this repository.910## Purpose1112AGENTS.md is repository-specific guidance for LLM agents. Unlike README (for humans), AGENTS.md focuses on:13- Exact commands with flags (`pytest -v` not "run tests")14- Common gotchas with specifics ("Mock HOME needs both environ and Path.home patches")15- Task-to-file mapping ("Add CLI command → src/cli.py")16- Patterns with ✅/❌ code examples1718**Target audience:** LLM agents starting fresh19**Quality:** Under 100 lines, actionable, specific20**Location:** Repository root only2122## Workflow2324### Step 1: Determine Mode2526Check if `AGENTS.md` exists at repository root:27- **CREATE:** Generate new AGENTS.md from scratch28- **UPDATE:** Read existing file, add/update sections preserving user customizations2930### Step 2: Invoke prompt-engineer Skill3132**REQUIRED:** Use Skill tool to invoke `prompt-engineer` skill.3334**Why:** AGENTS.md is for LLM agents. Apply prompt engineering principles: explicit instructions, important info first (primacy bias), specific over vague, examples over explanations.3536### Step 3: Systematic Exploration3738Explore repository to gather content for AGENTS.md sections:3940**PRIORITY 1: Commands (document first)**41- Check Makefile (`make help`), Justfile (`just --list`), package.json (scripts)42- Read README.md Getting Started section43- Check CI config (.github/workflows/) for canonical commands44- Document: setup, build, run, test (full + file), lint, format4546**PRIORITY 2: Common Gotchas (high value)**47- Search for comments with "NOTE:", "WARNING:", "FIXME:", "HACK:"48- Read existing AGENTS.md/CLAUDE.md if present49- Complex setup requirements (env vars, external services)50- Version-specific issues5152**Additional discovery:**53- Project identity: name, description, type (library/CLI/webapp)54- Project structure: source, tests, config directories55- Tech stack: language+version, framework+version, key libraries56- Key patterns: architecture (MVC/components), naming conventions57- Testing: framework, locations, commands58- Key files by task: map tasks to specific files5960### Step 4: Write or Update AGENTS.md6162Generate AGENTS.md using this structure (see `references/templates.md` for full template):6364**Sections (in order):**651. **Quick Commands** - Most important, goes first662. **Project Structure** - Directory tree with annotations673. **Tech Stack** - Versions and key libraries684. **Key Patterns** - ✅/❌ code examples required695. **Testing** - Commands and structure706. **Common Gotchas** - Specific, numbered list717. **Key Files by Task** - Task-to-file mapping table7273**Quality standards:**74- Under 100 lines (60 ideal, complex repos up to 100)75- Specific: Include versions ("React 18"), exact commands, actual paths76- Examples over prose77- Commands first (most used)78- No sensitive info (no API keys, credentials, tokens)7980### Step 5: File Operations8182**CREATE mode:**831. Generate complete AGENTS.md842. Write to `{git_root}/AGENTS.md`853. Validate: <100 lines, commands first, all sections, no secrets864. Report: path, line count, key sections8788**UPDATE mode:**891. Compare existing vs new findings902. Preserve user customizations913. Add new findings, update outdated info924. Use Edit tool for precise changes935. Report: what was added/updated9495## Post-Implementation Checklist9697After implementing features, check if AGENTS.md needs updating:9899**Add when:**100- [ ] New commands added (make/just targets, npm scripts)101- [ ] New patterns established (new base class, convention)102- [ ] Gotcha discovered (environment setup, mocking, timing)103- [ ] Task-to-file mapping changed (new entry points)104- [ ] Tech stack updated (new framework version, library added)105106**Examples:**107- Implement new CLI command → Add to "Quick Commands" + "Key Files by Task"108- Discover HOME mocking issue → Add to "Common Gotchas"109- Establish naming convention → Add to "Key Patterns" with ✅/❌ examples110- Add new test fixture pattern → Update "Testing" section111112## Boundaries113114**✅ Always:**115- Read actual files (don't guess)116- Run commands to verify (`make help`, `just --list`)117- Include ✅/❌ code examples for patterns118- Preserve user customizations in UPDATE mode119120**⚠️ Ask first:**121- Major restructuring of existing AGENTS.md122- Removing user-added content123124**🚫 Never:**125- Include sensitive info (API keys, credentials, tokens)126- Write AGENTS.md to subdirectories (root only)127- Duplicate content already in README128- Add generic advice ("write good code")129130## Tips131132- **Commands most important** - Put first, use exact syntax with flags133- **Gotchas are high-value** - Specific details beat vague warnings134- **Examples beat prose** - `user_email = get_email()` not "get the email"135- **Focus on what's NOT in README** - Assume agents read README first136- **Update mode: merge, don't replace** - Preserve user customizations137138See `references/templates.md` for the complete AGENTS.md structure template.139140---141> Converted and distributed by [TomeVault](https://tomevault.io/claim/wpfleger96) — claim your Tome and manage your conversions.142<!-- tomevault:4.0:skill_md:2026-04-11 -->