Claude · 27 · Part 12 · Reference

Cheat Sheet and Finder

Twenty-six chapters is a lot to carry. This page is the part you will keep open: a finder from "I want to…" to the chapter that does it, the commands and file shapes you will retype most, the surprises that cost real time, and an honest ledger of what was run for real and what it cost. Every fact here appears, with its source, in the chapter it links to.

18
Goals in the finder
12
Surprises worth knowing
73
Logged runs in the ledger
Information current as of: 2026-10-31, Claude Code 2.1.316. Flags and fields change between releases; the chapters name the versions that mattered. When this page and Anthropic's current documentation disagree, the documentation wins.
01
Finder

I Want To…

I want to…UseStart at
Understand what a coding agent isThe agent loop: model, tools, permissionsCh 3
Compare tools without a leaderboardCapabilities and trade-offsCh 4
Install it and run a first sessionInstallation, sign-in, a read-only first taskCh 7
Write a better promptFive-part task, then the library and builderCh 8, 15, 16
Work on a real codebaseScenarios: explain, test, debug, refactor, reviewCh 9
Tell Claude my project's rulesCLAUDE.md, context control, plan modeCh 10
Read exactly what Claude didstream-json, tool calls, denials, costCh 17
Save a repeatable procedureA skillCh 18, 19
Delegate reading or review in isolationA subagent with a tool allowlistCh 20
Run several workers at onceParallel subagents; agent teams (experimental)Ch 21
Enforce a rule the model cannot forgetA hook (exit 2 or a JSON deny)Ch 22
Give Claude access to a tool or dataAn MCP serverCh 23
Share my whole setupA pluginCh 24
Run Claude in a script or pipelineclaude -p with caps and a gateCh 25
Verify a change Claude madeRe-run, probe, review, human decisionCh 26
Use it safely on untrusted code or secretsPermissions, injection, trustCh 13
Build my own agentic environmentLayers: skills, MCP, hooks, plugins, policyCh 12
See where this is headingWhat is documented, preview, or opinionCh 14
Which extension point?
Skillinstructions Claudefollows in the chatCh 18-19 Subagenta separate contextwith its own toolsCh 20-21 Hooka program the harnessruns at fixed pointsCh 22 MCP servera tool Claude cancall, run by youCh 23 Plugin: one folder that packages any of the fournames gain a prefix; installs as a unit (Ch 24) ask first: is this a request, a worker, a rule, or a capability?
02
Commands

The Ones You Will Retype

TaskCommand or flagChapter
Run once, machine-readableclaude -p "…" --output-format json25
Cap a run--max-turns N --max-budget-usd X (checked after a step, so leave margin)25
Pre-approve tools--allowedTools "Read,Bash(git diff *)" with --permission-mode dontAsk25
Schema-checked answer--output-format json --json-schema '{…}', read .structured_output25
Reproducible CI run--bare (needs an API key; not run here)25
See every step--output-format stream-json --verbose17
Continue a session--resume <session-id> or --continue17
Run as a subagent definitionclaude --agent name20
Restrict settings sources--setting-sources user, --settings '{…}'15
Register an MCP serverclaude mcp add --transport stdio --scope project NAME -- cmd args23
Inspect or remove itclaude mcp get NAME, list, remove, reset-project-choices23
Check a pluginclaude plugin validate DIR (well-formed, not working)24
Try a plugin without installingclaude --plugin-dir DIR, then /reload-plugins24
Debug hooks/hooks in a session, or claude --debug22

Hook exit codes: 0 success (stdout is context on UserPromptSubmit and SessionStart); 2 block, with stderr fed back to Claude; anything else is a non-blocking error, and exit 1 is the classic trap. A PreToolUse hook can instead exit 0 and print hookSpecificOutput with permissionDecision set to deny, allow, ask or defer (Chapter 22).

03
Files

Where Everything Lives

ThingProject locationPersonal location
Project rulesCLAUDE.md~/.claude/CLAUDE.md
Settings, permissions, hooks.claude/settings.json (shared), settings.local.json (private)~/.claude/settings.json
Skill.claude/skills/NAME/SKILL.md~/.claude/skills/NAME/SKILL.md
Subagent.claude/agents/NAME.md~/.claude/agents/NAME.md
MCP servers.mcp.json (project scope)~/.claude.json (local and user scope)
Plugina folder with .claude-plugin/plugin.json; skills, agents, hooks/hooks.json, .mcp.json at its root~/.claude/skills/ folders with a manifest load as plugins

Skill frontmatter (Chapter 18): name, description, when_to_use, argument-hint, arguments, disable-model-invocation, user-invocable, allowed-tools, disallowed-tools, model, effort, context, agent, background, hooks, paths, shell. Subagent frontmatter (Chapter 20): name, description, tools, disallowedTools, model, permissionMode, maxTurns, skills, mcpServers, hooks, memory, background, effort, isolation, color, initialPrompt, plus omitClaudeMd and autoCompactWindow. Unknown keys are ignored silently in both, so lint them: Chapter 25 has a free script.

04
Surprises

Twelve Things That Cost Real Time

Each of these was observed while building the hands-on chapters, not copied from a blog. The chapter link has the evidence.

  1. A broken skill can simply be missing. Two deliberately broken skills were absent from the session's skill list, and I could not establish why for the misspelled-key one (Ch 18).
  2. A hook can fail open. With jq missing, the Chapter 12 hook allowed rm -rf and exited 0 (Ch 22).
  3. Exit 1 does not block. Only exit 2, or a JSON deny, does (Ch 22).
  4. PostToolUse sees only successes. An audit hook on it misses every blocked or denied attempt (Ch 22).
  5. MCP permissions are per tool. Allowing one tool did not allow its sibling (Ch 23).
  6. claude mcp list prints every connector you have, including work URLs. Filter before sharing (Ch 23).
  7. Validation is not a test. claude plugin validate passed a plugin whose server path was wrong (Ch 24).
  8. Project hooks and servers run under -p with no trust dialog, unless you use --bare (Ch 25).
  9. A capped or failed run has a null result, and caps are checked after a step, so they overshoot (Ch 25).
  10. A load error does not fail a run. A missing plugin or a bad MCP entry exits cleanly unless you gate on the start-up event (Ch 25).
  11. A subagent starts blind, and a confident reviewer can be wrong: one of three findings had a false premise (Ch 20, Ch 26).
  12. The raw event stream is not publishable. The start-up event lists your installed skills, servers and local paths (Ch 17).
05
Ledger

What Was Run, and What It Cost

The examples repository keeps a log of every captured run: model, turns and the cost Claude Code estimated. Totalled by part:

PartWhat was executed for realEstimated cost
1 to 7 (Ch 1–14)No Claude Code session. Command and project outputs where a page says Actual output; everything else is labelled illustrative or not executednone
8 · Prompts (Ch 15–17)29 library samples, 5 recipes, a stream timeline and a resume checkabout $3.99
9 · Skills (Ch 18–19)Five skill runs, including the loading experimentabout $0.42
10 · Agents (Ch 20–21)Three subagent runs; no agent team was runabout $0.32
11 · Platform (Ch 22–24)Hooks, MCP and plugin sessions on a cheap model, plus many free offline testsabout $0.03
12 · Automation (Ch 25–26)Gate runs and the capstone's two sessionsabout $0.22
Total73 log rows (a few rows cover more than one run)about $4.98

Three notes on reading that table. The costs are client-side estimates, not a bill. Most of Part 8's cost is the larger model answering about three dozen prompts; Part 11 was almost free because hooks, servers and plugins can be tested without a model and the sessions that remained used the small one. And what was not run matters as much: agent teams, HTTP and OAuth MCP servers, marketplace installs, --bare, GitHub Actions and the SDK packages appear on pages as documentation, with the pages saying so.

One thing you can reproduce today for nothing. Clone the examples repository and run hooks/test_hooks.sh, mcp/test_protocol.sh and automation/lint_claude_config.py. None of them calls Claude, and between them they cover most of the failure modes in the list above.
06
Summary

Key Takeaways, Exercises and Sources

∑ The whole guide in six lines
  • Know the loop: a model, tools, and permissions you set.
  • Write requests you can check, and read the log, not the summary.
  • Pick the extension by what it is: request (skill), worker (subagent), rule (hook), capability (MCP), package (plugin).
  • Enforce with mechanisms, explain with prose. Allowlists and hooks hold; sentences ask.
  • Cap and gate anything unattended, and fail the build yourself when the setup did not load.
  • Verify with something you control, and keep the final decision with a person.
Exercises

Exercise 1 Beginner

Make your own one-page cheat sheet: ten commands and file locations you actually use, each with the chapter or documentation page you verified it from. Delete any entry you cannot source.

Learning outcome: keep a reference you can trust.

Exercise 2 Intermediate

Take three tasks you did with Claude this week and place each in the "Which extension point?" picture. For one of them, build the extension and test it without a model first.

Learning outcome: choose the right mechanism.

Exercise 3 Advanced

Write your own ledger for a week of using Claude Code at work: what you ran, what you verified independently, and what you took on trust. Find the one trusted claim that would hurt most if wrong, and add a check for it.

Learning outcome: make trust explicit.

Sources (paraphrased)
  1. This page summarises the earlier chapters; each fact is sourced there. The Anthropic documentation pages behind them are listed at the end of Chapter 25, 24, 23, 22, 20 and 18, with notes on which parts of each page were not read.

The ledger is computed from tools/spend.csv in the examples repository as of 2026-10-31. The Part 1 to 7 row repeats what those pages themselves state. Nothing on this page was executed separately.