extract
alirezarezvani/claude-skills
Package recurring patterns and debugging solutions into portable, reusable skills.
What is extract?
The extract skill transforms proven patterns, debugging solutions, and recurring fixes into standalone SKILL.md packages that can be installed across projects. Use it when you've solved a non-obvious problem multiple times or want to preserve a complex solution for future reuse.
- Converts patterns from project memory or user description into portable skill packages
- Generates SKILL.md with frontmatter, problem statement, and multiple solution approaches
- Creates README.md and optional reference documentation with examples
- Validates skill names against reserved fragments (claude, anthropic) and enforces naming conventions
- Supports interactive mode, custom naming, custom output directories, and dry-run preview
- Includes quality gates to ensure solutions are self-contained and copy-pasteable
How to install extract
npx skills add https://github.com/alirezarezvani/claude-skills --skill extractHow to use extract
- 1.Run /si:extract with a pattern description (e.g., /si:extract "Docker builds failing on Apple Silicon")
- 2.Answer up to 2 clarifying questions about the problem scope and desired examples
- 3.Confirm the generated skill name (must avoid reserved fragments like 'claude' or 'anthropic')
- 4.Review the generated SKILL.md, README.md, and reference files in the output directory
- 5.Install the skill in your project or publish it via clawhub publish
Use cases
- Save a Docker build fix that works across multiple projects as a reusable skill
- Package a complex multi-step debugging workflow into a skill for team reuse
- Extract a CI/CD pattern or configuration template discovered through trial-and-error
- Preserve non-obvious API client regeneration or build process steps as portable documentation
- Convert project-specific memory entries into broadly applicable skills for installation elsewhere
- Developers who solve the same problems repeatedly across projects
- Teams wanting to standardize recurring fixes and patterns
- Anyone building a personal library of reusable debugging solutions
- Projects using Claude Code or Cursor with skill-based workflows
extract FAQ
Extract when the pattern is recurring (appears in 2+ projects), non-obvious (required real debugging), broadly applicable (not tied to one codebase), complex (multi-step and easy to forget), or explicitly requested by a user.
Use lowercase with hyphens (e.g., docker-m1-fixes). Avoid reserved fragments 'claude' and 'anthropic'. For Claude Code-specific skills, use the cc- prefix (e.g., cc-settings instead of claude-code-settings).
Yes, use the --output flag: /si:extract <pattern> --output ./skills/
It creates SKILL.md (main skill with frontmatter), README.md (human-readable overview), and optionally reference/examples.md (concrete examples and edge cases).
Yes, use the --dry-run flag to preview without actually creating files.
Full instructions (SKILL.md)
Source of truth, from alirezarezvani/claude-skills.
name: "extract" 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."
/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?
Related skills
More from alirezarezvani/claude-skills and the wider catalog.

fda-consultant-specialist
FDA regulatory consultant for medical device companies. Provides 510(k)/PMA/De Novo pathway guidance, QMSR (21 CFR 820, which incorporates ISO 13485:2016 by reference since 2026-02-02; formerly QSR) compliance, HIPAA assessments, and device cybersecurity. Use when user mentions FDA submission, 510(k), PMA, De Novo, QMSR, QSR, ISO 13485 for FDA, premarket, predicate device, substantial equivalence, HIPAA medical device, or FDA cybersecurity.

finance-skills
Router for financial-analyst and saas-metrics-coach skills—pick the right finance analysis tool for your request.

financial-analyst
Performs financial ratio analysis, DCF valuation, budget variance analysis, and rolling forecast construction for strategic decision-making. Use when analyzing financial statements, building valuation models, assessing budget variances, or constructing financial projections and forecasts. Also applicable when users mention financial modeling, cash flow analysis, company valuation, financial projections, or spreadsheet analysis.

fix
Diagnose and fix failing or flaky Playwright tests using a systematic taxonomy.

gcp-cloud-architect
Design GCP architectures for startups and enterprises. Use when asked to design Google Cloud infrastructure, deploy to GKE or Cloud Run, configure BigQuery pipelines, optimize GCP costs, or migrate to GCP. Covers Cloud Run, GKE, Cloud Functions, Cloud SQL, BigQuery, and cost optimization.

gdpr-dsgvo-expert
GDPR and German DSGVO compliance automation. Scans codebases for privacy risks, generates DPIA documentation, tracks data subject rights requests with Art. 12(3) one-month deadlines. Use when running GDPR compliance assessments, privacy audits, data protection planning, DPIA generation, or data subject rights (DSAR) management (e.g., 'check this service for GDPR risks', 'track an access request deadline'). Final compliance determinations route to the DPO or legal counsel.