Files
droideparanoico 94cfd80dd0 Initial commit: copilot-skill-factory v0.1.0
Meta-plugin for GitHub Copilot CLI that watches workflows and
auto-generates reusable agent skills.

- postToolUse hook: fingerprints and logs tool calls per session
- sessionEnd hook: sliding-window pattern detection across sessions
- sessionStart hook: injects context about proposed skills
- /skill-factory slash command for reviewing/managing skills
- 13 passing tests validating observer, analyzer, and edge cases

Inspired by hermes-skill-factory (Romanescu11/hermes-skill-factory)
2026-06-19 08:22:11 +00:00

3.8 KiB
Executable File

name, description, argument-hint
name description argument-hint
skill-factory 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. [review|propose|list|status|save <name>|dismiss <name>|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/<name>/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/<name>/ (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/<name>/ — 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 <name>

Save the last proposal with a custom name. Used when the user wants to rename a proposed skill.

/skill-factory dismiss <name>

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/<name>/
Accepted skills ~/.copilot/skills/<name>/ (with .factory.json marker)
Dismissed skills ~/.copilot/skills/skill-factory/dismissed/<name>/
Session logs ~/.copilot/skills/skill-factory/.data/sessions/<id>.jsonl

Accepting a Skill

When the user accepts a proposed skill:

  1. Read the SKILL.md from proposed/<name>/
  2. Create ~/.copilot/skills/<name>/SKILL.md with the content
  3. Create ~/.copilot/skills/<name>/.factory.json with:
    { "generatedBy": "skill-factory", "generatedAt": "<ISO timestamp>", "patternKey": "<key>" }
    
  4. Remove from proposed/<name>/
  5. Tell the user the skill is now active and can be invoked with /<name>

Dismissing a Skill

When the user dismisses a proposed skill:

  1. Move proposed/<name>/ to dismissed/<name>/
  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.