refactor(skills): rename write-a-skill → conjure-a-skill and fold in writing-great-skills
- Rename directory; update README pointer and trigger phrase - Add PRINCIPLES.md (design playbook) and GLOSSARY.md (vocabulary), both adapted from mattpocock/skills writing-great-skills - Promote the 100-line cap from convention to SKILL.md guardrail and a When-to-split trigger in PRINCIPLES.md; GLOSSARY.md is the documented exception (flat dictionary; splitting breaks lookup) - Description adds the "conjure" trigger and retains old aliases
This commit is contained in:
parent
1963934422
commit
260f1865e3
@ -24,7 +24,7 @@ skill list.
|
||||
## Skills
|
||||
|
||||
### productivity
|
||||
- **write-a-skill** — meta-skill that scaffolds new skills consistently.
|
||||
- **conjure-a-skill** — meta-skill that scaffolds new skills consistently.
|
||||
- **handoff** — produce a structured handoff doc for a fresh session.
|
||||
- **grill-me** — Socratic loop to remove ambiguity before implementing.
|
||||
- **caveman** — terse-mode: no preamble, no summaries, code + one-line why.
|
||||
@ -75,7 +75,7 @@ skill list.
|
||||
|
||||
## Adding a skill
|
||||
|
||||
Run `/write-a-skill` in any project. It will ask for name, trigger, and
|
||||
Run `/conjure-a-skill` in any project. It will ask for name, trigger, and
|
||||
success criteria, then scaffold `skills/<category>/<name>/SKILL.md` in this
|
||||
repo.
|
||||
|
||||
|
||||
189
skills/productivity/conjure-a-skill/GLOSSARY.md
Normal file
189
skills/productivity/conjure-a-skill/GLOSSARY.md
Normal file
@ -0,0 +1,189 @@
|
||||
# Glossary — Building Great Skills
|
||||
|
||||
The domain model for what makes a skill great. A skill exists to wrangle
|
||||
determinism out of a stochastic system; every term below is a lever on that
|
||||
goal. This is the disclosed reference for [`conjure-a-skill`](SKILL.md) and
|
||||
[`PRINCIPLES.md`](PRINCIPLES.md).
|
||||
|
||||
**Bold terms** in any definition are themselves defined in this glossary;
|
||||
find them by their heading.
|
||||
|
||||
## Language
|
||||
|
||||
### Predictability
|
||||
|
||||
The degree to which a skill makes the agent behave the same *way* on every run — the same process, not the same output (a brainstorming skill should *predictably* diverge; its tokens vary, its behaviour doesn't). The root virtue every other term serves — cost and maintainability are symptoms of it, not rivals.
|
||||
|
||||
_Avoid_: consistency, reliability, robustness, output-determinism
|
||||
|
||||
### Model-Invoked
|
||||
|
||||
A skill that keeps its **description** field, so the agent can see it and fire it autonomously — and the human can still type its name, so model-invocation always *includes* user reach. There is no model-only state: a description only ever *adds* agent discovery, never removes the human's. Pays a permanent **context load** on every turn in exchange for that discoverability. Reachable by other skills, because the description that makes it agent-discoverable makes it invocable. A model-invoked skill whose content is all **reference** is also one home for shared reference: another skill can invoke it, so reference needed by several skills lives in one place. Pick model-invocation only when the agent must reach the skill on its own; if it never fires except by hand, drop the description and pay no context load.
|
||||
|
||||
_Avoid_: ability, tool, capability
|
||||
|
||||
### User-Invoked
|
||||
|
||||
A skill with its **description** stripped — invisible to the agent and reachable only by the human typing its name (user-*only*, where **model-invoked** is user-*and-agent*). Trades agent-discoverability for zero **context load**. Because it has no description, nothing but the human can reach it: no other skill can fire it.
|
||||
|
||||
_Avoid_: procedure, workflow, command
|
||||
|
||||
### Description
|
||||
|
||||
The skill's machine-readable trigger, and the one **context pointer** a **model-invoked** skill is forced to keep loaded at all times. Its mere presence *is* the invocation axis: keep it and the skill is model-invoked (and reachable by other skills); delete it and the skill is **user-invoked**, reachable only by the human. The source of a model-invoked skill's **context load**.
|
||||
|
||||
_Avoid_: frontmatter, summary
|
||||
|
||||
### Context Pointer
|
||||
|
||||
A reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. The **description** is the top-level context pointer (context window → skill); pointers to disclosed files are the same object one level down. Its wording, not the target, decides *when* the agent reaches — and *how reliably*. A must-have target behind a weakly worded pointer is a variance bug: fix the wording first, and inline the material only if sharpening fails.
|
||||
|
||||
_Avoid_: link, reference, import
|
||||
|
||||
### Context Load
|
||||
|
||||
The cost a **model-invoked** skill imposes on the agent's context window — its **description**, always loaded, spending both tokens and attention. What **user-invoked** skills escape by having no description, and the brake on splitting into more model-invoked skills.
|
||||
|
||||
_Avoid_: token cost, context bloat
|
||||
|
||||
### Cognitive Load
|
||||
|
||||
The cost a **user-invoked** skill imposes on the human — what they must hold in their head: which skills exist and when to reach for each (the human is the index). What **model-invocation** removes by being agent-discoverable, and the brake on splitting into more user-invoked skills. Not a cost to minimise: it is the price of human agency, the reason some skills stay user-invoked. Spend it where human judgement matters; remove it where it does not.
|
||||
|
||||
_Avoid_: human index, burden, overhead
|
||||
|
||||
### Granularity
|
||||
|
||||
How finely you divide skills. Finer division spends one of the two loads: more **model-invoked** skills spend **context load** (more descriptions crowding the window and competing for attention); more **user-invoked** skills spend **cognitive load** (more for the human to remember and reach for). Two cuts guide the division. By **invocation**, split off a model-invoked skill where you have a distinct **leading word** to trigger it — a trigger word you actually use in your prompts. By **sequence**, split a run of **steps** where a step's **post-completion steps** need hiding, since isolating it in its own context clears what follows. Beware the reverse: merging sequences exposes each step's post-completion steps to what follows, inviting premature completion.
|
||||
|
||||
_Avoid_: chunking, modularity
|
||||
|
||||
### Router Skill
|
||||
|
||||
A **user-invoked** skill whose job is to point at your other user-invoked skills — naming each and when to reach for it — so the human has one skill to remember instead of many. It can only hint, never fire them: user-invoked skills have no **description**, so nothing but the human can reach them. The cure for **cognitive load** when user-invoked skills multiply.
|
||||
|
||||
_Avoid_: dispatcher, menu, registry, index, router procedure
|
||||
|
||||
### Information Hierarchy
|
||||
|
||||
A skill's content ranked by how immediately the agent needs it — a single ladder, produced by two cuts: in-file or behind a pointer, and step or reference. The rungs:
|
||||
|
||||
- **Steps** — in-file, primary
|
||||
- **Reference**, in-file — secondary
|
||||
- **Reference**, disclosed — behind a **context pointer**
|
||||
|
||||
A skill with no **steps** uses just the bottom two rungs — often a legitimately flat peer-set (e.g. every rule of a review on one rung), which is a fine arrangement, not a smell. The hierarchy is independent of invocation: a skill can be model- or user-invoked whether it is all steps, all reference, or both. When a skill has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip — a variance lever, not just a legibility one. Keep the top of the ladder legible; push down it whatever you can.
|
||||
|
||||
_Avoid_: structure, organization, layout
|
||||
|
||||
### Co-location
|
||||
|
||||
Keeping the material an agent needs at once in one place — a concept's definition, rules, and caveats under a single heading, not scattered across the file — so reading one part brings its neighbours with it. The within-file companion to the **Information Hierarchy**: the hierarchy ranks *how far down* a piece sits; co-location decides *what sits beside it* once there. There is no formula for the right format of a body of **reference**; the test is that a skill should read like documentation written for the agent, and grouped material reads that way where scattered material does not. Distinct from **Duplication**: that repeats one meaning in two places, where scattering fragments a single meaning across many.
|
||||
|
||||
_Avoid_: grouping, clustering, cohesion
|
||||
|
||||
### Branch
|
||||
|
||||
A distinct way a skill can be invoked — a case the skill handles — so different runs take different paths through it. A skill with many steps may carry many branches; a linear one has none.
|
||||
|
||||
_Avoid_: path, case, fork
|
||||
|
||||
### Progressive Disclosure
|
||||
|
||||
Moving **reference** down the ladder — out of SKILL.md and behind a **context pointer** — so the top stays legible. Not primarily a token optimisation; it is how the **information hierarchy** is protected. Licensed by **branching**: disclose what only some branches need, inline what every path needs, and if a pointer fires unreliably on must-have material, sharpen its wording, and pull it back inline only if that fails.
|
||||
|
||||
_Avoid_: lazy loading, chunking
|
||||
|
||||
### Steps
|
||||
|
||||
The ordered actions the agent performs — when a skill has them, the primary tier of its content, and the part that earns its place in SKILL.md. Not every skill has steps: a skill can be all steps (`tdd`), all **reference** (a review), or both, independent of invocation. Every step ends on a **completion criterion**, clear or vague.
|
||||
|
||||
_Avoid_: workflow, instructions, choreography
|
||||
|
||||
### Completion Criterion
|
||||
|
||||
The condition that tells the agent a unit of work is done — the target it judges against. Two properties make it a lever, not just a quality. Its **clarity** (can the agent tell done from not-done?) resists **premature completion** — a vague bound ("understanding reached") lets the agent declare done and slip to the next step; this axis needs *steps* to bite, since premature completion is a between-steps failure. Its **demand** (how much it requires) sets **legwork** — "every modified model accounted for" forces thorough work where "produce a change list" does not — and this axis is *not* step-bound: it can bind a body of flat reference too, which is how a skill with no steps still carries an exhaustiveness bar ("every rule applied"). The strongest criteria are both checkable and exhaustive.
|
||||
|
||||
_Avoid_: done condition, exit condition, stopping rule
|
||||
|
||||
### Post-Completion Steps
|
||||
|
||||
The **steps** that follow the current step. Visible, they pull the agent forward into **premature completion** — the more it sees, the stronger the tug; the defence is to hide them by splitting the sequence of steps into two.
|
||||
|
||||
_Avoid_: horizon, fog of war, lookahead
|
||||
|
||||
### Legwork
|
||||
|
||||
The work an agent does behind the scenes within a single step — reading files, exploring the codebase, making changes, digging up what it needs rather than offloading to the user. It lives below the step structure: never written as its own step, latent in the wording, controlled by the agent rather than the skill. The within-step counterpart to **post-completion steps**' across-step pull. Raised by a **leading word** (_comprehensive_, _thorough_) or a **completion criterion** that demands the work be exhaustive — including the demand axis applied to flat reference, which is what drives a skill of flat reference to cover all its rungs. Goes thin either when that demand is missing or when **premature completion** cuts the step short.
|
||||
|
||||
_Avoid_: scope, effort, diligence, coverage
|
||||
|
||||
### Reference
|
||||
|
||||
Material the agent refers to on demand — definitions, facts, parameters, examples, conditional instructions. When a skill has **steps** it is secondary to them; when a skill has none it is the entire content; or it lives outside any skill entirely — see **External Reference**. Reached via **context pointers**, and the prime candidate for **progressive disclosure**.
|
||||
|
||||
_Avoid_: supporting material, docs, background
|
||||
|
||||
### External Reference
|
||||
|
||||
**Reference** that lives outside the skill system — a plain file, no **description**, no **steps**, not invocable — that any skill can point at. The home for shared reference that needn't fire on its own, and the only shared home two **user-invoked** skills can use, since neither has a description and so neither can fire the other.
|
||||
|
||||
_Avoid_: doc, resource, knowledge base
|
||||
|
||||
### Leading Word
|
||||
|
||||
A compact concept — also called a *Leitwort* — already living in the model's pretraining, that the agent thinks with while running the skill. It encodes a behavioural principle in the fewest possible tokens by invoking priors the model already holds (e.g. _lesson_, _proximal zone of development_, _fog of war_, _tracer bullets_). Repeated as a token, never as a sentence, it accumulates a distributed definition across the skill and anchors a whole region of behaviour. Coining your own works if you define it clearly, but a made-up word recruits no priors — you pay in definition tokens what a pretrained word gives free. Reach for an existing word first.
|
||||
|
||||
A leading word serves **predictability** twice. In the body it anchors **execution** — the agent reaches for the same behaviour every time the concept appears, and inside flat reference it focuses attention on a class of thing to look for, recruiting the right checks each run. In the **description** it anchors **invocation** — and not only within the skill: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the skill and fires it more reliably. Word a description with the leading words you actually use when you want the skill.
|
||||
|
||||
_Avoid_: keyword, term, motif
|
||||
|
||||
### Single Source of Truth
|
||||
|
||||
The desired state where each meaning lives in exactly one authoritative place, so a change to the skill's behaviour is a change in one place. **Duplication** is its violation.
|
||||
|
||||
_Avoid_: home, canonical location
|
||||
|
||||
### Relevance
|
||||
|
||||
Whether a line still bears on what the skill does — the lens for what to keep. A line loses relevance either by never bearing on the task (mere exposition, or a **branch** that should be disclosed) or by going stale: drifting out of date as the behaviour or world it describes changes. Shorter skills are easier to keep relevant, because each line is cheaper to check. Distinct from **no-op**: relevance asks whether a line bears on the task, not whether it changes behaviour.
|
||||
|
||||
_Avoid_: load-bearing, staleness, freshness
|
||||
|
||||
## Failure Modes
|
||||
|
||||
### Premature Completion
|
||||
|
||||
Ending the current step before it is genuinely done, because the agent's attention slips to being done rather than to the work. A between-steps failure: it needs **steps** to occur — a skill with no steps that quits early isn't premature completion but thin **legwork** under an unmet demand. A tug-of-war between two forces: visible **post-completion steps** (the pull forward) and the **completion criterion**'s clarity (the resistance — a sharp, checkable bar holds; a vague one gives way). Fuzziness is the necessary condition: a sharp bound resists the pull no matter how many later steps are visible, so a step that never rushes needs no defending. Two levers hold a step that does, but reach for them in order: **sharpen the bound first** — it is local and cheap. Only when the criterion is irreducibly fuzzy *and* you actually observe the rush do you **hide the later steps** — and hiding only works across a real context boundary (a user-invoked hand-off or a subagent dispatch; an inline model-invoked call leaves the later steps in context and clears nothing). One cause of thin legwork, but distinct from it: legwork can be thin even when a step runs to full completion.
|
||||
|
||||
_Avoid_: premature closure, the rush, rushing, shortcutting
|
||||
|
||||
### Duplication
|
||||
|
||||
The same meaning given more than one **single source of truth**. It costs maintenance (change one place, you must change the others), costs tokens, and inflates prominence — repeating a meaning weights it on the ladder past its real rank. The accidental inverse of a **leading word**, which raises attention on purpose by repeating a token, never the meaning.
|
||||
|
||||
_Avoid_: repetition, redundancy
|
||||
|
||||
### Sediment
|
||||
|
||||
Layers of old content that settle in a skill and are never cleared, because adding feels safe and removing feels risky — so stale and irrelevant lines accumulate and you must core down through them to find what is still live. The default fate of any skill without a pruning discipline; the slow erosion of **relevance**, as opposed to **duplication**'s repeated meaning.
|
||||
|
||||
_Avoid_: accretion, bloat, cruft, rot
|
||||
|
||||
### Sprawl
|
||||
|
||||
A skill that is simply too long — too many lines in SKILL.md — independent of whether they are stale or repeated. Even an all-live, all-unique skill can sprawl. It costs readability (the agent wades through more before it can act, and attention thins across the excess), maintainability (every extra line is one more to keep **relevant**), and tokens. The cure is the **information hierarchy**: push **reference** down behind **context pointers**, and split by **branch** or sequence so each path carries only what it needs. Distinct from **sediment** (length from stale accumulation) and **duplication** (length from repeated meaning) — sprawl is length itself, whatever its cause.
|
||||
|
||||
_Avoid_: bloat, length, size, verbosity
|
||||
|
||||
### No-Op
|
||||
|
||||
An instruction that changes nothing because the model already does it by default — you pay load to tell the agent what it would do anyway. The test: does a line change behaviour versus the default? A line can be perfectly **relevant** and still be a no-op. The same priors that make a **leading word** free make a no-op worthless.
|
||||
|
||||
A leading word is a *technique*; No-Op is a *verdict* on a line — and they cross. A leading word too weak to beat the default is a no-op (_be thorough_ when the agent is already thorough-ish), and the fix is a stronger word that passes the verdict (_relentless_), not a different technique. So the No-Op test — does it change behaviour versus the default? — is also how you grade whether a leading word is earning its repetitions. This is model-relative, not reader-relative: two people disagreeing over whether a line is a no-op disagree about the default, and settle it by running the skill, not by debate.
|
||||
|
||||
_Avoid_: redundant instruction, restating the obvious, belaboring
|
||||
|
||||
---
|
||||
|
||||
*Adapted from [mattpocock/skills `writing-great-skills`](https://github.com/mattpocock/skills/tree/main/skills/productivity/writing-great-skills).*
|
||||
100
skills/productivity/conjure-a-skill/PRINCIPLES.md
Normal file
100
skills/productivity/conjure-a-skill/PRINCIPLES.md
Normal file
@ -0,0 +1,100 @@
|
||||
# Principles — what makes a conjured skill predictable
|
||||
|
||||
The design playbook [`conjure-a-skill`](SKILL.md) applies. **Bold terms** are
|
||||
defined in [`GLOSSARY.md`](GLOSSARY.md).
|
||||
|
||||
A skill wrangles determinism out of a stochastic system. **Predictability** —
|
||||
same *process* every run, not same output — is the root virtue.
|
||||
|
||||
## Invocation
|
||||
|
||||
Two choices, trading different costs:
|
||||
|
||||
- A **model-invoked** skill keeps a **description**, so the agent can fire
|
||||
it autonomously *and* other skills can reach it. It contributes to
|
||||
**context load** — the description sits in the window every turn.
|
||||
Mechanics: omit `disable-model-invocation`; write a description with rich
|
||||
trigger phrasing.
|
||||
- A **user-invoked** skill strips the description from the agent's reach:
|
||||
only the user can invoke it, no other skill can. Zero context load, but
|
||||
spends **cognitive load** — the user is the index. Mechanics: set
|
||||
`disable-model-invocation: true`.
|
||||
|
||||
Pick model-invocation only when the agent or another skill must reach the
|
||||
skill. When user-invoked skills multiply past memory, a **router skill**
|
||||
names the others and cures the cognitive load.
|
||||
|
||||
## Writing the description
|
||||
|
||||
A model-invoked description does two jobs — state what the skill is, and list
|
||||
the **branches** that should trigger it. Every word increases context load:
|
||||
|
||||
- **Front-load the skill's leading word.**
|
||||
- **One trigger per branch.** Synonyms that rename a single branch are
|
||||
**duplication**.
|
||||
- **Cut identity already in the body.**
|
||||
|
||||
## Information hierarchy
|
||||
|
||||
A skill is built from **steps** and **reference**, mixed freely. The core
|
||||
decision is where each sits on the **information hierarchy**:
|
||||
|
||||
1. **In-skill step** — `SKILL.md`. Each step ends on a **completion
|
||||
criterion** — *checkable* and (where it matters) *exhaustive*. Vague
|
||||
criteria invite **premature completion**.
|
||||
2. **In-skill reference** — `SKILL.md`, on demand.
|
||||
3. **External reference** — separate file, reached by a **context pointer**.
|
||||
|
||||
**Progressive disclosure** is the move down the ladder so the top stays
|
||||
legible. Branching is the cleanest disclosure test: inline what every branch
|
||||
needs, push behind a pointer what only some branches reach. A pointer's
|
||||
*wording*, not its target, decides when and how reliably the agent reaches.
|
||||
|
||||
**Co-location** decides what sits beside each piece once placed — keep a
|
||||
concept's definition, rules, and caveats under one heading.
|
||||
|
||||
## When to split
|
||||
|
||||
**Granularity** spends one of the two loads. Three cuts:
|
||||
|
||||
- **By invocation** — split when a distinct **leading word** earns it, or
|
||||
another skill must reach it.
|
||||
- **By sequence** — split a run of **steps** when **post-completion steps**
|
||||
tempt the agent to rush the current one (**premature completion**).
|
||||
- **By the octobot 100-line cap** — when a file exceeds 100 lines, split.
|
||||
House enforcement of **sprawl**. `GLOSSARY.md` is the documented exception.
|
||||
|
||||
## Pruning
|
||||
|
||||
Keep each meaning in a **single source of truth**. Check every line for
|
||||
**relevance**. Then hunt **no-ops** sentence by sentence: when one fails the
|
||||
test (*does it change behaviour versus the default?*), delete the whole
|
||||
sentence rather than trim words from it.
|
||||
|
||||
## Leading words
|
||||
|
||||
A **leading word** is a compact concept already in the model's pretraining
|
||||
(*lesson*, *fog of war*, *tracer bullets*). Repeated, never restated, it
|
||||
anchors a region of behaviour in the fewest tokens. Twice predictable: in
|
||||
the body it anchors *execution*; in the description it anchors *invocation*
|
||||
— shared language across prompts, docs, and code fires the skill reliably.
|
||||
|
||||
Refactor: "fast, deterministic, low-overhead" → *tight*; "a loop you
|
||||
believe in" → *red* (the loop goes *red*, or it doesn't).
|
||||
|
||||
## Failure modes
|
||||
|
||||
- **Premature completion** — ending a step before it's genuinely done.
|
||||
Sharpen the criterion first; hide post-completion steps only if it remains
|
||||
fuzzy *and* you observe the rush.
|
||||
- **Duplication** — same meaning in more than one place.
|
||||
- **Sediment** — stale layers settled because adding feels safe and
|
||||
removing feels risky.
|
||||
- **Sprawl** — too long, even when every line is live. Cure: ladder +
|
||||
splitting.
|
||||
- **No-op** — a line the model already obeys by default. Pay load to say
|
||||
nothing.
|
||||
|
||||
---
|
||||
|
||||
*Adapted from [mattpocock/skills `writing-great-skills`](https://github.com/mattpocock/skills/tree/main/skills/productivity/writing-great-skills).*
|
||||
100
skills/productivity/conjure-a-skill/SKILL.md
Normal file
100
skills/productivity/conjure-a-skill/SKILL.md
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
name: conjure-a-skill
|
||||
description: Conjure a new Claude Code skill that earns its place — verb-first name, sharp completion criteria, progressive-disclosure layout, no-op-free body, every file ≤100 lines. Use when the user says "conjure a skill", "/conjure-a-skill", "write a skill", "create a skill", "add a skill", or describes a recurring workflow worth capturing.
|
||||
---
|
||||
|
||||
# conjure-a-skill
|
||||
|
||||
## When to use
|
||||
- User says "conjure a skill", "/conjure-a-skill", "write a skill",
|
||||
"create a skill", "add 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.
|
||||
|
||||
## Design principles
|
||||
A skill exists to wrangle **predictability** out of a stochastic system —
|
||||
the agent taking the same *process* every run. Leading words to think with:
|
||||
**context load** (cost a model-invoked skill pays each turn), **leading
|
||||
word** (the *Leitwort* that anchors a region of behaviour in one token),
|
||||
**progressive disclosure** (pushing **reference** behind a **context
|
||||
pointer** so the top of the **information hierarchy** stays legible),
|
||||
**sprawl** (a SKILL.md too long, even when every line is live).
|
||||
Failure modes to hunt: **premature completion**, **duplication**,
|
||||
**sediment**, **no-op**.
|
||||
|
||||
Full vocabulary: [GLOSSARY.md](GLOSSARY.md). Design playbook: [PRINCIPLES.md](PRINCIPLES.md).
|
||||
|
||||
## Process
|
||||
1. **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`,
|
||||
`conjure-a-skill`) — the **leading word** that anchors invocation;
|
||||
never a vague noun (`helper`, `utils`)
|
||||
- one-line purpose
|
||||
- concrete trigger phrases ("Use when ...")
|
||||
- **completion criteria** — checkable, exhaustive (see PRINCIPLES.md)
|
||||
- any deterministic helpers needed (scripts? reference docs?)
|
||||
2. **Check for overlap** — `ls ~/code/octobot/skills/*/` and grep
|
||||
descriptions; a near-match is **duplication** — propose extending the
|
||||
existing skill instead.
|
||||
3. **Draft** `~/code/octobot/skills/<category>/<name>/SKILL.md` using the
|
||||
template below.
|
||||
4. **Review** — show the draft to the user; iterate until approved. Verify:
|
||||
- `name:` matches the folder name
|
||||
- `description:` contains "Use when" and is ≤ 1024 chars
|
||||
- **every file ≤ 100 lines** — octobot's house cap on **sprawl**. If
|
||||
SKILL.md is too long, use **progressive disclosure**: push
|
||||
**reference** into **topic-named siblings** (`tests-r.md`,
|
||||
`mocking-r.md`, `feedback-loops-r.md`, `anti-patterns.md`,
|
||||
`examples.md`). One topic per file, named for the topic. `GLOSSARY.md`
|
||||
is the documented exception (flat dictionary; splitting breaks lookup).
|
||||
- no time-sensitive content
|
||||
- every line passes the **no-op** test (PRINCIPLES.md §pruning)
|
||||
5. **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>`
|
||||
6. **Commit** — from the octobot repo, following the `type(scope):
|
||||
imperative` format from [`../jj-atomic/SKILL.md`](../jj-atomic/SKILL.md):
|
||||
`jj describe -m "feat(skills): add <name> skill"`
|
||||
(and `jj git push` if a remote exists).
|
||||
|
||||
## Template
|
||||
```markdown
|
||||
---
|
||||
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.md` exists at the right path, passes the checks in step 4.
|
||||
- Every file in the skill folder is ≤ 100 lines (GLOSSARY.md excepted).
|
||||
- User has been told the exact `jj describe` command 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".
|
||||
- **Never let a file in the skill folder exceed 100 lines** (GLOSSARY.md
|
||||
excepted). Split before committing.
|
||||
- Reject any line that fails the **no-op** test (PRINCIPLES.md §pruning).
|
||||
|
||||
## See also
|
||||
- [PRINCIPLES.md](PRINCIPLES.md) — the design playbook this skill applies.
|
||||
- [GLOSSARY.md](GLOSSARY.md) — definitions for every bold term above.
|
||||
- [`../jj-atomic/SKILL.md`](../jj-atomic/SKILL.md) — commit format.
|
||||
@ -1,76 +0,0 @@
|
||||
---
|
||||
name: write-a-skill
|
||||
description: 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
|
||||
1. **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?)
|
||||
2. **Check for overlap** — `ls ~/code/octobot/skills/*/` and grep
|
||||
descriptions; if a near-match exists, propose extending it instead of
|
||||
creating a duplicate.
|
||||
3. **Draft** `~/code/octobot/skills/<category>/<name>/SKILL.md` using the
|
||||
template in REFERENCE.md (or the inline template below if you have it
|
||||
memorized).
|
||||
4. **Review** — show the draft to the user; iterate until approved. Verify:
|
||||
- `name:` matches the folder name
|
||||
- `description:` 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.md` are reserved
|
||||
for genuinely role-shaped content — most splits are topic splits.
|
||||
- no time-sensitive content
|
||||
5. **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>`
|
||||
6. **Commit** — from the octobot repo, following the `type(scope):
|
||||
imperative` format from [`../jj-atomic/SKILL.md`](../jj-atomic/SKILL.md):
|
||||
`jj describe -m "feat(skills): add <name> skill"`
|
||||
(and `jj git push` if a remote exists).
|
||||
|
||||
## Template
|
||||
```markdown
|
||||
---
|
||||
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.md` exists at the right path, passes the checks in step 4.
|
||||
- User has been told the exact `jj describe` command 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.
|
||||
Loading…
x
Reference in New Issue
Block a user