Maintaining AGENTS.md
AGENTS.md is the canonical agent-facing documentation. Keep it minimal—agents are capable and don't need hand-holding. Target under 60 lines; never exceed 100. Instruction-following quality degrades as document length increases.
When to Use
- The user asks to create, update, or audit
AGENTS.md or CLAUDE.md.
- The project needs concise, high-signal agent instructions derived from the actual toolchain and repo layout.
- Existing agent documentation is too long, duplicated, or drifting away from real project conventions.
File Setup
- Create
AGENTS.md at project root
- Create symlink:
ln -s AGENTS.md CLAUDE.md
Before Writing
Analyze the project to understand what belongs in the file:
- Package manager — Check for lock files (
pnpm-lock.yaml, yarn.lock, package-lock.json, uv.lock, poetry.lock)
- Linter/formatter configs — Look for
.eslintrc, biome.json, ruff.toml, .prettierrc, etc. (don't duplicate these in AGENTS.md)
- CI/build commands — Check
Makefile, package.json scripts, CI configs for canonical commands
- Monorepo indicators — Check for
pnpm-workspace.yaml, nx.json, Cargo workspace, or subdirectory package.json files
- Existing conventions — Check for existing CONTRIBUTING.md, docs/, or README patterns
Writing Rules
- Headers + bullets — No paragraphs
- Code blocks — For commands and templates
- Reference, don't embed — Point to existing docs: "See
CONTRIBUTING.md for setup" or "Follow patterns in src/api/routes/"
- No filler — No intros, conclusions, or pleasantries
- Trust capabilities — Omit obvious context
- Prefer file-scoped commands — Per-file test/lint/typecheck commands over project-wide builds
- Don't duplicate linters — Code style lives in linter configs, not AGENTS.md
Required Sections
Package Manager
Which tool and key commands only:
## Package Manager
Use **pnpm**: `pnpm install`, `pnpm dev`, `pnpm test`
File-Scoped Commands
Per-file commands are faster and cheaper than full project builds. Always include when available:
## File-Scoped Commands
| Task | Command |
|------|---------|
| Typecheck | `pnpm tsc --noEmit path/to/file.ts` |
| Lint | `pnpm eslint path/to/file.ts` |
| Test | `pnpm jest path/to/file.test.ts` |
Commit Attribution
Always include this section. Agents should use their own identity:
## Commit Attribution
AI commits MUST include:
Co-Authored-By: (the agent model's name and attribution byline)
Example: `Co-Authored-By: Claude Sonnet 4 <noreply@example.com>`
Key Conventions
Project-specific patterns agents must follow. Keep brief.
Optional Sections
Add only if truly needed:
- API route patterns (show template, not explanation)
- CLI commands (table format)
- File naming conventions
- Project structure hints (point to critical files, flag legacy code to avoid)
- Monorepo overrides (subdirectory
AGENTS.md files override root)
Anti-Patterns
Omit these:
- "Welcome to..." or "This document explains..."
- "You should..." or "Remember to..."
- Linter/formatter rules already in config files (
.eslintrc, biome.json, ruff.toml)
- Listing installed skills or plugins (agents discover these automatically)
- Full project-wide build commands when file-scoped alternatives exist
- Obvious instructions ("run tests", "write clean code")
- Explanations of why (just say what)
- Long prose paragraphs
Example Structure
# Agent Instructions
## Package Manager
Use **pnpm**: `pnpm install`, `pnpm dev`
## Commit Attribution
AI commits MUST include:
Co-Authored-By: (the agent model's name and attribution byline)
## File-Scoped Commands
| Task | Command |
|------|---------|
| Typecheck | `pnpm tsc --noEmit path/to/file.ts` |
| Lint | `pnpm eslint path/to/file.ts` |
| Test | `pnpm jest path/to/file.test.ts` |
## API Routes
[Template code block]
## CLI
| Command | Description |
|---------|-------------|
| `pnpm cli sync` | Sync data |
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
1---2name: agents-md3description: "\"This skill should be used when the user asks to \"create AGENTS.md\", \"update AGENTS.md\", \"maintain agent docs\", \"set up CLAUDE.md\", or needs to keep agent instructions concise. Enforces research-backed best practices for minimal, high-signal agent ...\""4version: 1.0.05author:6 name: "sickn33 / Antigravity Community"7 github: sickn338tags: [agents, aiml]9category: ai-ml10platforms: [macos, linux, windows]11license: MIT12metadata:13 hermes:14 source: https://skillmd.com/skills/nous-hermeshub/agents-md15 upstream: "antigravity-awesome-skills"16 risk: "unknown"17 original_author: "Antigravity Community"18---1920# Maintaining AGENTS.md2122AGENTS.md is the canonical agent-facing documentation. Keep it minimal—agents are capable and don't need hand-holding. Target under 60 lines; never exceed 100. Instruction-following quality degrades as document length increases.2324## When to Use25- The user asks to create, update, or audit `AGENTS.md` or `CLAUDE.md`.26- The project needs concise, high-signal agent instructions derived from the actual toolchain and repo layout.27- Existing agent documentation is too long, duplicated, or drifting away from real project conventions.2829## File Setup30311. Create `AGENTS.md` at project root322. Create symlink: `ln -s AGENTS.md CLAUDE.md`3334## Before Writing3536Analyze the project to understand what belongs in the file:37381. **Package manager** — Check for lock files (`pnpm-lock.yaml`, `yarn.lock`, `package-lock.json`, `uv.lock`, `poetry.lock`)392. **Linter/formatter configs** — Look for `.eslintrc`, `biome.json`, `ruff.toml`, `.prettierrc`, etc. (don't duplicate these in AGENTS.md)403. **CI/build commands** — Check `Makefile`, `package.json` scripts, CI configs for canonical commands414. **Monorepo indicators** — Check for `pnpm-workspace.yaml`, `nx.json`, Cargo workspace, or subdirectory `package.json` files425. **Existing conventions** — Check for existing CONTRIBUTING.md, docs/, or README patterns4344## Writing Rules4546- **Headers + bullets** — No paragraphs47- **Code blocks** — For commands and templates48- **Reference, don't embed** — Point to existing docs: "See `CONTRIBUTING.md` for setup" or "Follow patterns in `src/api/routes/`"49- **No filler** — No intros, conclusions, or pleasantries50- **Trust capabilities** — Omit obvious context51- **Prefer file-scoped commands** — Per-file test/lint/typecheck commands over project-wide builds52- **Don't duplicate linters** — Code style lives in linter configs, not AGENTS.md5354## Required Sections5556### Package Manager57Which tool and key commands only:58```markdown59## Package Manager60Use **pnpm**: `pnpm install`, `pnpm dev`, `pnpm test`61```6263### File-Scoped Commands64Per-file commands are faster and cheaper than full project builds. Always include when available:65```markdown66## File-Scoped Commands67| Task | Command |68|------|---------|69| Typecheck | `pnpm tsc --noEmit path/to/file.ts` |70| Lint | `pnpm eslint path/to/file.ts` |71| Test | `pnpm jest path/to/file.test.ts` |72```7374### Commit Attribution75Always include this section. Agents should use their own identity:76```markdown77## Commit Attribution78AI commits MUST include:79```80Co-Authored-By: (the agent model's name and attribution byline)81```82Example: `Co-Authored-By: Claude Sonnet 4 <noreply@example.com>`83```8485### Key Conventions86Project-specific patterns agents must follow. Keep brief.8788## Optional Sections8990Add only if truly needed:91- API route patterns (show template, not explanation)92- CLI commands (table format)93- File naming conventions94- Project structure hints (point to critical files, flag legacy code to avoid)95- Monorepo overrides (subdirectory `AGENTS.md` files override root)9697## Anti-Patterns9899Omit these:100- "Welcome to..." or "This document explains..."101- "You should..." or "Remember to..."102- Linter/formatter rules already in config files (`.eslintrc`, `biome.json`, `ruff.toml`)103- Listing installed skills or plugins (agents discover these automatically)104- Full project-wide build commands when file-scoped alternatives exist105- Obvious instructions ("run tests", "write clean code")106- Explanations of why (just say what)107- Long prose paragraphs108109## Example Structure110111```markdown112# Agent Instructions113114## Package Manager115Use **pnpm**: `pnpm install`, `pnpm dev`116117## Commit Attribution118AI commits MUST include:119```120Co-Authored-By: (the agent model's name and attribution byline)121```122123## File-Scoped Commands124| Task | Command |125|------|---------|126| Typecheck | `pnpm tsc --noEmit path/to/file.ts` |127| Lint | `pnpm eslint path/to/file.ts` |128| Test | `pnpm jest path/to/file.test.ts` |129130## API Routes131[Template code block]132133## CLI134| Command | Description |135|---------|-------------|136| `pnpm cli sync` | Sync data |137```138139## Limitations140- Use this skill only when the task clearly matches the scope described above.141- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.142- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.