name: make-skills
Transform repeated workflows into reusable, production-ready skills using a systematic 3-model iterative approach.
When to Create a Skill:
✅ Task repeated 3+ times
✅ Multi-step workflow that could be standardized
✅ Common bug pattern with known solution
✅ User says "we keep doing X"
3-Model Process:
1. Haiku (30s): Quick 70% draft
2. Sonnet (2m): Add real examples, 90% complete
3. Opus (5m): Polish to 100% production-ready
Essential Commands:
git log --all --grep="pattern" --oneline # Find patterns
grep -r "keyword" --include="*.{js,py,go}" # Search code
ls .claude/skills/ # Check existing skills
# User triggers:
- "create a new skill for..."
- "make a skill based on..."
- "we keep doing X, let's make a skill"
- "look through history and suggest skills"
# Proactive triggers (suggest to user):
- Same debugging pattern appears 3+ times in git history
- User repeatedly asks for same type of help
- Complex multi-step workflow happens frequently
Based on successful code-review and state-fixer skill creation:
Step 1: Pattern Mining
Model: Any (Sonnet recommended)
↓
Step 2: Template Creation
Model: Any (Sonnet recommended)
↓
🔄 SWITCH TO HAIKU
↓
Step 3: Quick Draft
Model: Haiku (~30 seconds)
Output: 70% complete skill
↓
🔄 SWITCH TO SONNET
↓
Step 4: Enhancement
Model: Sonnet (~2 minutes)
Output: 90% complete with real examples
↓
🔄 SWITCH TO OPUS
↓
Step 5: Production Polish
Model: Opus (~5 minutes)
Output: 100% production-ready skill
✅ DONE!
💡 Use current model (any model is fine for research)
Goal: Find repeated workflows in conversation and git history
Universal Pattern Discovery Commands:
# === Git History Mining ===
# Find repeated problem patterns
git log --all --oneline | grep -i "fix\|bug\|error\|issue" | head -30
# Search for specific domains
git log --all --grep="[KEYWORD]" --oneline # Replace with: auth, api, state, etc
# Analyze recent work patterns
git log --oneline -50 | cut -d' ' -f2- | sort | uniq -c | sort -rn
# Find files changed together (coupling)
git log --all --name-only --format="" | sort | uniq -c | sort -rn | head -20
# === Codebase Pattern Analysis ===
# Language-agnostic searches
find . -type f -name "*.{js,ts,py,java,go,rb}" -exec grep -l "TODO\|FIXME\|HACK" {} \;
# Find error handling patterns
grep -r "catch\|except\|rescue\|error" --include="*.{js,ts,py,java,go,rb}" | head -20
# Find test patterns
find . -type f -name "*test*" -o -name "*spec*" | head -20
# === Conversation Pattern Mining ===
# Check existing skills
ls -la .claude/skills/
find .claude/skills -name "SKILL.md" -exec head -20 {} \;
# Recent conversation topics (if logs exist)
# Look for repeated questions, errors, workflows
Universal Questions to Ask User:
Pattern Categories to Look For:
1. Debugging Patterns
- Specific bug types that recur (state, async, memory leaks)
- Error patterns in logs
- Common root causes
2. Development Workflows
- Feature implementation → review → test cycles
- Refactoring patterns
- Migration/upgrade patterns
3. Testing Patterns
- Test creation workflows
- Validation sequences
- Performance testing routines
4. Operations Patterns
- Deployment workflows
- Monitoring/debugging production issues
- Configuration management
5. Code Quality Patterns
- Review checklists
- Performance optimization workflows
- Security audit patterns
💡 Use current model (any model is fine for planning)
Goal: Decide on skill structure and content outline
Basic Structure:
---
name: skill-name
description: Short description with triggers
---
# Skill Name
Brief overview of what this skill does.
## 🎯 Quick Start
- When to use
- User triggers
- Proactive usage
## Common Patterns / Bug Checklist
- Pattern 1 with example
- Pattern 2 with example
## Step-by-Step Workflow
1. Step 1
2. Step 2
...
## Real Examples from Project
### Example 1: [Commit hash]
- Problem:
- Solution:
- Code:
## Testing / Verification
- How to test
- What to check
## Related Skills
- Other skills that complement this
🔄 ACTION: Tell the user:
✋ PAUSE: Switch to Haiku model now
Run: /model haiku
Then ask me:
"Create a skill for [SKILL_NAME] based on these patterns:
[List 3-5 repeated patterns from Step 1]
Structure:
- Quick Start section
- Common patterns (3-5)
- Basic workflow (3-5 steps)
- 1-2 simple examples
Keep it concise, focus on the most common cases."
What Haiku is good at:
What to skip in Haiku:
When Haiku is done: Save the draft, then proceed to Step 4.
🔄 ACTION: Tell the user:
✋ PAUSE: Switch to Sonnet model now
Run: /model sonnet
Then ask me:
"Enhance this skill with:
1. Real commit examples from git history (search: git log --all --grep='...')
2. Actual code snippets from the project
3. 'Before/After' comparisons from real bugs
4. Better organization and formatting
5. More detailed workflow steps
Read relevant files if needed to get accurate examples.
Base it on actual project code, not hypothetical examples.
Here's the Haiku draft to enhance:
[Paste the Haiku draft here]"
What Sonnet is good at:
git logWhen Sonnet is done: Review the enhanced skill, then proceed to Step 5.
What Sonnet Adds - Real Examples:
### Before Sonnet (Haiku version):
"Fix array mutation bugs by creating copies before sorting"
### After Sonnet Enhancement:
#### 🔴 Array Mutation Bug (Found in 3 projects)
```javascript
// BEFORE (BUG - Mutates original array):
const key = generateKey(items.sort()); // ❌ Mutates 'items'
const filtered = items.filter(x => x > 0).sort(); // ❌ OK filter, bad sort
// AFTER (FIXED - Safe immutable operations):
const key = generateKey([...items].sort()); // ✅ Sorts copy
const filtered = [...items].filter(x => x > 0).sort(); // ✅ Full copy chain
// PATTERN: Always spread [...array] before mutating operations
### Step 5: Opus Polish (Production Ready)
**🔄 ACTION: Tell the user:**
✋ PAUSE: Switch to Opus model now
Run: /model opus
Then ask me:
"Polish this skill to production quality:
1. Add edge cases and gotchas
2. Add troubleshooting section
3. Verify all commit hashes are correct
4. Add 'Related Skills' section
5. Add 'Anti-Patterns' (what NOT to do)
6. Ensure examples are complete and accurate
7. Add metrics/success criteria
8. Review for consistency and completeness
Make this the definitive guide for this workflow.
Here's the Sonnet-enhanced version to polish:
[Paste the Sonnet version here]"
**What Opus is good at:**
- Comprehensive edge cases (~5 minutes)
- Troubleshooting guides
- Quality assurance
- Completeness check
- Professional documentation
**When Opus is done:**
✅ Your skill is production-ready!
💾 Save to `.claude/skills/[skill-name]/SKILL.md`
🧪 Test it on a real problem
📊 Track usage metrics
**Example - What Opus added to code-review:**
```markdown
## 🚫 Anti-Patterns
| ❌ Don't | ✅ Do Instead |
|----------|---------------|
| "It should work now" | "Here's the test proving it works" |
| "Try it and see" | "Follow these numbered steps" |
| Fix all bugs at once | Fix, test, repeat for each bug |
## 📈 Success Metrics
- Bugs found in self-review: N
- Bugs fixed before user testing: N
- User-reported issues: N
- Iteration cycles: N
[action]-[target]
↓ ↓
verb noun
Examples:
- make-skills (make = action, skills = target)
- state-fixer (fix = action, state = target)
- code-review (review = action, code = target)
Pattern Discovery:
git log --all --grep="state\|redux\|context" --oneline
# Found patterns:
abc123 Fix: State not updating after API call
def456 Fix: Race condition in state updates
ghi789 Fix: localStorage sync issues with React state
Common Theme: State synchronization bugs across different storage layers
User Signals:
Resulting Skill Structure:
1. Quick diagnostic checklist
2. State flow diagram (Component → Store → Storage)
3. Common bug patterns with fixes
4. Testing strategies for state issues
Pattern Discovery:
# Conversation analysis revealed:
- 5 instances of "add API endpoint"
- 3 instances of "fix CORS issues"
- 4 instances of "handle API errors"
# Code pattern:
grep -r "fetch\|axios\|api" --include="*.{js,ts}" | wc -l
# Result: 150+ API calls across codebase
Resulting Skill Structure:
1. API endpoint creation checklist
2. Error handling patterns
3. Testing strategies (unit, integration, e2e)
4. Common pitfalls (CORS, auth, rate limits)
Pattern Discovery:
git log --all --grep="slow\|performance\|optimize" --oneline
# Found:
- Multiple commits about React re-renders
- Database query optimizations
- Bundle size reductions
User Signals:
Resulting Skill Structure:
1. Performance audit workflow
2. Measurement tools by platform
3. Common optimization patterns
4. Before/after comparison templates
Before finalizing a skill:
git show <hash>)# === Version Control Analysis ===
# Find related commits
git log --all --grep="keyword" --oneline
# See commit details
git show <commit-hash>
# Analyze commit frequency by author
git shortlog -sn --all
# Find most changed files (hotspots)
git log --all --name-only --format="" | sort | uniq -c | sort -rn | head
# === Code Pattern Search (Language Agnostic) ===
# JavaScript/TypeScript
grep -r "pattern" --include="*.{js,jsx,ts,tsx}"
# Python
grep -r "pattern" --include="*.py"
# Java/Kotlin
grep -r "pattern" --include="*.{java,kt}"
# Go
grep -r "pattern" --include="*.go"
# Ruby
grep -r "pattern" --include="*.{rb,erb}"
# General pattern search
find . -type f -exec grep -l "pattern" {} \; 2>/dev/null
# === Skill Discovery ===
# List existing skills
ls .claude/skills/
# Read all skill descriptions
find .claude/skills -name "SKILL.md" -exec head -5 {} \;
# Search for similar skills
grep -r "keyword" .claude/skills/
# Create skill directory
mkdir -p .claude/skills/new-skill-name
# Create SKILL.md
# (Use Write tool with template above)
# Check skill loads
cat .claude/skills/new-skill-name/SKILL.md
# Verify commit hashes exist
git show <hash>
# Test file paths
ls -la <path-from-skill>
Our successful pattern:
Iteration 1 (Haiku):
├─ Basic structure
├─ Simple examples
└─ Core workflow
↓ (2 hours of use)
Iteration 2 (Sonnet):
├─ Real commit examples
├─ Actual code from project
├─ Better organization
└─ More detailed steps
↓ (1 day of use)
Iteration 3 (Opus):
├─ Edge cases
├─ Troubleshooting
├─ Anti-patterns
├─ Complete documentation
└─ Production ready
Track these to know if a skill is useful:
state-fixer:
- Used: 3 times in 1 week
- Time saved: ~30 min per debug session
- Bugs caught: 4/4 state bugs in recent work
code-review:
- Used: Every major feature (5 times)
- Time saved: ~15 min per review
- Bugs caught: 3-5 bugs per review before user testing
Bad: "import-csv-file" skill for a one-time data import
Good: "data-migration" skill if you do migrations regularly
Bad: "fix-ybc-table-row-3-bug"
Good: "state-fixer" (covers all state bugs)
Bad: "Imagine you have a function foo()..."
Good: "In YBCTableDialog.tsx:1321, we had this bug..."
Bad: Create skill based on 1 occurrence
Good: Find 3+ repeated patterns in git/conversation
Bad: Write skill and never use it
Good: Use skill 2-3 times, then refine based on actual usage
---
name: skill-name
description: What it does and when to use it
---
# Skill Name
## 🎯 Quick Start
When to use this skill
## Common Patterns
1. Pattern 1
2. Pattern 2
## Workflow
1. Step 1
2. Step 2
3. Step 3
## Example
Real example from project
---
name: skill-name
description: Detailed description with trigger keywords
---
# Skill Name
One-line overview.
## 🎯 Quick Start
- User triggers
- Proactive usage
- When NOT to use
## Common Patterns / Checklist
### Pattern 1
- Example
- Code snippet
### Pattern 2
- Example
- Code snippet
## Step-by-Step Workflow
### Step 1: Name
What to do
```bash
command
What to do
Problem:
Solution:
Code:
before → after
How to verify skill worked
What NOT to do
How to measure effectiveness
## 💡 Pro Tips
### Tip 1: Start Small, Iterate
Don't try to make perfect skill on first try. Use Haiku for quick draft, use it a few times, then enhance with Sonnet/Opus.
### Tip 2: Use Real Commit Hashes
Always reference actual commits. Makes skill credible and verifiable.
```bash
# Good
### Example: Commit 3499b6e
git show 3499b6e
# Bad
### Example: Some bug we fixed
Real debugging often uses console.log. Include actual log messages used.
// From state-fixer skill:
console.log(`💾 Saved YBC edits with angle-specific key: ${storageKey}`, editData);
Use emojis for quick scanning:
Skills work better together. Reference related skills.
## 🔗 Related Skills
- Use `code-review` after implementing solution
- Use `state-fixer` if dealing with state bugs
- Use `iterative-testing` for geometric algorithms
Skills often translate across languages and frameworks. Here's how to adapt:
| Category | Works For | Example Skills |
|---|---|---|
| Debugging | All languages | state-debugger, memory-leak-finder, async-debugger |
| Testing | All languages | test-generator, coverage-analyzer, e2e-builder |
| Performance | All languages | profiler, optimizer, bottleneck-finder |
| Code Quality | All languages | code-review, refactor-assistant, smell-detector |
| Architecture | All languages | pattern-implementer, module-designer, api-builder |
JavaScript/TypeScript:
- Focus: Async/Promise patterns, React hooks, Node.js specifics
- Tools: npm, webpack, ESLint
- Patterns: Component lifecycle, state management
Python:
- Focus: Type hints, async/await, decorators
- Tools: pip, pytest, mypy
- Patterns: Context managers, generators
Java/Kotlin:
- Focus: Concurrency, streams, annotations
- Tools: Maven/Gradle, JUnit
- Patterns: Dependency injection, builders
Go:
- Focus: Goroutines, channels, interfaces
- Tools: go mod, go test
- Patterns: Error handling, context usage
Ruby:
- Focus: Metaprogramming, blocks, modules
- Tools: bundler, RSpec
- Patterns: DSLs, mixins
Stage 1: Discovery (0-3 occurrences)
├─ Pattern emerges from repeated work
├─ User mentions "we keep doing X"
└─ Initial documentation in conversation
↓
Stage 2: Formalization (3-5 uses)
├─ Create initial skill with Haiku
├─ Test on real problems
├─ Gather feedback and edge cases
└─ Enhance with Sonnet
↓
Stage 3: Production (5+ uses)
├─ Polish with Opus
├─ Add metrics and success criteria
├─ Create related skills
└─ Skill becomes standard workflow
Quantitative Metrics:
High Value Skill:
- Used: >5 times per week
- Time saved: >30 min per use
- Error reduction: >50%
- User mentions: "use the X skill"
Medium Value Skill:
- Used: 2-5 times per week
- Time saved: 10-30 min per use
- Error reduction: 20-50%
- User aware of skill
Low Value (Needs Refinement):
- Used: <2 times per week
- Time saved: <10 min
- May need broader scope or merger with another skill
Skills that combine multiple smaller skills:
deployment-pipeline:
├─ Uses: code-review
├─ Uses: test-runner
├─ Uses: performance-checker
└─ Orchestrates full deployment workflow
Highly specialized for particular domains:
ml-model-debugger:
- Dataset validation
- Training monitoring
- Hyperparameter tuning
- Model versioning
database-migration:
- Schema evolution
- Data transformation
- Rollback strategies
- Zero-downtime techniques
Skills about skills (like this one):
skill-optimizer:
- Analyzes skill usage patterns
- Suggests improvements
- Merges redundant skills
- Creates skill hierarchies
Remember: The best skills come from real repeated patterns, not anticipated needs. Let the work guide you to the skills you actually need!
Universal Truth: If you've done something manually 3+ times, it's time to make it a skill.