npm test when your project uses yarn test, or put a component in the wrong directory. AGENTS.md teaches them your conventions, commands, and architecture so they produce code that fits your project.
AGENTS.md is an open standard stewarded by the Linux Foundation, supported by Ona and other AI coding tools. Think of it as a README for agents — the tribal knowledge that senior engineers carry in their heads.
Create your AGENTS.md
Create anAGENTS.md file in your repository root:
Keep it concise
Shorter is better. As instruction count increases, instruction-following quality decreases. Aim for:- Under 300 lines - the recommended maximum
- Under 60 lines - ideal for most projects
What to include
Commands - The most important section. Tell agents exactly how to:- Run tests
- Build the project
- Start the dev server
- Lint and format code
- Key directories and their purpose
- Where to add new components or features
- Branch naming patterns
- Commit message format
- Code style rules
- Files that should never be committed
- Sensitive patterns to watch for
- Security-related commands to run
Make critical rules stand out
Agents pay attention to emphasis. For rules that must not be broken:Use nested files for large projects
For monorepos or large codebases, you can place AGENTS.md files in subdirectories. Agents read the nearest file in the directory tree, so each package can have tailored instructions:Example
Skills for multi-step workflows
Agent Skills areSKILL.md files that live in your repository. For repeatable, multi-step procedures (deployment workflows, triage runbooks, PR checklists), use repository skills. The agent discovers and loads them automatically when a task matches.
For organization-wide workflows that apply across all projects, use organization skills.
Getting notified when an agent finishes
Enable the completion sound in Settings > Preferences to hear when a task completes. For webhook-style notifications, add an instruction to yourAGENTS.md that tells the agent to run a curl command after completing all work:
Next steps
- Create organization skills for organization-wide workflows
- Set up your first environment so agents have a reliable run loop
- Learn more at agents.md