Update README.md and AGENTS.md files to reflect the current state of the codebase (skills, structure, conventions).
Update documentation to reflect the current state of the codebase.
Parse the user's input after /update-docs:
| Input | Action |
|---|---|
| (none) | Update everything |
readme | Only README.md files |
agents | Only AGENTS.md files |
<path> | Only that app/package (e.g., apps/bot) |
Examples:
/update-docs → all docs
/update-docs readme → only READMEs
/update-docs agents → only AGENTS.md
/update-docs apps/bot → only apps/bot/
/update-docs readme apps/bot → only apps/bot/README.md
Audience: Users, potential contributors, people browsing GitHub
Content:
Tone: Marketing + onboarding. Clear, concise, inviting.
Audience: Claude Code, Cursor, Copilot, any AI coding assistant
Content:
Tone: Technical, precise, actionable. Like a senior dev explaining the codebase.
Concepts (manual, stable):
Lists (auto-generated):
Dynamic lists should either be:
# Users can always discover:
ls agents/ # What agents exist
ls .claude/skills/ # What skills exist
Never manually maintain lists. They will drift.
Parse arguments to determine what to update:
readme → only README.mdagents → only AGENTS.mdUse Glob to discover files:
Glob("apps/*/skills/*/SKILL.md")Glob("agents/*.md")Glob("packages/vercel/src/tools/*")<!-- auto:skills --> markers## Updated
- apps/bot/README.md - 1 skill
- apps/dev/README.md - 16 skills
- apps/dev/AGENTS.md - structure refreshed
## Skipped
- apps/design/ - no changes detected
Use HTML comments for auto-generated sections:
<!-- auto:skills -->
| Skill | Description |
...
<!-- /auto:skills -->
<!-- auto:structure -->
apps/bot/ ├── app/api/ ...
<!-- /auto:structure -->
When creating a new AGENTS.md, use this structure:
# {app-name}
{One-line description of what this app does}
## Structure
<!-- auto:structure -->
{generated tree}
<!-- /auto:structure -->
## Conventions
- {where handlers go}
- {where utilities go}
- {naming patterns}
## Adding a new {primary-thing}
1. {step}
2. {step}
3. {step}
## What NOT to do
- {anti-pattern}
- {anti-pattern}