SKILL.md in practice: the minimal frontmatter and how it triggers

Walking through a real SKILL.md to explain the minimal frontmatter.

What SKILL.md is

A Skill is a know-how document defined at `.claude/skills/<name>/SKILL.md`, loaded into the current conversation when relevant — unlike a subagent, which runs in its own isolated context.

The minimal frontmatter is two fields

Only `name` and `description` are required. A real skill file we inspected runs on just these two.

---
name: keihi-seisan
description: Expense reimbursement workflow — log costs, generate a reimbursement PDF on request, and post to P&L/balance sheet. Use for expense/reimbursement topics.
---

# Expense workflow
(steps go here)

Why description matters most

Claude decides whether to trigger a skill mainly from its `description`. Write both "what it does" and "when to use it", concretely, in third person.

Add optional fields only when needed

Fields like `allowed-tools` or `model` don't need to be there from day one — add them once you know you need to restrict something.

Skill vs subagent

`.claude/agents/<name>.md` is an isolated role; `.claude/skills/<name>/SKILL.md` is know-how loaded into the current context. Choose based on whether you want a role or a reproducible procedure.

How to verify it works

After adding a skill, bring up a topic matching its description and check it actually triggers. If not, tighten the description first.

FAQ

What's the minimum SKILL.md needs?
Just `name` and `description` in frontmatter. Everything else is optional.
How does a skill get triggered?
When the conversation topic matches its `description`.
Skill vs subagent?
A skill is know-how loaded into the current context; a subagent is an isolated role.
What happens if description is vague?
The skill may not trigger when needed, or trigger when it shouldn't.
Should I add allowed-tools upfront?
Not required — add it once you know you need to restrict tool access.