prompt logo

prompt

Free

Guide for AI agents to write AGENTS.md files

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About prompt

This is a specialized prompt from the ai-boost/awesome-prompts collection, designed for AI coding agents to author AGENTS.md files. AGENTS.md is a vendor-neutral Markdown file placed at the root of a code repository that tells AI coding agents across platforms (OpenAI Codex, Cursor, Aider, Google Jules, etc.) how to set up, build, test, and contribute to the project. The prompt provides detailed guidelines on file structure, when to use AGENTS.md vs CLAUDE.md, SKILL.md, or README.md, file location rules, and best practices for making instructions concise, accurate, executable, and safe. It emphasizes that AGENTS.md is loaded automatically as high-priority context by agent harnesses and should not duplicate human-facing content.

Key Features

Vendor-neutral AGENTS.md authoring instructions
Covers when to use AGENTS.md vs CLAUDE.md, SKILL.md, and README.md
Includes file location rules and nested AGENTS.md guidance
Emphasizes conciseness, accuracy, executability, and safety
Referenced by 20,000+ public repositories and multiple coding agents

Pros & Cons

Pros
  • Adopted by major coding agents (Codex, Cursor, Aider, etc.) for seamless integration
  • Reduces need for agents to rediscover project conventions each session
  • Clear guidelines avoid duplication with human-facing README.md
  • Vendor-neutral, backed by Agentic AI Foundation / Linux Foundation
Cons
  • Limited in scope to code repository setup and contribution instructions
  • Requires knowledge of Markdown and typical project structures to apply effectively
  • May need updates as AI agent tooling evolves

Best For

Adding AI agent instructions to a new or existing code repositoryStandardizing build, test, and lint commands across multiple AI coding agentsReplacing or supplementing CLAUDE.md with a vendor-neutral alternativeDocumenting safe commit and contribution practices for automated agents

FAQ

What is AGENTS.md?
AGENTS.md is a Markdown file placed at the root of a code repository that tells AI coding agents how to set up, build, test, and contribute to the project. It is loaded automatically as high-priority context by agent harnesses.
When should I use AGENTS.md instead of README.md?
Use AGENTS.md when the audience is AI coding agents that need executable instructions. Use README.md when the audience is humans evaluating or onboarding. Both can coexist and should reference each other when useful.
Which coding agents support AGENTS.md?
AGENTS.md is honored by OpenAI Codex/Codex CLI, Cursor, Aider, Google Jules, Gemini CLI, Factory, RooCode, and others. Claude Code supports it via CLAUDE.md compatibility. It is the recommended vendor-neutral file.