Back to Guides
Tool-Specific

AGENTS.md -The Cross-Tool AI Rules File

AGENTS.md is the closest thing the AI coding tool ecosystem has to a universal standard. One file that works across Codex, Cursor, Jules, Copilot, and Gemini CLI.

Last updated: 2026-07-01

What AGENTS.md is

AGENTS.md is an open, cross-tool standard -plain markdown with no proprietary syntax -that tells AI coding agents about your project. It is now stewarded by the Agentic AI Foundation under the Linux Foundation. Unlike CLAUDE.md (Claude-specific) or .cursor/rules (Cursor-specific), AGENTS.md is designed to be read by any tool that supports it. The list is growing: Codex, Cursor, Jules (Google), GitHub Copilot Agent, Gemini CLI, and others.

What to put in AGENTS.md

Keep it under 300 lines. Agents deprioritize content buried deep in long files. Cover: project overview and stack, folder structure, key conventions, what the agent must never do, and how to run tests. Concrete examples beat abstract descriptions every time.

Complete AGENTS.md template

This template covers the essentials. Customize the stack section for your project.

AGENTS.md
# Project Agent Guidelines

## Project Overview
[One paragraph: what this project is, what it does, who it is for.]

## Tech Stack
- Language: TypeScript (strict)
- Framework: Next.js 16 App Router
- Styling: Tailwind CSS v4
- UI: shadcn/ui
- State: Zustand
- Testing: Vitest + React Testing Library

## Repository Structure
```
src/
├── app/        # Routes (App Router). Thin pages only.
├── components/ # Shared UI components.
├── features/   # Business domain modules.
├── hooks/      # Custom React hooks.
├── lib/        # Server-only utilities.
├── types/      # Global TypeScript types.
└── utils/      # Pure helper functions.
```

## Coding Conventions

### Naming
- Files: kebab-case | Components: PascalCase | Hooks: useCamelCase
- Booleans: isX, hasX, canX | Event handlers: handleX | Prop callbacks: onX
- Constants: UPPER_SNAKE_CASE

### Components
- Named exports only. No default exports.
- One component per file.
- Props typed with TypeScript interfaces.

### TypeScript
- No `any`. Use `unknown` and narrow with type guards.
- No enums. Use union string literals.
- Zod for all external data validation.

## What You Must NOT Do
- Do NOT add pages/ directory -this project uses App Router exclusively.
- Do NOT use useEffect for data fetching -use Server Components.
- Do NOT use any without an explicit comment explaining why.
- Do NOT create files outside the established folder structure.

## Running Tests
```bash
npm run test        # Unit tests (Vitest)
npm run test:e2e    # End-to-end (Playwright)
```

## Pull Request Guidelines
- All new features need a unit test.
- Keep PRs focused: one feature or fix per PR.
- Update types in src/types/ if you add new data shapes.

Generate your AGENTS.md in minutes

standarx generates a complete AGENTS.md -plus CLAUDE.md and .cursor/rules -all from the same source of truth about your stack.

Generate my rules file