optimize-agents-md
Optimize AGENTS.md and rules for token efficiency. Auto-invoked when user asks about improving agent instructions, compressing AGENTS.md, or making rules more effective.
npx skills add majiayu000/claude-skill-registry --skill optimize-agents-md-plaited-development-skills --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Optimize AGENTS.md Apply Boris Cherny's compression principles to AGENTS.md and rules files. **Target**: ~2.5k tokens (most are 10k+ unnecessarily) ## When to Use - User wants to improve their AGENTS.md or CLAUDE.md - Agent instructions feel verbose or redundant - Rules exist but lack verification patterns - Setting up a new project's agent configuration ## Anti-Patterns to Fix | Anti-Pattern | Problem | Fix | |--------------|---------|-----| | Context stuffing | Repeating info agents already know | Delete obvious instructions | | Static memory | No learnings section | Add `## Learnings` with dates | | Format drift | Inconsistent structure | Use consistent headers | | Missing verification | No way to check work | Add `*Verify:*` patterns to rules | | Verbose rules | Paragraphs instead of patterns | Compress to pattern + verify + fix | ## Workflow ### Phase 1: Analyze Current State ```bash # Count tokens (rough estimate: words × 1.3) wc -w AGENTS.md # Find redundancy with project files grep -l "bun test" AGENTS.md package.json ``` Look for: - Instructions duplicating package.json scripts - Explanations of common tools (git, npm, bun) - Verbose descriptions that could be tables - R
- When to Use
- Anti-Patterns to Fix
- Workflow
- Phase 1: Analyze Current State
- Phase 2: Compress AGENTS.md
- Phase 3: Optimize Rules
- Phase 4: Add Living Document Features
- Verification
- Example Transformations
- Commands Section
- Capability Description
- Related Skills
Count tokens (rough estimate: words × 1.3) wc -w AGENTS.md Find redundancy with project files grep -l "bun test" AGENTS.md package.json
What does the optimize-agents-md skill do?
Optimize AGENTS.md and rules for token efficiency. Auto-invoked when user asks about improving agent instructions, compressing AGENTS.md, or making rules more effective.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill optimize-agents-md-plaited-development-skills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
