$npx -y skills add Bennyoooo/skillmaxxing --skill create-skillCreate a new reusable agent skill — either explicitly ("turn this workflow into a skill") or by reflecting on a just-completed task that you might do again. Synthesizes SKILL.md, scripts, and a real eval scaffold, then stages it for review before committing. Use when the user ask
| 1 | # create-skill |
| 2 | |
| 3 | Crystallize a workflow into a durable, tested skill. The CLI is model-agnostic: **you** synthesize the content (name, body, scripts, real eval tasks); the CLI stages, smoke-tests, and commits it atomically. |
| 4 | |
| 5 | ## Two entry points |
| 6 | |
| 7 | 1. **Explicit** — the user says "turn X into a skill." |
| 8 | 2. **Reflection** — after completing a non-trivial task, consider whether it is reusable. Fire this **sparingly** (review fatigue is real): only when the work was non-trivial (several steps, a fixed bug, a discovered workflow) AND plausibly recurs. When in doubt, don't interrupt. |
| 9 | |
| 10 | ## Step 0 — Prefer update over create |
| 11 | |
| 12 | Before creating, search for an existing skill that already covers this: |
| 13 | |
| 14 | ```bash |
| 15 | scripts/discover.sh "<capability>" --json |
| 16 | ``` |
| 17 | |
| 18 | If a close match exists, **update or optimize it** instead of making a near-duplicate. The skillify step also runs this check and will refuse with a suggestion unless you pass `--new`. |
| 19 | |
| 20 | ## Step 1 — Synthesize a draft |
| 21 | |
| 22 | Write a draft JSON file. The eval scaffold MUST contain real, scorable tasks (not a stub) — pick a scorer per task: `exact`/`normalized`/`code-exec`/`success-signal` for deterministic outputs, `agent-judge` (with a `rubric`) for prose/judgment skills. |
| 23 | |
| 24 | ```json |
| 25 | { |
| 26 | "name": "release-notes", |
| 27 | "description": "Draft release notes from a git log range.", |
| 28 | "body": "# release-notes\n\n...instructions...\n", |
| 29 | "tools": ["Bash"], |
| 30 | "scripts": [{ "path": "scripts/changelog.sh", "content": "#!/usr/bin/env bash\n..." }], |
| 31 | "eval": { |
| 32 | "skill": "release-notes", |
| 33 | "tasks": [ |
| 34 | { "id": "happy", "input": "v1.0..v1.1", "scorer": "agent-judge", "rubric": "Groups changes by type; no raw SHAs; user-facing tone." } |
| 35 | ] |
| 36 | }, |
| 37 | "smokeTest": ["bash", "scripts/changelog.sh", "--help"] |
| 38 | } |
| 39 | ``` |
| 40 | |
| 41 | ## Step 2 — Stage (with the human approval gate) |
| 42 | |
| 43 | ```bash |
| 44 | scripts/skillify.sh --draft draft.json # stage; smoke test skipped unless authorized |
| 45 | scripts/skillify.sh --draft draft.json --allow-exec # stage AND run the smoke test in the sandbox |
| 46 | ``` |
| 47 | |
| 48 | Only pass `--allow-exec` after the user has reviewed the generated scripts — a freshly synthesized skill is `trusted: false`, and running its code is a deliberate, user-authorized step. Show the staged `SKILL.md` and scripts to the user and get explicit approval before committing. |
| 49 | |
| 50 | ## Step 3 — Commit |
| 51 | |
| 52 | ```bash |
| 53 | scripts/skillify.sh --commit <name> [--global] [--agent <name>] |
| 54 | ``` |
| 55 | |
| 56 | This installs the skill (`trusted: false`) and clears the draft. Staged drafts persist across sessions — resume with `--list-drafts` then `--commit`. |
| 57 | |
| 58 | ## Safety |
| 59 | |
| 60 | - The smoke-test/exec gate is yours to honor: never pass `--allow-exec` without fresh user authorization for the specific scripts. |
| 61 | - Do not commit a skill whose smoke test failed; fix the draft and re-stage. |