Skills and Commands for QA Work
Why This Matters
Some tasks come back every week: add a golden case, triage a run by hand, draft a bug report from a failure. A skill turns that routine into something every team member, and every agent, does the same way.
Skills versus CLAUDE.md
| CLAUDE.md | Skill | |
|---|---|---|
| Loaded | Every session | When needed |
| Content | Short facts and rules | A procedure, with optional scripts and examples |
| Triggered by | Always | Its description, or by typing its name as a command |
Skill, MCP tool or CLAUDE.md?
| Put it in… | When | TestPilot example |
|---|---|---|
| CLAUDE.md | Short facts and rules needed in almost every session | “Run npm run check before you finish” |
| A skill | Know-how for a specific task, loaded only when relevant: instructions, maybe scripts and templates | “How we write a flaky-test report” |
| An MCP tool | A capability: reach a system, fetch data or perform an action | get_test_history, create_issue |
The short version: a skill teaches Claude how to do something; an MCP tool gives Claude access to something. A skill can tell Claude which MCP tools to use, in which order.
Anatomy of a skill
A skill is a folder with a SKILL.md: YAML frontmatter that tells Claude when to use it, and Markdown instructions it follows when it runs. Supporting files (examples, scripts) can live next to it.
.claude/skills/add-golden-case/
├── SKILL.md
└── example-case.json
---
name: add-golden-case
description: Turns a real failed test into a labelled golden case for TestPilot's evaluation set. Use when someone wants to add a failure to the golden set or says TestPilot got a failure wrong.
---
1. Ask for the run file and the test id if they are not given.
2. Copy the failure into `fixtures/golden/` using the shape in `example-case.json`.
3. Ask the human for the correct category and a one-line reason. Never choose the label yourself.
4. Run `npm run eval` and show the scorecard diff.
5. Summarise what was added in two lines for the pull request description.
The folder name (or name) becomes the command you can type, for example /add-golden-case; the description helps Claude decide when to use it on its own. Check the skills documentation for optional frontmatter fields. One that is easy to misread: allowed-tools pre-approves tools while the skill runs; it does not restrict which tools are available. To restrict tools, use a subagent with its own tools list.
Step 3 matters
The skill does the routine work, but the label stays with a human. That is the same principle as in module 1: the model proposes, a person decides where the decision carries the cost.
The skill in a real session
Asked “TestPilot got t-040 in run-1099 wrong. Add it to the golden set.”, Claude Code loaded add-golden-case from its description alone: nobody named the skill. It read the failure and then followed step 3 to the letter: the label has to come from you.
It did more than the skill asked. It noticed that golden-019 is almost the same failure (a 500 from an export endpoint without a log) and already labelled unknown, and warned that a different label on the same evidence would make the golden set contradict itself. That check is worth writing into the skill: “Before adding a case, search the golden set for one with the same evidence.” On solution/lesson-52-claude-code it is now step 2 of the skill. A good skill grows from what you see it do in practice.
Project or personal?
- Project skills in
.claude/skills/, committed: shared team procedures like this one. - Personal skills in
~/.claude/skills/: your own shortcuts.
Test a skill
A skill is a procedure; test it like one. Run it on three different failures (a product bug, a flaky test, an unknown) and check that each produces a valid case, asks for the label, and shows the scorecard.
Exercise
Create add-golden-case in TestPilot, run it three times, and improve the description until Claude picks the skill on its own when you say “TestPilot got t-004 wrong”.
Compare with solution/lesson-52-claude-code, which has the Claude Code setup for lessons 42–52. Its docs/claude-code-demo.md walks you through all of module 6 in one session.
