From rc
Author lean AGENTS.md/CLAUDE.md instruction files — resident system-prompt context where every line pays rent. Use when writing an agent instruction file from scratch, trimming a bloated one, or gating whether a new rule earns residence and at which scope. Do not use for on-demand skills (rc-skill-best-practices), for measuring what the whole config surface costs in tokens (rc-context-budget), or for human-facing docs and READMEs (rc-readme).
How this skill is triggered — by the user, by Claude, or both
Slash command
/rc:rc-agents-mdsonnetThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Keep agent instruction files lean enough that every rule in them binds.
Keep agent instruction files lean enough that every rule in them binds.
An AGENTS.md or CLAUDE.md (COPILOT.md, .cursorrules — any harness instruction file) is not documentation. It is a fragment of the system prompt: the harness injects it verbatim into every session, before the task is known, and it never unloads. A skill loads on demand; this file is resident. Three consequences govern everything below:
The file that survives these constraints is a delta: the difference between stock agent behavior and what this project needs. Everything that isn't delta is rent paid for nothing.
Run on every line written, kept, or proposed. A line stays only if all three hold; a line that fails is deleted or relocated, never softened.
Place each rule at the narrowest scope that still covers the tasks needing it:
| Scope | Resident for | Belongs there |
|---|---|---|
Global (~/.claude/CLAUDE.md) | every project | cross-project workflow rules — the highest bar |
| Repo root file | every task in the repo | commands, repo-wide tripwires, deviations from convention |
Subtree file (<dir>/AGENTS.md) | work inside that subtree | area-specific rules, loaded only when the agent touches the area |
| Skill | on trigger | procedures and multi-step workflows |
| Linked doc | on demand | reference some tasks need; word the pointer for when to read it |
Two mechanics decide placement more than anything else: nested files load lazily, so the directory tree is the progressive disclosure these files natively support. And in Claude Code, an @path import expands at load time — resident, full rent — while a plain path mentioned in prose is read only on demand.
make check before commit", not "ensure quality gates pass".gen/ — regenerated on build."Write — a new file for a repo:
Done when: every line passes all three rent tests at its chosen scope.
Trim — an existing file:
Done when: every original line has a verdict and the surviving file passes the Write bar.
Gate — a single new rule, usually promoting a chat correction:
Done when: the rule lives at exactly one scope, exactly once.
npx claudepluginhub rodolfochicone/rc-project --plugin rcCreates, updates, or optimizes AGENTS.md files with minimal, high-signal instructions covering non-discoverable conventions and quirks. Applies a discoverability filter and quality gate.
Maintains CLAUDE.md and AGENTS.md instruction files by enforcing size limits (<300 lines), progressive disclosure via docs/ references, multi-agent compatibility, and tool-first content. Use for creation, updates, audits.
Creates and maintains minimal AGENTS.md/CLAUDE.md files using research-backed best practices for concise, high-signal agent documentation under 60 lines.