All posts

How to write a Claude skill that actually gets used

A skill is a folder with a SKILL.md, but most skills fail before their first line is read: the description never triggers, or the body is too long to follow. How to write the trigger, keep the body lean, and know when a hook or plugin is the better tool.

5 min read

A Claude skill is a small thing: a folder with a SKILL.md file, and optionally some scripts and reference documents next to it. That simplicity hides the two ways skills fail in practice. Either the skill never loads, because nothing in the conversation matched its description, or it loads and the model skims a wall of instructions and does roughly what it would have done anyway.

This is how we write skills that get picked up and followed, and how we decide when a skill is the wrong tool.

What a skill is, mechanically

A skill lives in a directory. In Claude Code that is .claude/skills/<name>/ for a project, ~/.claude/skills/<name>/ for you personally, or inside a plugin.

release-notes/
├── SKILL.md            # front matter + instructions
├── references/
│   └── style.md        # read only when the instructions point to it
└── scripts/
    └── collect.py      # run, not read

SKILL.md starts with YAML front matter:

---
name: release-notes
description: Draft release notes from merged pull requests. Use when the user asks for release notes, a changelog entry or "what shipped" for a version or date range.
---

The important part is how this gets loaded. At the start of a session the agent only sees each skill's name and description. The body of SKILL.md is read when the skill is chosen, and the files under references/ only when the body tells the model to open them. That staged loading is what lets you install dozens of skills without filling the context window. It also means the description is doing nearly all the work of getting a skill used.

1. The description is the trigger

Treat the description as a routing rule, not a tagline. It has to answer two questions the model asks when deciding: what does this do, and is this the moment.

A weak description:

description: Helps with documentation.

A description that triggers:

description: Draft release notes from merged pull requests. Use when the user asks for release notes, a changelog entry or "what shipped" for a version or date range. Not for README or API docs.

What changed:

  • A concrete job with an object ("release notes from merged pull requests"), not a domain.
  • The phrases people actually type: "changelog", "what shipped". Write down five real requests from your team and make sure the description would match them.
  • A boundary: what it is not for. Without one, a broad skill fires on adjacent requests and annoys people until someone deletes it.

Test it the cheap way before polishing the body. Write ten prompts that should trigger the skill and five near-misses that should not, run them in fresh sessions, and count. If it misses, the fix is almost always in the description.

2. Keep the body a procedure, not an essay

Once loaded, the body competes with everything else in the context window. Long, discursive skills get followed loosely. The skills that hold up read like a runbook:

  1. Inputs: what to collect or ask for first, and the one question to ask if something essential is missing.
  2. Steps: numbered, each one checkable.
  3. Output: the exact shape of the result, with a short example.
  4. Checks: what must be true before the agent says it is done.

Move anything that is only sometimes needed into references/ and point to it by name from the step where it matters: "If the release includes breaking changes, read references/breaking-changes.md". The model opens it on that branch and nowhere else.

A good working limit: if SKILL.md grows past a few hundred lines, it is probably two skills, or most of it belongs in references.

3. Put the exact parts in scripts

Anything that must be done the same way every time, such as parsing a file, calling an API, computing a number or validating output, belongs in a script that the skill runs. Scripts are executed rather than read, so they cost almost no context and they don't drift.

## Steps
1. Run `python scripts/collect.py --since <tag>` to list merged PRs as JSON.
2. Group the PRs by label: feature, fix, chore. Drop chores.
3. Write one line per PR in the voice described in references/style.md.
4. Run `python scripts/check.py notes.md`; fix every error it reports.

The model does what it is good at (grouping, wording, judgement) and the script does what it is good at (being exactly right). A check script at the end turns "the agent says it is finished" into "the agent's output passed a test", which matters far more than any wording in the instructions.

4. Know when a skill is the wrong tool

A skill is guidance the model chooses to load. That is the right shape for know-how. It is the wrong shape for rules that must hold every time. The harness, meaning the runtime around the model with its tools, permissions, hooks and context, gives you better places for those:

You need Use
Know-how for a kind of task, loaded when relevant Skill
Something that must happen on every edit, commit or tool call Hook (runs as code at a fixed lifecycle point, whether or not the model remembers)
Access to a system: a database, a ticket tracker, an internal API MCP server (tools with typed inputs and their own auth)
A fixed entry point people type on purpose Slash command
A self-contained job with its own context and tools Subagent
All of the above, shared across a team Plugin

For example, "format the code after every edit" is a hook, not a skill: a hook will run every time, and an instruction in a skill can be forgotten. "How we write migration files" is a skill. "Read our Jira" is an MCP server.

5. Ship skills as a plugin

Once a team relies on a few skills, copying folders around stops working. A plugin bundles skills, commands, subagents, hooks and MCP servers behind a .claude-plugin/plugin.json manifest, and a marketplace (often just a Git repository) lets people install and update it with one command. Versioned plugins also give you a place to review changes to skills the same way you review code, which matters once a skill can run scripts against real systems.

A checklist before you publish a skill

  • The description names a concrete job, the words people use for it, and one boundary.
  • It triggers on at least 9 of 10 real prompts and stays quiet on the near-misses.
  • SKILL.md is a numbered procedure with a defined output and a definition of done.
  • Rarely needed detail lives in references/, linked from the step that needs it.
  • Exact work is done by scripts, and a check script verifies the result.
  • Anything that must always happen is a hook, not a sentence in a skill.

Skills are one of the cheapest ways to make an agent behave like a member of your team rather than a clever stranger. They work when they are written like good internal documentation: short, specific and testable.

Found this useful? Pass it to someone building with AI.

Zeuxo Templates

Start from a complete product, not a blank page.

Kiln, Tidings, Marrow — React 19 + TypeScript dashboards with every screen built. From $79.

Browse templates

Keep reading

Loop Engineering · · 4 min read

Loop engineering: designing the loop around an AI agent

Prompt engineering shaped one answer. Context engineering shaped what the model sees. Agents that run for an hour need a third discipline: deciding how each step is checked, when the loop stops, where progress is kept and when a person is called.

  • #Loop engineering
  • #AI agents
  • #Engineering

AI Agents · · 4 min read

How to monitor AI agents running in parallel

Running five AI agents at once is easy. Knowing which are working, which are stuck and what each produced is not. What to track, and how to build a view you can trust.

  • #AI agents
  • #Agent Studio
  • #Engineering