agents-md — Claude Code skill: what it does, how to install
Generates and maintains concise AGENTS.md and CLAUDE.md instruction files for repositories. Keeps coding agent rules short, verified, and reference-backed.
npx skills add getsentry/skills --skill agents-md -a claude-codeWhat agents-md does
The skill inspects the repository before drafting any rules. It scans package manifests, lock files, task runners in package.json or Makefile, and existing docs like CONTRIBUTING.md and SECURITY.md. Instead of copying entire documents, it builds tables with repo-relative paths. Commands prioritize single-file linting and testing over full repository builds.
Size limits stay strict. The skill targets under 60 lines and never exceeds 100. If Claude requires a dedicated entry point, the workflow creates a symlink from CLAUDE.md to AGENTS.md rather than maintaining divergent copies. Output includes key conventions, command tables, and the required Co-Authored-By commit attribution.
What it helps with
- generate a concise AGENTS.md instruction file
- symlink CLAUDE.md to AGENTS.md to avoid divergent docs
- extract file-scoped test and lint commands into tables
- set up agent commit attribution rules with Co-Authored-By
Example prompts for the agent
- Create a concise AGENTS.md for this repository
- Update AGENTS.md and symlink CLAUDE.md to it
- Inspect repository commands and document them in AGENTS.md
How to install agents-md
1Skills CLI (Vercel)
npx skills add getsentry/skills --skill agents-md -a claude-code2Manually: put the files in place
~/.claude/skills/agents-md/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agents-md/
1Skills CLI (Vercel)
npx skills add getsentry/skills --skill agents-md -a codex2Manually: put the files in place
.agents/skills/agents-md/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add getsentry/skills --skill agents-md -a cursor2Manually: put the files in place
.cursor/skills/agents-md/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install getsentry/skills agents-md2Manually: put the files in place
.github/skills/agents-md/SKILL.md1Skills CLI (Vercel)
npx skills add getsentry/skills --skill agents-md -a gemini-cli2Platform CLI
gemini skills install https://github.com/getsentry/skills --path skills/agents-mdManually: put the files in place
.devin/skills/agents-md/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add getsentry/skills --skill agents-md -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agents-md
How to install agents-md in Claude Code?
Run npx skills add getsentry/skills --skill agents-md -a claude-code in your terminal.
Why does agents-md symlink CLAUDE.md to AGENTS.md?
It ensures compatibility with Claude Code while avoiding duplicate files that can diverge over time.
What line limits does agents-md enforce?
The skill targets under 60 lines for instruction files and enforces a hard limit of 100 lines.
Source text
SKILL.md · Apache-2.0
--- name: agents-md description: Creates and maintains concise AGENTS.md and CLAUDE.md project instruction files. Use when asked to create AGENTS.md, update AGENTS.md, maintain agent docs, set up CLAUDE.md, document repository agent conventions, or keep coding-agent instructions minimal and reference-backed. --- # Maintaining AGENTS.md Goal: concise, actionable agent instructions. Target under 60 lines; never exceed 100. ## Workflow 1. Inspect before writing: - package manager: lock files and manifests - commands: `package.json`, `Makefile`, task runners, CI workflows - docs/specs/policies: `README.md`, `CONTRIBUTING.md`, `docs/`, `specs/`, `policies/`, `SECURITY.md`, `.github/` - conventions: current code patterns, test layout, generated files, legacy areas to avoid 2. Choose scope: - root `AGENTS.md`: repo-wide defaults - nested `AGENTS.md`: only when a subtree has different commands or rules - closest instruction file wins; keep narrower files shorter than root files 3. Write the smallest useful file. 4. Verify exact paths and commands exist. ## File Setup - Create `AGENTS.md` at the repository root. - If a Claude-compatible entrypoint is required, symlink `CLAUDE.md` to `AGENTS.md`. - Do not maintain divergent `AGENTS.md` and `CLAUDE.md` copies. ## Default Sections Use only sections that add non-obvious value. ````markdown # Agent Instructions ## Package Manager - Use **pnpm**: `pnpm install` ## Commands | Task | Command | |------|---------| | Test file | `pnpm vitest run path/to/file.test.ts` | | Lint file | `pnpm eslint path/to/file.ts` | ## External References | Need | File | |------|------| | Setup | `CONTRIBUTING.md` | | Architecture | `docs/architecture.md` | | Security policy | `SECURITY.md` | ## Key Conventions - Generated files: update with `pnpm generate`; do not edit by hand. ## Commit Attribution AI commits MUST include: ``` Co-Authored-By: (the agent's name and attribution byline) ``` ```` ## Writing Rules - Use headings, bullets, and tables; avoid paragraphs. - Use repo-relative paths; avoid vague references like "see docs". - Reference existing docs/specs/policies instead of copying them. - List exact external files for setup, architecture, API specs, security, release, and policy docs when they exist. - Prefer file-scoped test/lint/typecheck commands; include full builds only when no narrower command exists. - Put commands in tables when there is more than one. - Keep one rule per bullet. - Keep rationale out unless it prevents a likely mistake. - Do not restate linter, formatter, or typechecker config. - Do not list installed skills or plugins. - Do not include generic quality slogans. ## External Reference Rules Good: ```markdown ## External References | Need | File | |------|------| | API contract | `docs/api.md` | | Release process | `docs/releasing.md` | ``` ## Anti-Patterns - welcome text, intros, conclusions, or pleasantries - long prose explaining why instructions matter - duplicated content from `README.md`, `CONTRIBUTING.md`, or policy docs - project-wide commands when file-scoped commands are available - nested `AGENTS.md` files that repeat root instructions
© getsentry · Apache-2.0 · getsentry/skills