From skill-extractor
Extracts reusable skills from work sessions. Use when: (1) a non-obvious problem was solved worth preserving, (2) a pattern was discovered that would help future sessions, (3) a workaround or debugging technique needs documentation. Manual invocation only via /skill-extractor command - no automatic triggers or hooks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skill-extractor:skill-extractorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Extracts reusable knowledge from work sessions and saves it as a Claude Code skill.
Extracts reusable knowledge from work sessions and saves it as a Claude Code skill.
Use these prompts to identify knowledge worth extracting:
If you can't answer at least two of these with something non-trivial, it's probably not worth extracting.
/skill-extractor [--project] [context hint]
~/.claude/skills/[name]/SKILL.md--project: saves to .claude/skills/[name]/SKILL.md/skill-extractor the cyclic data DoS fix)Before creating a new skill, search for existing ones that might cover the same ground:
# Check user skills
ls ~/.claude/skills/
# Check project skills
ls .claude/skills/
# Search by keyword
grep -r "keyword" ~/.claude/skills/ .claude/skills/ 2>/dev/null
If a related skill exists, consider updating it instead of creating a new one. See skill-lifecycle.md for guidance on when to update vs create.
If $ARGUMENTS contains a context hint (e.g., "the cyclic data DoS fix"), use it to focus the extraction on that specific topic.
Analyze the conversation to identify:
Present a brief summary to the user:
I identified this potential skill:
**Problem:** [Brief description]
**Key insight:** [What made it non-obvious]
**Triggers:** [Error messages or symptoms]
Evaluate the candidate skill against these criteria:
| Criterion | Pass? | Evidence |
|---|---|---|
| Reusable - Helps future tasks, not just this instance | [Why] | |
| Non-trivial - Required discovery, not docs lookup | [Why] | |
| Verified - Solution actually worked | [Evidence] | |
| Specific triggers - Exact error messages or scenarios | [What they are] | |
| Explains WHY - Trade-offs and judgment, not just steps | [How] | |
| Value-add - Teaches judgment, not just facts Claude could look up | [How] |
Present assessment to user and ask: "Proceed with extraction? [yes/no]"
The user decides whether to proceed regardless of how many criteria pass. Respect their judgment - if they say yes, extract; if no, skip.
Ask the user:
--project)If the topic involves a specific library or framework:
Skip research for:
Use the template from skill-template.md.
Quality standards: Follow quality-guide.md to ensure the skill provides lasting value. Key points:
Run through the validation checklist in skill-template.md. If validation fails, fix the issues before saving.
Create the directory and save:
~/.claude/skills/[name]/SKILL.md.claude/skills/[name]/SKILL.mdReport success:
Skill saved to: [path]
The skill will be available in future sessions when the context matches:
"[first line of description]"
When extracting, consider how the new knowledge relates to existing skills:
Combine or separate?
Update vs create:
Cross-referencing:
Skills aren't permanent. See skill-lifecycle.md for guidance on:
If you catch yourself thinking any of these, do NOT extract:
Scenario: User discovered that an AST visitor crashes with RecursionError when analyzing serialized files containing cyclic references (e.g., a list that contains itself).
Identified learning:
Generated skill name: cyclic-ast-visitor-hardening
Key sections:
visited: set parameter, check before recursingCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub botnotstrawberry/trailofbits-skills-curated --plugin skill-extractor