Skip to main content
Repository instructions are files in your repository that tell coding agents how to work in your project. Before a Cake agent works in a repository, it looks for these files, reads them, and follows them. Add repository instructions when you want every session to use the same conventions and commands. You don’t have to repeat them in each prompt.

Supported files

The agent looks for any of these files:
  • AGENTS.md at the repository root
  • AGENTS.md in the subdirectories the agent works in
  • CLAUDE.md
  • GEMINI.md
  • .github/copilot-instructions.md
If your repository already has instructions for another coding tool, Cake agents use them too.

How agents use instructions

  • The agent reads the instructions for every repository it works in. This includes repositories it clones or checks out during the session.
  • The guidelines, conventions, and commands in your instructions take precedence over the agent’s default guidance.
  • When the agent can’t find a lint or typecheck command, it asks you for one. It may then suggest adding that command to AGENTS.md so future sessions run it automatically.

Write an AGENTS.md file

  1. Create AGENTS.md at the root of your repository.
  2. Add the conventions and commands you want agents to follow.
  3. Commit the file to the branch your sessions use.
AGENTS.md
To give instructions that apply to one part of a monorepo, add another AGENTS.md in that subdirectory.