Writing a skill that changes behavior

The four sections every working skill has, why the fourth one is skipped, and how to test a skill before you ship it.

Level 29 minSkills and prompts

A skill is a markdown file the agent loads when the task matches. That is the entire mechanism. What separates a skill that works from one that sounds good is structure, and most published skills are missing half of it.

The four sections

**1. When it applies.** The trigger, written narrowly. "Use when reviewing a diff before merge" beats "use for code tasks", because the second one fires on everything and becomes background noise.

**2. What to do.** Ordered steps, not principles. If the skill says "ensure quality", it has said nothing. If it says "run the test suite, then read the failure, then change one thing", it has said something.

**3. What not to do.** The prohibitions are what change output. "Do not comment on formatting" is more effective than "focus on correctness", for the same reason a prohibition is more effective in a prompt.

**4. How to verify.** How the agent — or you — knows the result is right. This is the section people skip, and it is why their skills produce confident wrong work.

Why section four matters most

A skill without a verification step trains the agent to produce output that looks finished. A skill with one trains it to check. The difference shows up the first time the task is slightly different from the example.

Verification does not need to be clever. "Run the tests and paste the output" is a verification step. "Confirm the file parses" is a verification step. Anything that produces evidence beats "ensure it is correct".

Testing before you ship

Write the skill, then run the same task twice: once with the skill installed, once without. If the outputs are indistinguishable, the skill is decoration — it costs context and changes nothing.

Then run it on a task it should refuse or decline. A skill that cannot recognize when it does not apply will fire on everything, which is worse than not having it.

What to leave out

Backstory, philosophy, and encouragement. A skill that spends two hundred words explaining why clean code matters has already failed to enforce anything. The model does not need motivation; it needs instructions.

Existing skills to read first: the official collection for format, Impeccable for a skill whose entire job is critique.

Next: turning a prompt you reuse into a skill.

Prompts to practice with