--- name: skill-factory description: > Meta-skill for managing automatically detected workflows. Review proposed skills, inspect detected patterns, and turn your repeated tool-call sequences into reusable Copilot CLI agent skills. Use /skill-factory review to see what's ready. argument-hint: '[review|propose|list|status|save |dismiss |clear]' --- # 🏭 Skill Factory > **The meta-skill that creates skills.** > Automatically watches your workflows and turns them into reusable agent skills. ## Commands When the user types `/skill-factory` (with or without arguments), follow this guide: ### `/skill-factory review` Show all proposed skills ready for review. For each one: 1. Read the `SKILL.md` in `~/.copilot/skills/skill-factory/proposed//SKILL.md` 2. Read the `.proposal.json` for metadata (session count, occurrences) 3. Present a summary to the user and ask if they want to: - **Accept** — move to `~/.copilot/skills//` (makes it active) - **Edit** — open the SKILL.md for editing first - **Dismiss** — archive to `~/.copilot/skills/skill-factory/dismissed/` - **Skip** — leave as-is for later ### `/skill-factory propose` Force analysis of current session patterns. Read the pattern database: - `~/.copilot/skills/skill-factory/.data/pattern-db.json` (or in the plugin's data directory) - Show the top 5 most frequent patterns (by session count) - For each, describe the tool-call sequence and ask if the user wants to generate a skill ### `/skill-factory list` List all skills generated by Skill Factory (both proposed and accepted): - `~/.copilot/skills/skill-factory/proposed/` — proposed - `~/.copilot/skills//` — accepted (look for `.factory.json` marker) ### `/skill-factory status` Show Skill Factory statistics: - Number of sessions tracked - Number of patterns detected - Number of proposed/accepted/dismissed skills - Read from `~/.copilot/skills/skill-factory/.data/pattern-db.json` ### `/skill-factory save ` Save the last proposal with a custom name. Used when the user wants to rename a proposed skill. ### `/skill-factory dismiss ` Dismiss a proposed skill. Moves it to `~/.copilot/skills/skill-factory/dismissed/`. ### `/skill-factory clear` Clear the pattern database and all proposed skills. Asks for confirmation first. ## Data Locations | Data | Path | |---|---| | Pattern database | `~/.copilot/skills/skill-factory/.data/pattern-db.json` | | Proposed skills | `~/.copilot/skills/skill-factory/proposed//` | | Accepted skills | `~/.copilot/skills//` (with `.factory.json` marker) | | Dismissed skills | `~/.copilot/skills/skill-factory/dismissed//` | | Session logs | `~/.copilot/skills/skill-factory/.data/sessions/.jsonl` | ## Accepting a Skill When the user accepts a proposed skill: 1. Read the `SKILL.md` from `proposed//` 2. Create `~/.copilot/skills//SKILL.md` with the content 3. Create `~/.copilot/skills//.factory.json` with: ```json { "generatedBy": "skill-factory", "generatedAt": "", "patternKey": "" } ``` 4. Remove from `proposed//` 5. Tell the user the skill is now active and can be invoked with `/` ## Dismissing a Skill When the user dismisses a proposed skill: 1. Move `proposed//` to `dismissed//` 2. Update the pattern in the DB to mark it as dismissed ## Important Notes - The plugin (`copilot-skill-factory`) handles automatic pattern detection via hooks. - This skill handles user interaction — reviewing, accepting, editing, dismissing. - Always confirm before deleting or moving files. - If the data directory doesn't exist yet, tell the user the plugin needs to run for at least one session first. - Proposed skills are **suggestions** — they may need editing before they're useful. - Encourage the user to customize accepted skills with specific instructions, pitfalls, and examples.