/si:extract — Create Skills from Patterns
Turn a proven pattern or debugging solution into a standalone reusable skill with SKILL.md, reference docs, and examples.
How to use it
Claude Code
- Run the line below. It pulls the whole folder into
~/.claude/skills/extract, including the files SKILL.md points to. - Describe your job in plain words. Claude Code follows the skill from there.
npx degit alirezarezvani/claude-skills/engineering-team/self-improving-agent/skills/extract#main ~/.claude/skills/extractFor one project only, change the path to .claude/skills/extract. This skill also uses examples.md, MEMORY.md — copying SKILL.md alone won't be enough. See the folder on GitHub.
Claude (web or desktop app)
- On this page open ⋯ → Download .md.
- Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
- Pick the file and Save. Claude shows the name and description and runs a security scan.
- Check the skill is switched on.
- Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
- ChatGPT: make a Project and paste it into Instructions.
- Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Source of /si:extract — Create Skills from Patterns
Show the full text194 lines
| name | description |
|---|---|
| extract | Turn a proven pattern or debugging solution into a standalone reusable skill with SKILL.md, reference docs, and examples. Use when the user runs /si:extract or asks to package a recurring solution from memory into a skill. |
/si:extract — Create Skills from Patterns
Transforms a recurring pattern or debugging solution into a standalone, portable skill that can be installed in any project.
Usage
/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
When to Extract
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" |
Workflow
Step 1: Identify the pattern
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.
Step 2: Determine skill scope
Ask (max 2 questions):
- "What problem does this solve?" (if not clear)
- "Should this include code examples?" (if applicable)
Step 3: Generate skill name
Rules for naming:
- Lowercase, hyphens between words
- Descriptive but concise (2-4 words)
- Examples:
docker-m1-fixes,api-timeout-patterns,pnpm-workspace-setup
Reserved fragments — must NOT appear in the skill name:
claudeanthropic
For skills about Claude Code itself, use the cc- prefix instead:
- ❌
claude-code-settings→ ✅cc-settings - ❌
claude-code-maintenance→ ✅cc-maintenance - ❌
claude-mcp-tools→ ✅cc-mcp-tools - ❌
claude-plugin-development→ ✅cc-plugin-development
Before writing the skill directory, check the proposed name against this list.
If a reserved fragment is present, transform it (drop the fragment or replace
the claude*/anthropic* prefix with cc-) and confirm with the user.
Step 4: Create the skill files
Spawn 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
Step 5: SKILL.md structure
The generated SKILL.md must follow this format:
---
name: "skill-name"
description: "<one-line description>. Use when: <trigger conditions>."
---
# <Skill Title>
> One-line summary of what this skill solves.
## Quick Reference
| Problem | Solution |
|---------|----------|
| {{problem 1}} | {{solution 1}} |
| {{problem 2}} | {{solution 2}} |
## The Problem
{{2-3 sentences explaining what goes wrong and why it's non-obvious.}}
## Solutions
### Option 1: {{Name}} (Recommended)
{{Step-by-step with code examples.}}
### Option 2: {{Alternative}}
{{For when Option 1 doesn't apply.}}
## Trade-offs
| Approach | Pros | Cons |
|----------|------|------|
| Option 1 | {{pros}} | {{cons}} |
| Option 2 | {{pros}} | {{cons}} |
## Edge Cases
- {{edge case 1 and how to handle it}}
- {{edge case 2 and how to handle it}}
Step 6: Quality gates
Before finalizing, verify:
- SKILL.md has valid YAML frontmatter with
nameanddescription -
namematches the folder name (lowercase, hyphens) -
namedoes NOT contain reserved fragmentsclaudeoranthropic(usecc-prefix for Claude Code skills) - Description includes "Use when:" trigger conditions
- Solutions are self-contained (no external context needed)
- Code examples are complete and copy-pasteable
- No project-specific hardcoded values (paths, URLs, credentials)
- No unnecessary dependencies
Step 7: Report
✅ Skill extracted: {{skill-name}}
Files created:
{{path}}/SKILL.md ({{lines}} lines)
{{path}}/README.md ({{lines}} lines)
{{path}}/reference/examples.md ({{lines}} lines)
Install: /plugin install (copy to your skills directory)
Publish: clawhub publish {{path}}
Source: MEMORY.md entries at lines {{n, m, ...}} (retained — the skill is portable, the memory is project-specific)
Examples
Extracting a debugging pattern
/si:extract "Fix for Docker builds failing on Apple Silicon with platform mismatch"
Creates docker-m1-fixes/SKILL.md with:
- The platform mismatch error message
- Three solutions (build flag, Dockerfile, docker-compose)
- Trade-offs table
- Performance note about Rosetta 2 emulation
Extracting a workflow pattern
/si:extract "Always regenerate TypeScript API client after modifying OpenAPI spec"
Creates api-client-regen/SKILL.md with:
- Why manual regen is needed
- The exact command sequence
- CI integration snippet
- Common failure modes
Tips
- Extract patterns that would save time in a different project
- Keep skills focused — one problem per skill
- Include the error messages people would search for
- Test the skill by reading it without the original context — does it make sense?
| 1 | |
| 2 | name "extract" |
| 3 | description "Turn a proven pattern or debugging solution into a standalone reusable skill with SKILL.md, reference docs, and examples. Use when the user runs /si:extract or asks to package a recurring solution from memory into a skill." |
| 4 | |
| 5 | |
| 6 | # /si:extract — Create Skills from Patterns |
| 7 | |
| 8 | Transforms a recurring pattern or debugging solution into a standalone, portable skill that can be installed in any project. |
| 9 | |
| 10 | ## Usage |
| 11 | |
| 12 | |
| 13 | /si:extract <pattern description> # Interactive extraction |
| 14 | /si:extract <pattern> --name docker-m1-fixes # Specify skill name |
| 15 | /si:extract <pattern> --output ./skills/ # Custom output directory |
| 16 | /si:extract <pattern> --dry-run # Preview without creating files |
| 17 | |
| 18 | |
| 19 | ## When to Extract |
| 20 | |
| 21 | A learning qualifies for skill extraction when ANY of these are true: |
| 22 | |
| 23 | | Criterion | Signal | |
| 24 | |---|---| |
| 25 | | **Recurring** | Same issue across 2+ projects | |
| 26 | | **Non-obvious** | Required real debugging to discover | |
| 27 | | **Broadly applicable** | Not tied to one specific codebase | |
| 28 | | **Complex solution** | Multi-step fix that's easy to forget | |
| 29 | | **User-flagged** | "Save this as a skill", "I want to reuse this" | |
| 30 | |
| 31 | ## Workflow |
| 32 | |
| 33 | ### Step 1: Identify the pattern |
| 34 | |
| 35 | Read the user's description. Search auto-memory for related entries: |
| 36 | |
| 37 | |
| 38 | MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory" |
| 39 | grep -rni "<keywords>" "$MEMORY_DIR/" |
| 40 | |
| 41 | |
| 42 | If found in auto-memory, use those entries as source material. If not, use the user's description directly. |
| 43 | |
| 44 | ### Step 2: Determine skill scope |
| 45 | |
| 46 | Ask (max 2 questions): |
| 47 | "What problem does this solve?" (if not clear) |
| 48 | "Should this include code examples?" (if applicable) |
| 49 | |
| 50 | ### Step 3: Generate skill name |
| 51 | |
| 52 | Rules for naming: |
| 53 | Lowercase, hyphens between words |
| 54 | Descriptive but concise (2-4 words) |
| 55 | Examples: `docker-m1-fixes`, `api-timeout-patterns`, `pnpm-workspace-setup` |
| 56 | |
| 57 | **Reserved fragments — must NOT appear in the skill name:** |
| 58 | `claude` |
| 59 | `anthropic` |
| 60 | |
| 61 | For skills about Claude Code itself, use the `cc-` prefix instead: |
| 62 | ❌ `claude-code-settings` → ✅ `cc-settings` |
| 63 | ❌ `claude-code-maintenance` → ✅ `cc-maintenance` |
| 64 | ❌ `claude-mcp-tools` → ✅ `cc-mcp-tools` |
| 65 | ❌ `claude-plugin-development` → ✅ `cc-plugin-development` |
| 66 | |
| 67 | Before writing the skill directory, check the proposed name against this list. |
| 68 | If a reserved fragment is present, transform it (drop the fragment or replace |
| 69 | the `claude*`/`anthropic*` prefix with `cc-`) and confirm with the user. |
| 70 | |
| 71 | ### Step 4: Create the skill files |
| 72 | |
| 73 | **Spawn the `skill-extractor` agent** for the actual file generation. |
| 74 | |
| 75 | The agent creates: |
| 76 | |
| 77 | |
| 78 | <skill-name>/ |
| 79 | ├── SKILL.md # Main skill file with frontmatter |
| 80 | ├── README.md # Human-readable overview |
| 81 | └── reference/ # (optional) Supporting documentation |
| 82 | └── examples.md # Concrete examples and edge cases |
| 83 | |
| 84 | |
| 85 | ### Step 5: SKILL.md structure |
| 86 | |
| 87 | The generated SKILL.md must follow this format: |
| 88 | |
| 89 | |
| 90 | |
| 91 | name: "skill-name" |
| 92 | description: "<one-line description>. Use when: <trigger conditions>." |
| 93 | |
| 94 | |
| 95 | # <Skill Title> |
| 96 | |
| 97 | > One-line summary of what this skill solves. |
| 98 | |
| 99 | ## Quick Reference |
| 100 | |
| 101 | | Problem | Solution | |
| 102 | |---------|----------| |
| 103 | | {{problem 1}} | {{solution 1}} | |
| 104 | | {{problem 2}} | {{solution 2}} | |
| 105 | |
| 106 | ## The Problem |
| 107 | |
| 108 | {{2-3 sentences explaining what goes wrong and why it's non-obvious.}} |
| 109 | |
| 110 | ## Solutions |
| 111 | |
| 112 | ### Option 1: {{Name}} (Recommended) |
| 113 | |
| 114 | {{Step-by-step with code examples.}} |
| 115 | |
| 116 | ### Option 2: {{Alternative}} |
| 117 | |
| 118 | {{For when Option 1 doesn't apply.}} |
| 119 | |
| 120 | ## Trade-offs |
| 121 | |
| 122 | | Approach | Pros | Cons | |
| 123 | |----------|------|------| |
| 124 | | Option 1 | {{pros}} | {{cons}} | |
| 125 | | Option 2 | {{pros}} | {{cons}} | |
| 126 | |
| 127 | ## Edge Cases |
| 128 | |
| 129 | - {{edge case 1 and how to handle it}} |
| 130 | - {{edge case 2 and how to handle it}} |
| 131 | |
| 132 | |
| 133 | ### Step 6: Quality gates |
| 134 | |
| 135 | Before finalizing, verify: |
| 136 | |
| 137 | [ ] SKILL.md has valid YAML frontmatter with `name` and `description` |
| 138 | [ ] `name` matches the folder name (lowercase, hyphens) |
| 139 | [ ] `name` does NOT contain reserved fragments `claude` or `anthropic` (use `cc-` prefix for Claude Code skills) |
| 140 | [ ] Description includes "Use when:" trigger conditions |
| 141 | [ ] Solutions are self-contained (no external context needed) |
| 142 | [ ] Code examples are complete and copy-pasteable |
| 143 | [ ] No project-specific hardcoded values (paths, URLs, credentials) |
| 144 | [ ] No unnecessary dependencies |
| 145 | |
| 146 | ### Step 7: Report |
| 147 | |
| 148 | |
| 149 | ✅ Skill extracted: {{skill-name}} |
| 150 | |
| 151 | Files created: |
| 152 | {{path}}/SKILL.md ({{lines}} lines) |
| 153 | {{path}}/README.md ({{lines}} lines) |
| 154 | {{path}}/reference/examples.md ({{lines}} lines) |
| 155 | |
| 156 | Install: /plugin install (copy to your skills directory) |
| 157 | Publish: clawhub publish {{path}} |
| 158 | |
| 159 | Source: MEMORY.md entries at lines {{n, m, ...}} (retained — the skill is portable, the memory is project-specific) |
| 160 | |
| 161 | |
| 162 | ## Examples |
| 163 | |
| 164 | ### Extracting a debugging pattern |
| 165 | |
| 166 | |
| 167 | /si:extract "Fix for Docker builds failing on Apple Silicon with platform mismatch" |
| 168 | |
| 169 | |
| 170 | Creates `docker-m1-fixes/SKILL.md` with: |
| 171 | The platform mismatch error message |
| 172 | Three solutions (build flag, Dockerfile, docker-compose) |
| 173 | Trade-offs table |
| 174 | Performance note about Rosetta 2 emulation |
| 175 | |
| 176 | ### Extracting a workflow pattern |
| 177 | |
| 178 | |
| 179 | /si:extract "Always regenerate TypeScript API client after modifying OpenAPI spec" |
| 180 | |
| 181 | |
| 182 | Creates `api-client-regen/SKILL.md` with: |
| 183 | Why manual regen is needed |
| 184 | The exact command sequence |
| 185 | CI integration snippet |
| 186 | Common failure modes |
| 187 | |
| 188 | ## Tips |
| 189 | |
| 190 | Extract patterns that would save time in a *different* project |
| 191 | Keep skills focused — one problem per skill |
| 192 | Include the error messages people would search for |
| 193 | Test the skill by reading it without the original context — does it make sense? |
| 194 |
Discussion
Browse more free Claude skills.