What you need to know
Pick by what the workflow needs
| Need | Extension | Why |
|---|---|---|
| Must happen every time, or never (format after edits, block a path) | Hook | Runs as code at a lifecycle event |
| A procedure used sometimes (release checklist, API-client generator) | Skill | Only name and description load until a task matches |
| Run only when typed (/deploy-check) | Skill with disable-model-invocation: true | Invoked by name, never by the model |
| Guidance for one part of the codebase | Rules file in .claude/rules/ with paths | Loads only for matching files |
| Bulky work whose details the main session does not need (review a large diff) | Subagent | Separate context, returns a summary; own tool list |
| Share a whole setup across the team or many repos | Plugin | Bundles Skills, hooks, subagents and MCP servers, versioned |
| Rules for one repo, shared with whoever clones it | Project .claude/ folder | Committed with the code |
Writing a Skill that gets used
A Skill is a folder with SKILL.md (YAML front matter plus instructions) and optional scripts or reference files. Claude decides whether to load it from the name and description, so the description must say what it does and when to use it, using the words people actually type. A longer body does not help selection; it is read only after the Skill is chosen.
Subagents
Define them in .claude/agents/ with a description, a prompt and a tool list. They start with a clean context: they do not inherit the parent's loaded Skills, so list the Skills a subagent needs in its definition. Restrict tools to enforce a role (a reviewer gets read-only tools).
Packaging a plugin
- Bundle every script and file the plugin needs; reference them with
${CLAUDE_PLUGIN_ROOT}(or$CLAUDE_PROJECT_DIRfor project files). Never use the author's absolute paths or globally installed tools. - Document required environment variables and declare dependencies.
- Plugin commands are namespaced:
/payments:run-tests. Renaming the plugin renames its commands. - Distribute through a marketplace. Organizations can restrict allowed marketplace sources and pre-register approved ones in managed settings.
In the exam
Items describe a team workflow or a broken extension and ask which mechanism fits or what to fix. Match "always/never" to hooks, "sometimes" to Skills, "one area" to rules files, "bulky and separate" to subagents, and "share and version" to plugins. Distractors put procedures in CLAUDE.md, enforcement in Skills, or machine-specific paths in plugins.
Check your understanding
A 12-step release checklist is needed only when preparing a release. Where should it live?
Show answer
Answer: C. A Skill loads only when the task matches its description.
A custom subagent ignores the team's api-review Skill that the main session uses. Why?
Show answer
Answer: A. A subagent starts clean and gets only what it is given.
A plugin's hook calls /Users/sam/tools/check.sh and fails for teammates. Fix?
Show answer
Answer: D. Bundled files referenced through the plugin root resolve on every machine.
Apply it: Package Quarry Lane's team setup
Quarry Lane wants: Prettier on every edited file; no edits to infra/prod/; a release-notes procedure used about once a week; a review of large diffs that should not flood the main session; and SQL migration rules for db/migrations/ only. All 60 engineers should get the same version.
- Map each need to an extension.
- Write the release Skill's front matter.
- Describe the plugin and how it is distributed and controlled.
Done when: nothing depends on a single engineer's machine.
Show model answer
1. Prettier: PostToolUse hook on edit tools. infra/prod/: PreToolUse hook (and a managed deny rule). Release notes: Skill. Large diffs: a read-only review subagent that lists the review Skill it needs. Migrations: .claude/rules/migrations.md with paths: ["db/migrations/**"].
2.
---
name: release-notes
description: Drafts release notes from merged PRs since the last tag, in Quarry Lane's format. Use when asked for release notes, a changelog or "what shipped".
---
3. Plugin "ql-dev" bundles the hooks (scripts inside the plugin, called through ${CLAUDE_PLUGIN_ROOT}), the Skills, the subagent and the docs MCP server, with a version number and README listing required environment variables. It is published in Quarry Lane's internal marketplace; managed settings allow only that marketplace and pre-register it.