AGENTS.md and CLAUDE.md writer

Writes or trims a repository's AGENTS.md to under 60 lines of commands, conventions and pointers to existing docs, checks every path, and makes CLAUDE.md a symlink to it. Use when a repo needs agent instructions or its current file has grown long or stale.

DocumentationPack: Sentry skills95 linesagents-md
Author
Source
getsentry/skills/skills/agents-md @ a582c51
License
Apache-2.0 · Copyright 2025 Functional Software, Inc. dba Sentry

About this skill

What it does

The skill writes or trims the instruction file a coding agent reads first in a repository: under 60 lines, never more than 100. Before writing, the agent reads lock files, package.json, Makefile, CI workflows, README.md, CONTRIBUTING.md, SECURITY.md and docs/, and afterwards checks that every path and command it wrote exists.

The result is mostly tables and bullets: the package manager, file-scoped test and lint commands, a table pointing to the setup, architecture, API, security and release docs, a few non-obvious conventions, and a commit attribution section with a Co-Authored-By line for AI commits. Existing docs are referenced, not copied; linter rules, installed skills and quality slogans stay out. A nested AGENTS.md appears only where a subtree has its own commands, and the closest file wins. CLAUDE.md becomes a symlink to AGENTS.md, not a second copy.

SPEC.md and SOURCES.md in the folder are notes for the skill's maintainers: scope, evaluation and sources (the agents.md format guide, OpenAI's Codex docs on AGENTS.md, the Agent Skills specification). The agent does not need them at run time.

When to use it, and when not

Use it when a repo has no AGENTS.md or CLAUDE.md, when the existing one has grown into pages of prose, or when its commands and paths have gone stale.

Its spec rules out READMEs, PR descriptions and writing skills. If you do not want AI attribution in commits, or keep CLAUDE.md and AGENTS.md different on purpose, tell the agent up front.

How to run it

The install command below puts the whole folder in place. The agent picks the skill up by its description when you ask for an AGENTS.md or CLAUDE.md; to call it yourself:

  • Claude Code: /agents-md, or ask for the skill by name.
  • Codex: $agents-md.
  • Cursor: type / in the Agent chat and pick agents-md.

Example: /agents-md Our CLAUDE.md is 300 lines. Rewrite it as AGENTS.md under 60 lines and make CLAUDE.md a symlink.

How it differs from similar skills

Writing for agents teaches how to word anything an agent reads and has no template; this skill produces one file with a fixed shape and a line budget. Context engineering for agents also has a CLAUDE.md template, but is mostly about what to load into a session. README writer writes for people new to the project, and Skill writer by the Agent Skills spec from the same pack covers skills.

Install

Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.

Claude Code — macOS, Linux
curl -fsSL --create-dirs -o ~/.claude/skills/agents-md/SKILL.md https://anymodel.org/en/skills/sentry/agents-md/SKILL.md -o ~/.claude/skills/agents-md/LICENSE https://anymodel.org/en/skills/sentry/agents-md/LICENSE -o ~/.claude/skills/agents-md/SOURCES.md https://anymodel.org/en/skills/sentry/agents-md/SOURCES.md -o ~/.claude/skills/agents-md/SPEC.md https://anymodel.org/en/skills/sentry/agents-md/SPEC.md
Codex, Cursor — macOS, Linux
curl -fsSL --create-dirs -o ~/.agents/skills/agents-md/SKILL.md https://anymodel.org/en/skills/sentry/agents-md/SKILL.md -o ~/.agents/skills/agents-md/LICENSE https://anymodel.org/en/skills/sentry/agents-md/LICENSE -o ~/.agents/skills/agents-md/SOURCES.md https://anymodel.org/en/skills/sentry/agents-md/SOURCES.md -o ~/.agents/skills/agents-md/SPEC.md https://anymodel.org/en/skills/sentry/agents-md/SPEC.md
Claude Code — Windows PowerShell
foreach ($f in 'SKILL.md','LICENSE','SOURCES.md','SPEC.md') { $p = Join-Path "$HOME\.claude\skills\agents-md" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/sentry/agents-md/$f" -UseBasicParsing -OutFile $p }
Codex, Cursor — Windows PowerShell
foreach ($f in 'SKILL.md','LICENSE','SOURCES.md','SPEC.md') { $p = Join-Path "$HOME\.agents\skills\agents-md" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/sentry/agents-md/$f" -UseBasicParsing -OutFile $p }

Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/sentry/agents-md/SKILL.md

SKILL.md

Raw

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.

# 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:

## 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

Connect through AnyModel API

This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.

More from the pack Sentry skills

Claude Code settings audit

Detects a repository's stack and proposes a Claude Code settings.json allow list of read-only commands for the tools it actually uses, plus docs domains and Sentry or Linear MCP entries. Use when setting up Claude Code permissions or auditing existing ones.

Code review, Sentry practices

Reviews a change by Sentry's guidelines: runtime errors, performance and N+1 queries, side effects, compatibility, security, design and tests, with a polite tone and approval once only minor issues remain. Use when reviewing a pull request or branch.

Code simplifier

Simplifies recently changed code without changing behaviour: less nesting, no nested ternaries, clearer names, no redundant abstractions, while following CLAUDE.md conventions. Use when code works but reads heavier than it should and needs a cleanup pass.

Conventional commit messages

Commits in Sentry's Conventional Commits style: a feature branch instead of main, a typed capitalised subject up to 70 characters, Fixes or Refs footers, no personal data. Use when asked to commit changes or draft a commit message.

Django access control review

Audits Django and DRF code for IDOR and broken access control by learning the app's authorization model and tracing each endpoint from ID to query, reporting only confirmed gaps with enforcing fixes. Use when reviewing views, viewsets or tenant isolation.

Find bugs in branch changes

Reviews the commits on the current branch for security holes, bugs and quality issues with an eleven-item checklist and reports verified findings with file, line, severity and fix, without editing code. Use when you want a security-first pass before a PR.

GitHub Actions security review

Audits GitHub Actions workflows for attacks an outsider without write access can run: pwn requests, expression injection, comment commands, token theft, poisoned agent configs, unpinned actions. Use when reviewing CI security or changing workflows.

Iterate a PR until CI is green

Drives an open PR to green: fixes failing CI and high and medium review comments, verifies locally, commits, pushes and repeats, stopping at human approval or draft gates. Use when a PR is red or has review feedback to work through.

PR title and description writer

Writes or refreshes a PR title in Sentry's conventional format and a short reviewer-facing description without template headings or test logs, then opens a draft or updates the PR. Use when opening a PR or after commits change its scope.

Prompt optimizer

Writes, repairs or ports system and agent prompts against a small eval set, comparing candidate rewrites on the same cases and checking the winner on held-out ones. Use when a prompt is unreliable, moves to another model family or needs evals.

Secret leaks through serialization

Finds secrets that leak when a credential field on a dataclass, pydantic model or JS object meets code that logs or traces whole objects, searching the whole repository for the other half. Use when a change adds such a field or a wholesale sink.

SECURITY_MODEL.md for review tools

Writes and maintains SECURITY_MODEL.md, telling security review tools a repository's exposure, invariants, reportable finding classes and owner-confirmed exclusions, with a script that flags stale references. Use when preparing a repo for automated review.

Agent skill security scanner

Audits an agent skill before installation: a static scan for prompt injection, hidden Unicode, secrets, risky scripts and structural traps, then a review of intent and permissions ending in a verdict. Use when a skill comes from an outside source.

Skill writer by the Agent Skills spec

Creates and improves agent skills by Sentry's workflow: sources with provenance, the simplest execution shape, SPEC.md and SOURCES.md, precision passes after each change and a structural validator. Use when building a skill that a team will maintain.

Security review, Sentry

Reviews a file, diff or component for exploitable vulnerabilities with OWASP-based references, researches the codebase before flagging and reports only findings reached by attacker-controlled input. Use when a change needs a low-noise security review.

Django performance review

Reviews Django and DRF code for N+1 queries, unbounded querysets, missing indexes and write loops, validating table size and hot paths before reporting. Use when a Django view or endpoint is slow or a change touches large tables.