Migrate existing ADRs to YAML frontmatter format. Scans docs/decisions/ for ADRs without frontmatter, infers status from body text, shows dry-run for approval. Trigger: /adr-migrate
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Analyze and optimize CLAUDE.md files for quality improvements and token reduction. Supports analysis-only, simplification-only, or full optimization modes. Use when asked to "review", "optimize", "simplify", "improve", "check", or "reduce tokens" in CLAUDE.md.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
This Skill analyzes CLAUDE.md files for quality, suggests improvements based on Claude Code best practices, and simplifies content to reduce token usage.
/optimize-claude-md [mode] [level] [target]
Modes:
analyze: Quality analysis and improvement recommendations onlysimplify: Token reduction through simplificationfull: Both analysis and simplification (default)Levels (for simplify/full mode):
conservative: Careful simplification (50-70% reduction)aggressive: Bold simplification (70-85% reduction, recommended)extreme: Maximum reduction (85-95% reduction)Targets:
project: Project CLAUDE.md onlyall: Both project and global CLAUDE.md (global is read-only for reference)Global CLAUDE.md policy: Global ~/.claude/CLAUDE.md is always read-only. It may be read for cross-reference during analysis, but NEVER modified. Simplification proposals apply only to project-level files. If the user wants to change global CLAUDE.md, inform them to edit the chezmoi source instead.
Examples:
/optimize-claude-md # Full optimization, aggressive, project only
/optimize-claude-md analyze # Analysis only, project
/optimize-claude-md simplify conservative # Conservative simplification, project
/optimize-claude-md full aggressive all # Full optimization, global read for reference
Trigger this Skill when the user asks to:
Based on the mode parameter, follow the appropriate workflow:
Execute both analyze and simplify workflows in sequence.
Follow these steps to analyze and improve CLAUDE.md files:
Check all memory locations in this order:
./CLAUDE.md or ./.claude/CLAUDE.md — editable~/.claude/CLAUDE.md — read-only (reference only, never modify)./.claude/rules/*.md — editable./CLAUDE.local.md — editableRead each file found and note its location in the hierarchy. Global files (~/.claude/) are read for cross-reference context only — all modification proposals must target project-level files.
Evaluate each file against these criteria:
Organization:
Specificity:
Modularity:
.claude/rules/?See BEST-PRACTICES.md for detailed evaluation criteria.
Create a structured report with these sections:
Report Template:
# CLAUDE.md Analysis Report
## Executive Summary
[Overall assessment in 2-3 sentences]
## Strengths
- [What's working well]
## Issues Found
### Issue: [Name]
**Severity:** High/Medium/Low
**Location:** [File path and section]
**Problem:** [Specific issue]
**Example:**
[Quote from file]
**Why it matters:** [Impact on Claude's behavior]
## Recommendations
### Priority 1: [High-impact improvements]
[Specific action with code example]
### Priority 2: [Medium-impact improvements]
[Specific action with code example]
### Priority 3: [Low-impact improvements]
[Specific action with code example]
## Next Steps
1. [Immediate action]
2. [Short-term action]
3. [Long-term action]
For each recommendation, show:
When proposing simplifications, follow these critical rules:
For each proposed change, provide:
Example format:
**Section**: Worktree Management
**Why**: Implementation details inferable from command name
**Preserved**: Protection behavior (uncommitted/unpushed)
**Removed**: Auto-creates, uses existing (automatic behavior)
**Evidence**: "Auto-creates branch from current" ← user doesn't decide this
NEVER simplify content that serves as:
Explicit lists: Commit types, allowed values, prohibited patterns
Constraint definitions: "Only use X", "Never do Y"
Annotated examples: Annotations like "← why" clarify intent
Decision matrices: Tables showing when to use what
Preservation examples:
feat2, bugfix, etc.If CLAUDE.md or rules files are large or cover multiple concerns, suggest:
Splitting into .claude/rules/:
.claude/rules/
├── code-style.md # Style guidelines
├── testing.md # Test conventions
├── git-workflow.md # Commit and PR standards
└── debugging.md # Debugging procedures
Adding path-specific rules:
---
paths:
- "src/**/*.ts"
---
# TypeScript-specific guidelines
Using imports for modularity:
See @docs/architecture.md for system design
See @~/.claude/my-preferences.md for personal settings
❌ Bad: "Write good code" ✅ Good: "Use 2-space indentation for JavaScript"
❌ Bad: "Git is a version control system that..." ✅ Good: "Use conventional commits: feat/fix/refactor"
❌ Bad: All instructions in one long list ✅ Good: Grouped by topic with clear headings
❌ Bad: "Follow project conventions" ✅ Good: "Match existing pattern: async function fetchData()"
❌ Bad: "Use React 18 features" (will become outdated) ✅ Good: "Prefer hooks over class components"
❌ Bad: 2000-line CLAUDE.md with everything ✅ Good: Core in CLAUDE.md, specifics in .claude/rules/
❌ Bad: Inferring missing details and adding them as recommendations ✅ Good: Only reorganize, clarify, or simplify existing information
Critical Rule: Optimization means improving how existing information is presented, NOT adding new rules or information that wasn't there before. If something is unclear or seems incomplete, ask the user rather than assuming their intent.
Example of violation:
${projectRoot}/.tmp for temporary files"~/.tmp for system-wide temporary files"${projectRoot}/.tmp"For comprehensive best practices, see BEST-PRACTICES.md.
Key principles:
Always provide:
Make all recommendations actionable with specific text to add, remove, or modify.
Before proposing simplifications:
Approval format:
Proposal X: [Category name] (N lines reduced)
- Why: [Reason]
- Preserved: [Critical info]
- Removed: [Non-critical content]
Apply? (User must approve)
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Migrate existing ADRs to YAML frontmatter format. Scans docs/decisions/ for ADRs without frontmatter, infers status from body text, shows dry-run for approval. Trigger: /adr-migrate
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Start or resume an ADR session. Without number: show status overview and recommend next actionable ADR. With number: provide phase-specific guidance. Trigger: /adr-session, /adr-session NNN, /adr-session new
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Analyze a project's harness maturity and guide staged adoption of Harness Engineering best practices (quality loops, safety gates, linters, CLAUDE.md optimization).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Standardized bug fix workflow using TDD (Red-Green-Refactor). Use when fixing bugs, resolving issues, or when the user invokes /bugfix. Ensures root cause analysis, failing test first, then minimal fix.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Create detailed specifications by iteratively clarifying unclear points for Plan mode. Use when: After completing a plan when detailed requirements need clarification before implementation.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Policy-enforcing installer that deploys hardened Claude Code Action workflows (`@claude` manual mention + dependency-bot auto-fix) into a personal GitHub repository the user administers. Use when asked to introduce Claude Code Action, apply `@claude` mention support, or set up automated CI auto-fix for dependency bot PRs, using the security-hardened templates shipped with this skill.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.