Module 4 · Claude Code configuration and workflows · Chapter 14
Slash commands and skills: share workflows with the whole team
- A slash command in
.claude/commands/is a saved prompt a person runs on purpose, like/pr-check. - A skill in
.claude/skills/is a package Claude loads on its own when the task matches. - Commit both to the repo, and the whole team shares one version instead of private copies.
The picture: commands are buttons a person presses. Skills are tools on a belt Claude reaches for. CLAUDE.md is the rulebook pinned to the wall.
Domain 3, Claude Code Configuration and Workflows (20 percent of the exam). Create and use custom commands and skills. You should be able to:
- Build a command with frontmatter, arguments and a clear prompt body.
- Build a skill with instructions and supporting files, including a forked context.
- Choose between CLAUDE.md, a command and a skill for a given need.
- Share commands and skills through the project repo.
Harbor & Pine Outfitters is a made-up company. On the harbor-web team, only Kavish can run the release checklist. The steps live in his head and in old chat threads nobody else can see.
- A new hire runs the release her own way and skips the migration check.
- The deploy fails, the store is down for 40 minutes, and Owen Brandt rolls it back by hand.
- At a made-up $900 an hour in lost sales, that is about $600, plus a morning of support tickets.
The knowledge was never the problem. It had no shared home. This chapter gives it one.
- Pick the right home: CLAUDE.md, command or skill.
- Anatomy of a command: frontmatter, arguments, body.
- Anatomy of a skill: files, loading and forked context.
- Worked example: the pull-request checklist as a command.
- Lab: write your own command or skill for harbor-web.
Step 1: Pick the right home first
Why this step: most exam questions here are really one question: where does this belong?
- Always-on rule: put it in CLAUDE.md (chapter 13). Example: "Tests sit beside the code they test."
- Workflow a person triggers: make it a command. Example: run the release checklist now.
- Capability Claude should reach for: make it a skill. Example: reading supplier invoice PDFs in odd formats.
Think of a kitchen. CLAUDE.md is the hygiene rules on the wall. A command is a recipe card a cook picks up on purpose. A skill is knife technique the cook uses whenever a task needs it.
Where the picture breaks down:
- CLAUDE.md loads into every session, so a long workflow there wastes context on unrelated tasks.
- A command does nothing until a person types it. It cannot help with a task nobody names.
- A skill loads only when Claude judges it relevant, so it is a strong hint, not a guarantee.
- The developer types
/pr-check 482. Nothing runs until someone asks. That control is the point. - A strange invoice PDF arrives. Claude sees the match and loads the skill itself. Nobody typed a command.
- Commands and skills both guide Claude. They differ only in who decides to use them.
- CLAUDE.md rules, like test placement, hold in every session, whichever route brought Claude here.
Quick check: where does an always-on rule belong?
Next: inside a command file, line by line in spirit.
Step 2: Anatomy of a slash command
Why this step: a command is just a Markdown file, but two small parts do the heavy lifting.
- Location: one file per command in
.claude/commands/. The file name becomes the command:pr-check.mdgives/pr-check. - Frontmatter: settings at the top, such as
argument-hint(shows the user what to type) andallowed-tools(limits which tools the command may use). - Body: the prompt itself, written as clear steps. Text the user types after the command is passed in as arguments, so the body can refer to that input.
Keep the body tight. A command is a checklist, not an essay. If a step must always happen in a fixed order, number it.
Do this: predict before you reveal.
A release is a deliberate act a person starts. That is command territory. A skill depends on Claude noticing the match, which is the wrong trigger for a step nobody may skip.
Next: skills, the package Claude reaches for alone.
Step 3: Anatomy of a skill
Why this step: skills carry more than a prompt, and that is why they exist.
- Location: a folder per skill in
.claude/skills/, holding a main instructions file plus any supporting files it needs, such as examples, templates or reference tables. - Loading: Claude reads the skill description first and loads the full package when the current task matches. Supporting files load only as needed, which saves context.
- Forked context: frontmatter such as
context: forkruns the skill in its own context, so a long side job does not fill the main conversation. Version-dependent details: check the current docs. - Limits: a skill can also carry
allowed-toolsand anargument-hint, like a command.
A skill is like a specialist folder on a shared drive: a one-page brief on top, with the forms and examples behind it, picked up only for the right job.
Where the picture breaks down:
- Files on a drive wait for a person. A skill is found by Claude from its description, so a vague description means a skill that never fires.
- A forked skill works apart from the main thread. What it learns there does not automatically enrich the main conversation beyond what it returns.
Quick check: command or skill?
Next: the worked example, turning tribal knowledge into a file.
Step 4: Worked example, the pull-request checklist as a command
Why this step: this is the cold open, fixed. Owen's PR checklist lived in review comments. Kavish writes it once, as .claude/commands/pr-check.md (illustrative):
---
argument-hint: [pull-request number]
allowed-tools: Read, Grep, Bash
description: Run the harbor-web PR checklist
---
Run the harbor-web pull-request checklist for PR $ARGUMENTS.
1. Read the changed files. List what changed in one line each.
2. Check that each new component has a test file beside it,
like Button.test.tsx beside Button.tsx.
3. Grep for migration files. If any changed, stop and flag
that a human must review them.
4. Run the test suite with Bash and report pass or fail counts.
5. End with a short verdict: ready, or not ready and why.
- Line 2, argument-hint: tells the user to pass a PR number, so nobody guesses the format.
- Line 3, allowed-tools: the checklist can read, search and run tests, but cannot write files. Least privilege by default.
- The body: numbered steps in the order Owen actually reviews. Step 3 encodes the migration rule as a stop, not a hope.
- $ARGUMENTS: whatever the user typed after
/pr-checklands in the prompt.
Made-up time saving: say 6 developers each run 4 PR checks a week, and the command saves a made-up 10 minutes per check versus retyping the checklist.
6 × 4 = 24 checks a week. 24 × 10 minutes = 240 minutes, or 4 hours a week, about 200 hours a year. All numbers here are made-up, but the shape is real: small savings multiply across a team.
Commit the file to the repo and every clone gets it. Fix the checklist once, in review, and the fix reaches everyone. That is the whole point.
Next: the lab, where you write one yourself.
Step 5: Hands-on lab
Why this exercise: the exam tests the judgment call, and judgment sticks when your own hands make it once.
Part A: build it locally
Pick one harbor-web workflow: the release checklist, a bug triage, or the weekly dependency update. Write a /triage command, or a skill if Claude should start it alone. Starter files, illustrative:
Lab: Steps 2 and 3 give the anatomy. This lab runs in your browser and needs JavaScript enabled.
Part B: on-page check, sort the workflows
Click an item, then click its box: CLAUDE.md, command or skill.
- The trigger decides most cases: always, a person typing, or Claude noticing a task.
- Supporting files are the tiebreaker for skills. A single short prompt rarely needs a package.
Next: the mix-ups that cost exam marks.
Mix-ups to avoid
- Workflow in CLAUDE.md. A 60-line release checklist there loads into every chat about CSS. Fix: rules in CLAUDE.md, workflows in commands or skills.
- Must-run steps in a skill. A skill fires on Claude's judgment. Fix: steps a person must never skip belong in a command the person starts.
- Files kept on one laptop. A command in a personal folder helps one person. Fix: project commands and skills live in the repo, under
.claude/, reviewed like code. - No argument-hint. Users guess the input format and the command misfires. Fix: one line of frontmatter shows them what to type.
- allowed-tools left wide open. A read-only checklist that can also write files is a risk Imran Qureshi will flag. Fix: list only the tools the job needs.
Teams that share prompts as repo files tend to argue about them once, in review, instead of a little on every task. That is a practice observation, not a measured statistic. The habit that matters: treat a command like code, with an owner and a change history.
Review this chapter in 5 minutes
Watch the whole chapter recapped: who starts it decides the home, command anatomy, skill anatomy, and the pr-check checklist the whole team shares.
- Command: a file in
.claude/commands/, run when a person types its name. Frontmatter can setargument-hintandallowed-tools. Typed input arrives as arguments. - Skill: a folder in
.claude/skills/with instructions plus supporting files. Claude loads it when a task matches.context: forkruns it in its own context. - CLAUDE.md holds rules that must always apply. Commands hold workflows a person triggers. Skills hold capabilities Claude reaches for.
- Commit commands and skills to the repo so the team shares one version.
- Made-up example: 24 checks a week × 10 saved minutes = 4 hours a week.
Decision rule: ask who starts it. Always on means CLAUDE.md. A person typing means a command. Claude noticing the task means a skill.
Independent exam preparation. Not affiliated with or endorsed by Anthropic.
Chapter quiz
Five questions. Score 70% or more to mark this chapter complete.
Review
Glossary
- Slash command
- A saved prompt a person runs by typing its name. Example:
/pr-check 482. - Command file
- A Markdown file in
.claude/commands/. Its name becomes the command name. - Frontmatter
- Settings at the top of a command or skill file. Example:
allowed-tools: Read, Grep. - argument-hint
- Frontmatter text showing what input to type. Example:
[pull-request number]. - allowed-tools
- A frontmatter list limiting which tools a command or skill may use.
- Skill
- A package in
.claude/skills/that Claude loads when a task matches. Example: invoice format know-how with sample files. - Supporting files
- Extra files inside a skill folder, loaded as needed. Example: a field map for supplier invoices.
- context: fork
- Skill frontmatter that runs the skill in its own context, apart from the main conversation.
- CLAUDE.md
- The always-on project instructions file from chapter 13. Example: "Tests sit beside the code."
Next: "Plan mode, direct execution and iterative refinement: choose by risk, then tighten the loop".