3.0 KiB
3.0 KiB
name, description
| name | description |
|---|---|
| write-a-skill | Scaffold a new Claude Code skill with the octobot conventions — frontmatter, "Use when" trigger, ≤100-line SKILL.md, optional REFERENCE/EXAMPLES. Use when the user asks to create, write, add, or draft a new skill, or wants to convert a repeated workflow into a reusable skill. |
write-a-skill
When to use
- User says "write a skill", "create a skill", "add a skill", "/write-a-skill".
- User describes a recurring workflow and asks to make it reusable.
- You notice the same multi-step process being requested across sessions and suggest capturing it as a skill.
Process
- Gather — ask the user (one message, grouped):
- kebab-case name and which category (
productivity,engineering,misc) - name is a verb-first action phrase (
build-py-project,containerize-project) — octobot's house form of Anthropic's naming guidance; never a vague noun (helper,utils) - one-line purpose
- concrete trigger phrases ("Use when ...")
- success / done criteria
- any deterministic helpers needed (scripts? reference docs?)
- kebab-case name and which category (
- Check for overlap —
ls ~/code/octobot/skills/*/and grep descriptions; if a near-match exists, propose extending it instead of creating a duplicate. - Draft
~/code/octobot/skills/<category>/<name>/SKILL.mdusing the template in REFERENCE.md (or the inline template below if you have it memorized). - Review — show the draft to the user; iterate until approved. Verify:
name:matches the folder namedescription:contains "Use when" and is ≤ 1024 chars- file is ≤ 100 lines. If you need more, split into topic-named
siblings — e.g.
tests-r.md,mocking-r.md,feedback-loops-r.md,anti-patterns.md,examples.md. One topic per file, named for the topic (not for the role).REFERENCE.md/EXAMPLES.mdare reserved for genuinely role-shaped content — most splits are topic splits. - no time-sensitive content
- Link — Claude Code only scans one level deep under
~/.claude/skills/, so create a per-skill symlink:ln -s ~/code/octobot/skills/<category>/<name> ~/.claude/skills/<name> - Commit — from the octobot repo, following the
type(scope): imperativeformat from../jj-atomic/SKILL.md:jj describe -m "feat(skills): add <name> skill"(andjj git pushif a remote exists).
Template
---
name: <kebab-name>
description: <what it does>. Use when <concrete trigger>.
---
# <kebab-name>
## When to use
- <trigger 1>
- <trigger 2>
## Process
1. ...
2. ...
## Output / done criteria
- ...
Output / done criteria
- New
SKILL.mdexists at the right path, passes the checks in step 4. - User has been told the exact
jj describecommand to run. - Skill appears in the skill list on next Claude Code session start.
Guardrails
- Never invent a category — ask if unsure.
- Never write a skill whose description lacks "Use when".
- If the skill needs > 100 lines of prose, split before committing.