This skill should be used when the user asks to 'extract a skill from a conversation', 'convert conversation to skill', 'create skill from chat history', 'generate skill from session', or mentions...
Transform Claude Code conversations into reusable skills by extracting wisdom, instructions, problems, and solutions using Fabric AI patterns.
Conversations contain valuable workflows buried in noise (trial & error, exploration, backtracking). This skill extracts the reusable essence and converts it into a well-structured SKILL.md.
Conversations are stored as JSONL in Claude Code project directories:
~/.claude/projects/{project-path-encoded}/{session-id}.jsonl
To find conversations:
# List recent conversations for a project
ls -lht ~/.claude/projects/{project-path}/*.jsonl | head -10
# Find today's conversations
find ~/.claude/projects/{project-path} -name "*.jsonl" -newermt "today"
Convert JSONL to readable text using the parse script:
bash scripts/parse_conversation.sh /path/to/conversation.jsonl > /tmp/conversation.txt
The script extracts:
Apply multiple Fabric patterns in parallel to extract different aspects:
# Extract insights and wisdom
cat /tmp/conversation.txt | fabric -p extract_wisdom --stream > /tmp/wisdom.md
# Extract actionable steps
cat /tmp/conversation.txt | fabric -p extract_instructions --stream > /tmp/instructions.md
# Extract the core problem
cat /tmp/conversation.txt | fabric -p extract_primary_problem --stream > /tmp/problem.md
# Extract the solution that worked
cat /tmp/conversation.txt | fabric -p extract_primary_solution --stream > /tmp/solution.md
Run in parallel for speed:
cat /tmp/conversation.txt | fabric -p extract_wisdom > /tmp/wisdom.md &
cat /tmp/conversation.txt | fabric -p extract_instructions > /tmp/instructions.md &
cat /tmp/conversation.txt | fabric -p extract_primary_problem > /tmp/problem.md &
cat /tmp/conversation.txt | fabric -p extract_primary_solution > /tmp/solution.md &
wait
Merge extractions into a SKILL.md template. The skill should include:
---
name: [skill-name-from-problem]
description: "[One-line description of what this skill solves]"
---
# [Skill Title]
[Brief summary from extract_primary_problem]
## Problem Pattern
[When to use this skill - extracted from problem analysis]
## Steps
[Numbered steps from extract_instructions - filtered to critical path only]
## Key Insights
[Bullet points from extract_wisdom]
## Common Mistakes
[Gotchas identified during conversation]
## References
[Any URLs or files that were useful]
After generating the skill:
| Pattern | Extracts | Use For |
|---|---|---|
extract_wisdom |
Insights, learnings | Key Insights section |
extract_instructions |
Step-by-step procedures | Steps section |
extract_primary_problem |
Core problem statement | Problem Pattern section |
extract_primary_solution |
What actually worked | Solution summary |
create_recursive_outline |
Hierarchical breakdown | Complex workflows |
summarize |
Brief overview | Skill description |
Full extraction pipeline:
# 1. Parse conversation
bash scripts/parse_conversation.sh /path/to/session.jsonl > /tmp/conv.txt
# 2. Extract in parallel
cat /tmp/conv.txt | fabric -p extract_wisdom > /tmp/wisdom.md &
cat /tmp/conv.txt | fabric -p extract_instructions > /tmp/steps.md &
cat /tmp/conv.txt | fabric -p extract_primary_problem > /tmp/problem.md &
cat /tmp/conv.txt | fabric -p extract_primary_solution > /tmp/solution.md &
wait
# 3. Review extractions
cat /tmp/problem.md
cat /tmp/solution.md
cat /tmp/steps.md
cat /tmp/wisdom.md
# 4. Generate skill (manually combine or use template)
scripts/parse_conversation.sh - Convert JSONL to readable textscripts/extract_skill.sh - Full extraction pipelinereferences/fabric_patterns.md - Detailed guide to Fabric patternsreferences/skill_template.md - SKILL.md template with all sectionsexamples/example_extraction.md - Complete example of extraction process