Why this matters
Without context, agents guess. They might runnpm test when your project uses yarn test. They might create a branch called feature/new-thing when your team uses initials/issue-description. They might put a component in the wrong directory.
With an AGENTS.md file:
- Agents follow your conventions: They know your branch naming, commit message format, and code style.
- Agents run the right commands: They know how to test, build, lint, and deploy your project.
- Agents understand your architecture: They know where to put new code and which patterns to follow.
An industry standard
AGENTS.md is an open standard for guiding AI coding agents, now stewarded by the Linux Foundation. It works across the ecosystem:- OpenAI Codex
- Google Jules
- Cursor
- Claude Code
- Factory, Aider, Zed, and more
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
See it working
Once you’ve added AGENTS.md, start a conversation with Ona Agent and ask it to make a change. You’ll see it:- Reference your conventions when writing code
- Run the correct commands from your Commands section
- Put files in the right places based on your Project Structure
Skills for repository-specific workflows
Agent Skills areSKILL.md files that live in your repository. Use them for multi-step procedures specific to a codebase - deployment workflows, migration patterns, or project-specific review checklists.
For organization-wide workflows that apply across all projects, use slash commands instead.
Place skills in .ona/skills/ or .claude/skills/:
Example: create-pr
Example: create-pr
Example: sentry-triage
Example: sentry-triage
Example: sentry-fix
Example: sentry-fix
Next steps
- Create slash commands for organization-wide workflows
- Set up your first environment so agents have a reliable run loop
- Learn more at agents.md