--- name: skill-write description: > Use when the user wants to create a new skill from scratch, says "write a skill for X", "build a skill that does Y", or "create a SKILL.md for Z", or wants to make a workflow repeatable or shareable as a reusable command. Authors a new skill following the agentskills.io specification — scaffolds the directory structure from annotated templates, fills in SKILL.md and supporting files, then validates the result. Performs best when preceded by a grill session and domain research. Do not use to update an existing well-formed skill, write evals, or author agent definition files. allowed-tools: Bash Read Write metadata: category: factory --- ## Prerequisites Run `/grill-me` on the skill's design and research the target domain first. Share those outputs in this conversation: grill context, research docs, examples, constraints. **Before touching the filesystem, verify you have:** - [ ] A clear purpose — what specific task will this skill handle? - [ ] Trigger scenarios — when should an agent activate it, including indirect cases? - [ ] Skill name (kebab-case) and destination path If any are missing, stop and ask the user before proceeding. **Requires `/skill-audit`** — used in Step 5 for final validation. Both skills ship in the kyberforge plugin and are co-installed. If `/skill-audit` is unavailable, stop and ask the user to install the kyberforge plugin before continuing. ## Step 1 — Scaffold Run the copy script with the skill name and destination directory: ```bash bash scripts/new-skill.sh ``` Examples: ```bash bash scripts/new-skill.sh my-tool ~/.agents/skills/ bash scripts/new-skill.sh data-analyzer plugins/myplugin/skills/ ``` This creates `//` with annotated templates ready to fill in. If the destination is inside a plugin directory (path contains a `plugin.json`), read `references/deployment-modes.md` before adding any file references to SKILL.md. ## Step 2 — Fill in SKILL.md Open `//SKILL.md`. Replace every `FILL IN:` placeholder. ### Frontmatter **`name`** — already set by the scaffold script. Must exactly match the directory name. **`description`** — carries the entire triggering burden. Rules: - Imperative: "Use when..." not "This skill..." - Specific about capabilities ("parses and validates OpenAPI specs", not "helps with APIs") - Include indirect triggers: "even if the user doesn't mention X explicitly" - Add "Do not use when..." only if a near-miss skill exists that could steal activations - Hard limit: 1024 characters — count before finalizing **Optional fields** — uncomment and fill in or remove entirely: - `license` — include when distributing the skill externally - `compatibility` — include if the skill requires specific tools, runtimes, or network access - `metadata` — key-value map; use `author`, `version`, `category` - `allowed-tools` — space-separated pre-approved tools; reduces permission prompts ### Body — include only what the agent lacks Rename the placeholder section heading to one that fits the skill's structure — `## Step 1`, `## Workflow`, `## Instructions`, etc. Ask of every sentence: "Would the agent get this wrong without it?" Cut anything that answers "no." **Include:** - Non-obvious sequences or ordering constraints — the agent may skip or reorder steps without this - Domain conventions the agent cannot infer from general knowledge — this is the core value a skill adds - One default per decision point, plus one escape hatch — never a menu; menus cause the agent to pause or pick arbitrarily - Gotchas — facts that defy reasonable assumptions; the agent will get these wrong every time without them **Exclude:** - Concepts the agent already knows (what JSON is, how HTTP works) — adds tokens without changing behavior - Exhaustive option lists — pick a default; the agent doesn't benefit from choosing - Steps the agent handles independently — over-specifying leads agents to follow unproductive paths - Restatements of the description — it's already in context; repeating it wastes the token budget ### Patterns **Gotchas** — highest value; place near the top: ```markdown ## Gotchas - -