optimizing-claude-md
Use when CLAUDE.md is bloated or ineffective. Use when Claude ignores instructions, file exceeds 150 lines, response formatting rules aren't working, or user asks to optimize/restructure their Claude Code configuration.
npx skills add majiayu000/claude-skill-registry --skill optimizing-claude-md --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.
# Optimizing CLAUDE.md ## Overview Claude Code has a **priority hierarchy** for instructions. Most optimization failures come from putting rules in the wrong tier. ## When to Use - CLAUDE.md exceeds 150 lines - Claude ignores rules you've written - Response formatting directives ("be concise") aren't working - Multiple sections marked CRITICAL/MANDATORY - User asks to optimize, restructure, or create CLAUDE.md ## Priority Hierarchy | Tier | Mechanism | Priority | Purpose | |---|---|---|---| | **1. Output styles** | `~/.claude/output-styles/` | System prompt (highest) | Response format, tone, word limits | | **2. CLAUDE.md** | Project root | User message (medium) | Project rules, safety guardrails | | **3. .claude/rules/** | `.claude/rules/*.md` | Same as CLAUDE.md, auto-loaded | Topic-specific reference material | | **4. Auto memory** | `~/.claude/projects/*/memory/` | First 200 lines | Claude's own scratchpad — not for your instructions | **The #1 mistake:** Putting response formatting rules in CLAUDE.md. They belong in an output style (system prompt level). CLAUDE.md formatting rules get ignored under pressure. **Auto memory note:** Don't put instructions in MEMORY.md — it's Clau
- Overview
- When to Use
- Priority Hierarchy
- Decision Framework: Keep, Move, or Cut
- Target: Under 150 lines (best teams run 60-80)
- Restructuring Workflow
- Content Classification
- Common Mistakes
- When NOT to Use
What does the optimizing-claude-md skill do?
Use when CLAUDE.md is bloated or ineffective. Use when Claude ignores instructions, file exceeds 150 lines, response formatting rules aren't working, or user asks to optimize/restructure their Claude Code configuration.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill optimizing-claude-md --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.
