skill-simplify
Skill Simplify
Three-phase pipeline: analyze functional inventory, apply optimization rules, verify integrity.
Phase Reference Documents (read on-demand):
| Phase | Document | Purpose |
|---|---|---|
| 1 | phases/01-analysis.md | Extract functional inventory, identify redundancy, validate pseudo-code format |
| 2 | phases/02-optimize.md | Apply simplification rules, fix format issues |
| 3 | phases/03-check.md | Verify functional integrity, validate format |
Input Processing
const targetPath = input.trim()
const targetFile = targetPath.endsWith('.md') ? targetPath : `${targetPath}/SKILL.md`
const originalContent = Read(targetFile)
const originalLineCount = originalContent.split('\n').length
TodoWrite Pattern
TodoWrite({ todos: [
{ content: `Phase 1: Analyzing ${targetFile}`, status: "in_progress", activeForm: "Extracting functional inventory" },
{ content: "Phase 2: Optimize", status: "pending" },
{ content: "Phase 3: Integrity Check", status: "pending" }
]})
Core Rules
- Preserve ALL functional elements: Code blocks with logic, agent calls, data structures, routing, error handling, input/output specs
- Only reduce descriptive content: Flowcharts, verbose comments, duplicate sections, examples that repeat logic
- Never summarize algorithm logic: If-else branches, function bodies, schemas must remain verbatim
- Classify code blocks: Distinguish
functional(logic, routing, schemas) fromdescriptive(ASCII art, examples, display templates) — only descriptive blocks may be deleted - Merge equivalent variants: Single/multi-perspective templates differing only by a parameter → one template with variant comment
- Fix format issues: Nested backtick template literals in code fences → convert to prose; hardcoded option lists → flag for dynamic generation; workflow handoff references → ensure execution steps present
- Validate pseudo-code: Check bracket matching, variable consistency, structural completeness
- Quantitative verification: Phase 3 counts must match Phase 1 counts for functional categories; descriptive block decreases are expected
Error Handling
| Error | Resolution |
|---|---|
| Target file not found | Report error, stop |
| Check FAIL (missing functional elements) | Show delta, revert to original, report which elements lost |
| Check WARN (descriptive decrease or merge) | Show delta with justification |
| Format issues found | Report in check, fix in Phase 2 |
More from catlog22/claude-code-workflow
skill-generator
Meta-skill for creating new Claude Code skills with configurable execution modes. Supports sequential (fixed order) and autonomous (stateless) phase patterns. Use for skill scaffolding, skill creation, or building new workflows. Triggers on "create skill", "new skill", "skill generator".
127review-code
Multi-dimensional code review with structured reports. Analyzes correctness, readability, performance, security, testing, and architecture. Triggers on "review code", "code review", "审查代码", "代码审查".
102skill-tuning
Universal skill diagnosis and optimization tool. Detect and fix skill execution issues including context explosion, long-tail forgetting, data flow disruption, and agent coordination failures. Supports Gemini CLI for deep analysis. Triggers on "skill tuning", "tune skill", "skill diagnosis", "optimize skill", "skill debug".
71compact
Compact current session memory into structured text for session recovery. Supports custom descriptions and tagging.
71issue-manage
Interactive issue management with menu-driven CRUD operations. Use when managing issues, viewing issue status, editing issue fields, performing bulk operations, or viewing issue history. Triggers on "manage issue", "list issues", "edit issue", "delete issue", "bulk update", "issue dashboard", "issue history", "completed issues".
71ccw-help
CCW command help system. Search, browse, recommend commands, skills, teams. Triggers "ccw-help", "ccw-issue".
70