CCDV-F · Claude Code
Choosing a Claude Code extension, Skill, plugin, rule, hook, subagent or command
A team has four pains. Nobody remembers that tests follow a certain format. Every Friday someone retypes the same release-notes prompt by hand. Once a month, a change touches a migrations file that should never be edited manually. And an analysis task fills the main conversation with ten thousand lines of output. Claude Code has a different piece for each, and the exam asks which.
What each piece solves
| Piece | What it is for | When it loads |
|---|---|---|
Rules file, in .claude/rules/ |
Conventions that apply to certain files (with paths) or that must always be present |
When those files are touched, or always |
Skill, .claude/skills/<name>/SKILL.md |
A procedure used on demand, with instructions and supporting files | Only the description at start; the body, when used |
Slash command, .claude/commands/ |
A saved prompt triggered with /name (today equivalent to a simple skill) |
When invoked |
Hook, in settings.json |
Something that must happen no matter what on an event (before or after using a tool) | The system runs it, not the model |
Subagent, .claude/agents/ |
A task worth isolating: its own context, its own tools | It is delegated to and returns a summary |
| Plugin | The package that bundles several of the above (plus MCP servers) to install together | When installed |
How to decide
Ask the workflow three questions:
- Does it have to be deterministic? If it must happen always and without exceptions (format, block a write, log), it is a hook. A rule or a Skill is an instruction: the model may not follow it.
- Is it used always or on demand? Permanent conventions go in rules or CLAUDE.md. A procedure invoked now and then goes in a Skill, so you do not pay for it in every conversation.
- Is it noisy, or does it need other tools? If it fills the context or must run with different permissions, it goes to a subagent, which returns only the conclusion.
If the idea is to share it across projects or teams, package it as a plugin.
Authoring and packaging
- A Skill is a folder with a
SKILL.md: in the header,nameand a precisedescription(Claude picking it correctly depends on that); in the body, the procedure. Withdisable-model-invocation: trueonly a person triggers it, which matters when it has effects, like deploying or cutting a release. - A rule with
paths(for examplesrc/api/**) only loads when Claude works on matching files, instead of taking up context all the time. - A subagent declares its
description, the tools it may use and its system prompt. - A plugin ships a manifest (
.claude-plugin/plugin.json) with name and version, and inside it Skills, commands, agents, hooks or MCP servers. It is distributed from a team marketplace or a repository, and the version controls what each person runs.
The typical traps
- Asking a Skill or a rule for something that must be met every time: that is a hook.
- A Skill for a convention that should always load, or putting in CLAUDE.md a workflow used now and then.
- One giant CLAUDE.md for everything, instead of rules with
paths. - Letting Claude trigger a Skill with side effects on its own.
- Copying files by hand from project to project instead of packaging them as a plugin.
- A subagent for something that fits in a one-line instruction.
On the exam
Read what the workflow needs: a guarantee (hook), a per-file convention (rule with paths), an on-demand procedure (Skill or command), a noisy or isolated task (subagent), distribution across teams (plugin). If two options look valid, the tie-breaker is usually whether the requirement is “always” or “sometimes”.
Quick question
A practice exam question on this domain. It counts towards your progress.
A team added a step to its CI pipeline that runs Claude Code in non-interactive mode to classify each pull request as "low", "medium" or "high" risk. The command is claude -p with a prompt, and a shell script extracts the label from the printed text with grep. The step works most days, but fails whenever Claude adds a sentence of explanation before the label or writes it in a different case.
The pipeline needs a machine-readable result, plus the session identifier for logs. The team does not want to maintain a growing list of patterns. The runner has no interactive terminal.
Which approach is best?