$npx -y skills add sickn33/agentic-awesome-skills --skill agents-mdThis 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 documentation.
| 1 | # Maintaining AGENTS.md |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## When to Use |
| 6 | - The user asks to create, update, or audit `AGENTS.md` or `CLAUDE.md`. |
| 7 | - The project needs concise, high-signal agent instructions derived from the actual toolchain and repo layout. |
| 8 | - Existing agent documentation is too long, duplicated, or drifting away from real project conventions. |
| 9 | |
| 10 | ## File Setup |
| 11 | |
| 12 | 1. Create `AGENTS.md` at project root |
| 13 | 2. Create symlink: `ln -s AGENTS.md CLAUDE.md` |
| 14 | |
| 15 | ## Before Writing |
| 16 | |
| 17 | Analyze the project to understand what belongs in the file: |
| 18 | |
| 19 | 1. **Package manager** — Check for lock files (`pnpm-lock.yaml`, `yarn.lock`, `package-lock.json`, `uv.lock`, `poetry.lock`) |
| 20 | 2. **Linter/formatter configs** — Look for `.eslintrc`, `biome.json`, `ruff.toml`, `.prettierrc`, etc. (don't duplicate these in AGENTS.md) |
| 21 | 3. **CI/build commands** — Check `Makefile`, `package.json` scripts, CI configs for canonical commands |
| 22 | 4. **Monorepo indicators** — Check for `pnpm-workspace.yaml`, `nx.json`, Cargo workspace, or subdirectory `package.json` files |
| 23 | 5. **Existing conventions** — Check for existing CONTRIBUTING.md, docs/, or README patterns |
| 24 | |
| 25 | ## Writing Rules |
| 26 | |
| 27 | - **Headers + bullets** — No paragraphs |
| 28 | - **Code blocks** — For commands and templates |
| 29 | - **Reference, don't embed** — Point to existing docs: "See `CONTRIBUTING.md` for setup" or "Follow patterns in `src/api/routes/`" |
| 30 | - **No filler** — No intros, conclusions, or pleasantries |
| 31 | - **Trust capabilities** — Omit obvious context |
| 32 | - **Prefer file-scoped commands** — Per-file test/lint/typecheck commands over project-wide builds |
| 33 | - **Don't duplicate linters** — Code style lives in linter configs, not AGENTS.md |
| 34 | |
| 35 | ## Required Sections |
| 36 | |
| 37 | ### Package Manager |
| 38 | Which tool and key commands only: |
| 39 | ```markdown |
| 40 | ## Package Manager |
| 41 | Use **pnpm**: `pnpm install`, `pnpm dev`, `pnpm test` |
| 42 | ``` |
| 43 | |
| 44 | ### File-Scoped Commands |
| 45 | Per-file commands are faster and cheaper than full project builds. Always include when available: |
| 46 | ```markdown |
| 47 | ## File-Scoped Commands |
| 48 | | Task | Command | |
| 49 | |------|---------| |
| 50 | | Typecheck | `pnpm tsc --noEmit path/to/file.ts` | |
| 51 | | Lint | `pnpm eslint path/to/file.ts` | |
| 52 | | Test | `pnpm jest path/to/file.test.ts` | |
| 53 | ``` |
| 54 | |
| 55 | ### Commit Attribution |
| 56 | Always include this section. Agents should use their own identity: |
| 57 | ```markdown |
| 58 | ## Commit Attribution |
| 59 | AI commits MUST include: |
| 60 | ``` |
| 61 | Co-Authored-By: (the agent model's name and attribution byline) |
| 62 | ``` |
| 63 | Example: `Co-Authored-By: Claude Sonnet 4 <noreply@example.com>` |
| 64 | ``` |
| 65 | |
| 66 | ### Key Conventions |
| 67 | Project-specific patterns agents must follow. Keep brief. |
| 68 | |
| 69 | ## Optional Sections |
| 70 | |
| 71 | Add only if truly needed: |
| 72 | - API route patterns (show template, not explanation) |
| 73 | - CLI commands (table format) |
| 74 | - File naming conventions |
| 75 | - Project structure hints (point to critical files, flag legacy code to avoid) |
| 76 | - Monorepo overrides (subdirectory `AGENTS.md` files override root) |
| 77 | |
| 78 | ## Anti-Patterns |
| 79 | |
| 80 | Omit these: |
| 81 | - "Welcome to..." or "This document explains..." |
| 82 | - "You should..." or "Remember to..." |
| 83 | - Linter/formatter rules already in config files (`.eslintrc`, `biome.json`, `ruff.toml`) |
| 84 | - Listing installed skills or plugins (agents discover these automatically) |
| 85 | - Full project-wide build commands when file-scoped alternatives exist |
| 86 | - Obvious instructions ("run tests", "write clean code") |
| 87 | - Explanations of why (just say what) |
| 88 | - Long prose paragraphs |
| 89 | |
| 90 | ## Example Structure |
| 91 | |
| 92 | ```markdown |
| 93 | # Agent Instructions |
| 94 | |
| 95 | ## Package Manager |
| 96 | Use **pnpm**: `pnpm install`, `pnpm dev` |
| 97 | |
| 98 | ## Commit Attribution |
| 99 | AI commits MUST include: |
| 100 | ``` |
| 101 | Co-Authored-By: (the agent model's name and attribution byline) |
| 102 | ``` |
| 103 | |
| 104 | ## File-Scoped Commands |
| 105 | | Task | Command | |
| 106 | |------|---------| |
| 107 | | Typecheck | `pnpm tsc --noEmit path/to/file.ts` | |
| 108 | | Lint | `pnpm eslint path/to/file.ts` | |
| 109 | | Test | `pnpm jest path/to/file.test.ts` | |
| 110 | |
| 111 | ## API Routes |
| 112 | [Template code block] |
| 113 | |
| 114 | ## CLI |
| 115 | | Command | Description | |
| 116 | |---------|-------------| |
| 117 | | `pnpm cli sync` | Sync data | |
| 118 | ``` |
| 119 | |
| 120 | ## Limitations |
| 121 | - Use this skill only when the task clearly matches the scope described above. |
| 122 | - Do not treat the output as a substitute for environment-specific validation, testing, or expert review. |
| 123 | - Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing. |