Turn a proven pattern or debugging solution into a standalone reusable skill with SKILL.md, reference docs, and examples.
Transforms a recurring pattern or debugging solution into a standalone, portable skill that can be installed in any project.
/si:extract <pattern description> # Interactive extraction
/si:extract <pattern> --name docker-m1-fixes # Specify skill name
/si:extract <pattern> --output ./skills/ # Custom output directory
/si:extract <pattern> --dry-run # Preview without creating files
A learning qualifies for skill extraction when ANY of these are true:
| Criterion | Signal |
|---|---|
| Recurring | Same issue across 2+ projects |
| Non-obvious | Required real debugging to discover |
| Broadly applicable | Not tied to one specific codebase |
| Complex solution | Multi-step fix that's easy to forget |
| User-flagged | "Save this as a skill", "I want to reuse this" |
Read the user's description. Search auto-memory for related entries:
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
grep -rni "<keywords>" "$MEMORY_DIR/"
If found in auto-memory, use those entries as source material. If not, use the user's description directly.
Ask (max 2 questions):
Rules for naming:
docker-m1-fixes, api-timeout-patterns, pnpm-workspace-setupSpawn the skill-extractor agent for the actual file generation.
The agent creates:
<skill-name>/
├── SKILL.md # Main skill file with frontmatter
├── README.md # Human-readable overview
└── reference/ # (optional) Supporting documentation
└── examples.md # Concrete examples and edge cases
The generated SKILL.md must follow this format:
---