optimize-agent-instructionslisted
Install: claude install-skill richfrem/agent-plugins-skills
<example>
<commentary>User wants their agent instruction files to follow best practices.</commentary>
user: "Optimize my CLAUDE.md with Karpathy principles"
assistant: [triggers optimize-agent-instructions, reads files, audits against checklist, rewrites]
</example>
<example>
<commentary>User has stale auto-generated content in their instruction files.</commentary>
user: "My GEMINI.md has a bunch of stuff that doesn't belong — can you clean it up?"
assistant: [triggers optimize-agent-instructions, identifies foreign content, strips and rewrites]
</example>
<example>
<commentary>Negative — user wants to update a specific skill, not instruction files.</commentary>
user: "Improve the trigger description for my link-checker skill"
assistant: [triggers os-improvement-loop, not optimize-agent-instructions]
</example>
# optimize-agent-instructions
Audits and rewrites the AI agent instruction files in a repo. Works on any project —
not just agent-plugins-skills. The goal is files that are authoritative, concise, and
guide AI behavior through explicit principles rather than hoping for defaults.
---
## Phase 1 — Discovery
Run these checks silently before asking anything:
**1. Which instruction files exist?**
```bash
ls CLAUDE.md GEMINI.md .github/copilot-instructions.md 2>/dev/null
```
**2. Ask the user:**
- What platform(s) they use (Claude Code, Copilot, Gemini CLI) — determines which files to touch
- Any project-specific rules to preserve (coding standards, ADRs, naming con