$npx -y skills add zakelfassi/skills-driven-development --skill skillforgeCreate or update a reusable agent skill. Use when you notice a repeated pattern, when a workflow should be persisted for future sessions, or when asked to forge/create/scaffold a new skill.
| 1 | # SkillForge |
| 2 | |
| 3 | Create well-formed, spec-compliant skills from observed patterns. |
| 4 | |
| 5 | ## When to Forge |
| 6 | |
| 7 | ✅ **Forge when:** |
| 8 | - You've done the same sequence 2-3 times in a session |
| 9 | - A project convention isn't documented anywhere |
| 10 | - You solved a hard problem with a reusable solution |
| 11 | - Someone asks you to create a skill |
| 12 | |
| 13 | ❌ **Don't forge when:** |
| 14 | - It's a one-time task |
| 15 | - An existing skill already covers it (update instead) |
| 16 | - The "skill" is just a single command (use a script alias) |
| 17 | |
| 18 | ## Steps |
| 19 | |
| 20 | ### 1. Name the pattern |
| 21 | - What problem does this skill solve? |
| 22 | - What triggers it? (be specific — the `description` field is the discovery surface) |
| 23 | - What are the inputs and outputs? |
| 24 | |
| 25 | ### 2. Choose a name |
| 26 | - `kebab-case`, 1-64 characters |
| 27 | - Verb-led when possible: `deploy-preview`, `scaffold-component`, `triage-bug` |
| 28 | - One responsibility per skill |
| 29 | |
| 30 | ### 3. Create the skill directory |
| 31 | |
| 32 | ```bash |
| 33 | mkdir -p .claude/skills/<skill-name> |
| 34 | ``` |
| 35 | |
| 36 | (Or `.codex/skills/`, `.cursor/skills/`, `.github/skills/`, etc. — match the harness. In Claude Code this plugin targets `.claude/skills/`.) |
| 37 | |
| 38 | ### 4. Write SKILL.md |
| 39 | |
| 40 | Use this skeleton: |
| 41 | |
| 42 | ```markdown |
| 43 | --- |
| 44 | name: <skill-name> |
| 45 | description: <what it does>. Use when <triggers>. |
| 46 | metadata: |
| 47 | forged-by: <agent-id> |
| 48 | forged-from: <session-or-context> |
| 49 | forged-reason: "<why this was created>" |
| 50 | status: active |
| 51 | --- |
| 52 | |
| 53 | # <Skill Name> |
| 54 | |
| 55 | ## Inputs |
| 56 | - ... |
| 57 | |
| 58 | ## Steps |
| 59 | 1. ... |
| 60 | 2. ... |
| 61 | |
| 62 | ## Conventions |
| 63 | - Project-specific patterns that apply |
| 64 | |
| 65 | ## Edge Cases |
| 66 | - Known gotchas or special handling |
| 67 | ``` |
| 68 | |
| 69 | ### 5. Add scripts (optional) |
| 70 | |
| 71 | If the skill involves file generation or automation: |
| 72 | |
| 73 | ``` |
| 74 | .claude/skills/<skill-name>/ |
| 75 | ├── SKILL.md |
| 76 | ├── scripts/ |
| 77 | │ └── run.sh # Executable automation |
| 78 | └── references/ |
| 79 | └── conventions.md # Detailed reference (keeps SKILL.md lean) |
| 80 | ``` |
| 81 | |
| 82 | ### 6. Register the skill |
| 83 | |
| 84 | Update `.skills-registry.md` at the **project root** (same level as `.claude/`). Create it if it doesn't exist: |
| 85 | |
| 86 | ```markdown |
| 87 | | <skill-name> | local | <today> | 1 | <description> | |
| 88 | ``` |
| 89 | |
| 90 | If the project uses the machine-readable registry (`.skills-registry.json`), update it too — the `skdd` CLI handles both formats automatically. |
| 91 | |
| 92 | ## Updating an Existing Skill |
| 93 | |
| 94 | When you use a skill and encounter something it doesn't cover: |
| 95 | |
| 96 | 1. Add the new edge case or step to the existing SKILL.md |
| 97 | 2. If the skill is getting too long (>200 lines), split it |
| 98 | 3. Update `last-used` and increment `usage-count` in the registry |
| 99 | |
| 100 | ## Quality Checklist |
| 101 | |
| 102 | Before committing a new skill: |
| 103 | |
| 104 | - [ ] `name` is kebab-case, ≤64 chars |
| 105 | - [ ] `description` includes what it does AND when to use it (plus trigger language like "Use when …") |
| 106 | - [ ] `name` matches the parent directory name |
| 107 | - [ ] Steps are numbered and actionable |
| 108 | - [ ] No hardcoded paths, secrets, or environment-specific values |
| 109 | - [ ] SKILL.md is under 200 lines (move details to `references/`) |
| 110 | - [ ] Registered in `.skills-registry.md` |