# Skill: skillify

Detect repeated workflows from your sessions and propose new skills.

## To install

1. Save this file to `~/.claude/skills/skillify/SKILL.md`
2. Restart Claude Code
3. Trigger with `/skillify`, `make this a skill`, or `I keep doing this`

---

---
name: skillify
description: "Detect repeated manual patterns and propose new skills. Triggers on /skillify, 'make this a skill', 'I keep doing this', or automatically when 3+ similar command sequences appear in session logs."
---

# Skillify

## Purpose
Identify repeated manual workflows and offer to turn them into reusable skills, reducing cognitive overhead and enforcing consistency.

## Data Sources
- `.claude/learning/sessions/*.jsonl` — session observations (human messages, agents run, skills used)
- `tasks/handoff-*.md` — session handoffs (workflow steps, patterns, recurring tasks)
- Current conversation context — if the user just did something repetitive

## Workflow

### On-demand: `/skillify`

1. **Scan recent sessions** — read the last 14 days of session logs from `.claude/learning/sessions/`
2. **Extract patterns:**
   - Command sequences that appear 3+ times across sessions
   - Same file sets edited repeatedly (same 3+ files touched in same order)
   - Same investigation steps followed (grep → read → edit cycle on similar targets)
   - Same skills invoked in the same sequence
   - Phrases the user repeats ("can you check X", "run the Y report")
3. **Filter out noise:**
   - Skip single-command patterns (too granular)
   - Skip patterns that already match an existing skill
   - Skip patterns unique to one session (not repeating)
4. **Propose skills** for each qualifying pattern:
   ```
   Pattern: "Read integration doc → check webhook → verify field mapping → test endpoint"
   Frequency: 4 times in 14 days
   Proposed skill: /debug-integration
   Trigger: "check integration", "verify webhook", "field mapping issue"
   ```
5. **On approval:** scaffold the skill directory + SKILL.md using the standard format:
   - `~/.claude/skills/{name}/SKILL.md` with frontmatter + workflow
   - Workflow steps derived from the observed pattern
   - Trigger words derived from the user's natural language

### Passive detection (future)

When integrated into a session-stop hook, skillify can run automatically at session end:
- Compare this session's command sequence against the pattern database
- If a 3rd occurrence is detected, surface a one-line suggestion: "You've done X three times now. Want me to `/skillify` it?"

## Rules
- Threshold is 3 occurrences — productize on the 3rd time, not the 2nd
- Never propose skills for one-off debugging sessions or exploratory work
- Proposed skills must be useful in isolation: would this skill make sense to a fresh project, or is it project-bound?
  - If yes → propose as global skill (`~/.claude/skills/`)
  - If no → propose as project skill (`.claude/skills/` in the relevant repo)
- Always show the raw pattern data before proposing — let the user verify it's a real pattern, not coincidence
- If a proposed skill overlaps with an existing one, suggest extending the existing skill instead
