Create and maintain AGENTS.md files that provide AI coding agents with project context, commands, code style, and boundaries. Use when updating an existing AGENTS.md, creating a new AGENTS.md for a repository, or improving agent instructions for a codebase.
Resources
1Install
npx skillscat add adampoit/ai/agents-md Install via the SkillsCat registry.
Agents Md
AGENTS.md is a README for AI agents: a dedicated place to provide context and instructions to help AI coding agents work effectively on a project.
Workflow
- Check for existing file: Look for AGENTS.md at repository root
- If exists: Read and analyze for gaps or outdated information
- If missing: Gather project information to create one
- Update/Create: Write or improve the file following best practices
- Validate: Ensure all six core areas are covered
Core Areas to Cover
Every effective AGENTS.md addresses these six areas:
1. Commands
Put executable commands early. Include flags and options, not just tool names.
## Commands
- Install: `pnpm install`
- Dev: `pnpm dev`
- Test: `pnpm test --coverage`
- Build: `pnpm build`
- Lint: `pnpm lint --fix`2. Testing
Specify how to run tests and what's expected before commits.
## Testing
- Run `pnpm test` before commits
- Add tests for new functionality
- Fix failing tests before merging3. Project Structure
Describe what lives where. Help the agent navigate quickly.
## Structure
- `src/` - Application source code
- `tests/` - Unit and integration tests
- `docs/` - Documentation4. Code Style
Show examples over explanations. One code snippet beats three paragraphs.
## Code Style
- TypeScript strict mode
- Single quotes, no semicolons
- Functional patterns preferred5. Git Workflow
Describe commit conventions and PR expectations.
## Git
- Commit format: `type(scope): description`
- Run lint and test before commits
- PR title format: `[component] description`6. Boundaries
Tell agents what they should never touch. This prevents mistakes.
## Boundaries
- Never commit secrets or API keys
- Never modify `vendor/` or `node_modules/`
- Ask before changing database schemasUpdating an Existing AGENTS.md
When improving an existing file:
- Identify gaps: Check which of the 6 core areas are missing or weak
- Update outdated commands: Verify build/test commands still work
- Add specifics: Replace vague guidance with concrete examples
- Strengthen boundaries: Add any missing "never do" rules
- Keep it concise: Remove redundant or obvious information
Creating a New AGENTS.md
When creating from scratch:
- Explore the codebase: Check package.json, Makefile, or build configs for commands
- Identify the stack: Note languages, frameworks, and versions
- Find existing conventions: Look at recent commits, linting configs, existing docs
- Start minimal: Cover the 6 core areas briefly, then expand as needed
Monorepos and Nested Files
For monorepos, use nested AGENTS.md files in subprojects:
repo/
├── AGENTS.md (root - general guidance)
├── packages/
│ ├── api/
│ │ └── AGENTS.md (API-specific)
│ └── web/
│ └── AGENTS.md (web-specific)The closest AGENTS.md to the edited file takes precedence.
References
- Best practices and anti-patterns: See references/best-practices.md
- Real-world examples: See references/examples.md