A skill in Claude Code is a markdown file with YAML frontmatter the agent reads on demand. The frontmatter declares a description; the agent compares user prompts against that description and fires the skill when the prompt matches. The body is the instructions the agent follows once the skill fires -- typically a checklist, a sequence, or a recipe.

Skills are the right tool when the same workflow recurs often enough that re-explaining it each time wastes turns -- but light enough that defining a custom subagent would be overkill.

Where skills live

All three sources concatenate into the available-skills list. Conflicts resolve in load order; the agent picks the first matching description it finds.

The description IS the firing predicate

This is the part most people get wrong. The skill body can be brilliant, but if the description doesn't match how users actually phrase the request, the skill never fires. A skill called release with the description "Cuts a release" will not fire when the user says "let's ship 1.4.0" -- the agent did not see "release" in the prompt.

Write the description as a list of trigger phrases the user actually uses:

--- name: release-mcp-hosting description: Cut a release of mcp-hosting. Use when the user says "release mcp-hosting", "ship mcp.hosting X.Y.Z", "deploy mcp-hosting", "/release-mcp-hosting", or "stage commit push deploy release" while the cwd is under ~/yaw/mcp-hosting. ---

The agent now fires the skill on any of those shapes. The body of the skill defines what happens when it does.

Skills vs slash commands

A slash command is an explicit invocation: the user types /release, the skill fires. A skill with phrase-based triggers fires implicitly when the user phrases a request the right way. Most production skills support both: an explicit slash command for the user who knows the skill exists, and trigger phrases for the user who phrases it naturally.

When to write a skill

When NOT to write a skill

The Yaw skill family

Yaw Mode ships ~20 skills as concrete examples: /yaw-ship-ready (audit a branch for shippability), /yaw-pre-pr (lint + typecheck + test before opening a PR), /yaw-review (review the most recent changes for bugs), /yaw-implement (execute an agreed plan end to end). Each one is a 20-50 line SKILL.md with a tight description and an opinionated body. They are good shape references if you're writing your own.

Skill vs subagent vs hook -- choosing

Want the patterns?

Claude Code in Production Chapter 4 covers the description-as-firing-predicate in depth, the skills-vs-slash-vs-subagent decision tree, and the patterns that distinguish a skill the team uses from one that sits in the directory unused.

Claude Code in Production

The Claude Code book and practitioner's guide. Twelve chapters. PDF + EPUB. Free updates. $39 one-time, secure checkout.

Read more & buy $39

Published by Yaw Labs.

Related