|
| 1 | +# Skill Extractor |
| 2 | + |
| 3 | +Analyze Claude Code conversation history and extract reusable patterns into component files — Skills, Commands, or Agents. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +``` |
| 8 | +/plugin marketplace add DropFan/claude-code-plugins |
| 9 | +/plugin install skill-extractor@tiger-plugins |
| 10 | +``` |
| 11 | + |
| 12 | +## Commands |
| 13 | + |
| 14 | +### `/skill-extractor:extract [type] [--name <component-name>]` |
| 15 | + |
| 16 | +Scan the current conversation for extractable patterns (methodologies, operation sequences, decision workflows), then interactively confirm the type, name, and save location before generating the component file. |
| 17 | + |
| 18 | +- `type` — `skill`, `command`, `agent`, or `auto` (default: `auto`, analyzes and recommends a type) |
| 19 | +- `--name <component-name>` — kebab-case name for the generated component |
| 20 | + |
| 21 | +``` |
| 22 | +/skill-extractor:extract # Auto-detect candidates |
| 23 | +/skill-extractor:extract skill # Extract as a Skill |
| 24 | +/skill-extractor:extract command --name deploy-flow # Extract as a Command with a given name |
| 25 | +``` |
| 26 | + |
| 27 | +Generated files can be saved to `~/.claude/skills/`, `~/.claude/commands/`, the project's `.claude/` directory, or a plugin directory. The content is previewed for approval before writing, and sensitive data (API keys, tokens, personal paths, credentials) is filtered out during extraction. |
| 28 | + |
| 29 | +## Skill |
| 30 | + |
| 31 | +The **extract-component** skill triggers on phrases like "extract skill", "save as command", "turn this into a skill", "提取技能", "保存为技能", and routes to the `/skill-extractor:extract` command with the user's intent. |
| 32 | + |
| 33 | +## Configuration |
| 34 | + |
| 35 | +Optionally create `.claude/skill-extractor.local.md` in your project root: |
| 36 | + |
| 37 | +```markdown |
| 38 | +--- |
| 39 | +default_output_dir: ~/.claude/skills/ |
| 40 | +default_type: auto |
| 41 | +stop_hook: true |
| 42 | +--- |
| 43 | +``` |
| 44 | + |
| 45 | +| Setting | Default | Description | |
| 46 | +|---------|---------|-------------| |
| 47 | +| `default_output_dir` | `~/.claude/skills/` | Default save directory | |
| 48 | +| `default_type` | `auto` | Default component type (`auto` / `skill` / `command` / `agent`) | |
| 49 | +| `stop_hook` | `true` | Whether the Stop hook (if enabled, see below) makes suggestions in this project | |
| 50 | + |
| 51 | +Priority: command arguments > settings file > built-in defaults. |
| 52 | + |
| 53 | +## Hooks (disabled by default) |
| 54 | + |
| 55 | +The plugin ships an optional `Stop` hook (`hooks/stop-hook.sh`) that scores the session transcript when a session ends — based on user turns, files created/edited, and subagent tasks — and suggests running `/skill-extractor:extract` for methodology-rich sessions. |
| 56 | + |
| 57 | +The hook is **disabled by default**: the configuration ships as `hooks/hooks.json.disabled`. To enable it, rename `hooks/hooks.json.disabled` to `hooks/hooks.json` in the installed plugin directory and restart the session. To silence it for a single project while enabled, set `stop_hook: false` in `.claude/skill-extractor.local.md`. |
| 58 | + |
| 59 | +## License |
| 60 | + |
| 61 | +MIT |
0 commit comments