The last working chapter gathers everything into a ready production profile - but this is not a universal policy, it is a reviewable starting point. The commands, paths and domains in the example must match your repository; copying someone's profile mechanically is not allowed. The point of a profile is not to give the single correct config but to show a coherent form: minimal shared settings, explicit permissions, a sandbox, version pinning and gates - which you fill with your values.
The profile's base is a .claude/settings.json with a bundle of permissions and sandbox. The default mode is default; in allow are the families of verification commands; in ask are push and leaving the sandbox; in deny are reading .env, secrets and utility directories like dist and coverage. The sandbox is on in strict mode, with a narrow network allowlist and explicit denies on credentials - ssh, aws, GITHUB_TOKEN, NPM_TOKEN. It helps to see such a baseline in full once: it reads as an explicit description of working boundaries, not a set of random keys.
This baseline has an expected consequence that is the very point of review. It can break your legitimate GitHub and npm commands, because it closes tokens and push. This is not an error of the example but an invitation to think: if the task really requires a credential, it is granted through a narrower trusted route rather than removing all protection at once. The profile is deliberately strict by default - it is relaxed pointwise and consciously, for a concrete proven need, not "to make it work".
The profile's second element is a runbook for one change, turning the book's scattered techniques into a repeatable order. It goes through five phases: PREPARE (version, git, /status, the task contract), RESEARCH (plan mode, entry points, migration/rollback), IMPLEMENT (edits in scope, do not touch generated and secrets, focused tests along the way), VERIFY (lint, typecheck, tests, diff, an independent review) and HANDOFF (a summary of the result, changed files and checks, residual risks, commit only by a human decision). It helps to see it in full once.
Version management is a mandatory part of the production profile, because Claude Code updates often. The sensible cadence is this: keep the stable channel for most and test latest on canary machines; read the changelog for security, removed commands and config migrations; set requiredMinimumVersion only after rollout; pin the model and provider identifiers in automation if alias drift is unacceptable; run /doctor, policy negative tests and skill and hook evals once a month; update the internal guide together with the settings schema.
After an update you especially recheck the behavior of permissions, the sandbox, worktrees and hooks - it is here that significant changes most often live. A telling example: in the version this book is pinned to, the changelog contains security fixes around worktree isolation and hooks bypass. Such changes matter more than any new UI shortcut, and missing them on an upgrade means carrying into production behavior the authors have already deemed unsafe. Reading the changelog for security is not a formality but a part of operation.
There is also a criterion of readiness for autonomy - a definition of ready. Raising the mode from Manual to Accept edits or Auto is worth it when the repository has clean tests, exact commands, scoped rules, protected secrets, a sandbox, a reversible git workflow and a measurable review. The key idea: autonomy is a consequence of the environment's maturity, not a setting for speed. Giving the agent more freedom in an immature environment means not speeding up but shifting the cost of a mistake to production, where it is most expensive.
With this the book's working part closes on one principle: Claude Code turns from a set of features into a controllable system when the environment is reproducible, the boundaries are explicit and the result is verifiable. The profile, the runbook and the migration cadence are tools of exactly this. And the last thing to remember: the product changes fast, this edition is checked against the official documentation for a specific version, and the links in each chapter are part of the instruction. Verify the version by command, keep the config minimal and explainable, and raise autonomy by maturity, not by wish.
# Runbook for one change
PREPARE version = baseline; git clear; /status as expected; task contract
RESEARCH plan mode; entry points/callers/tests; migration/rollback for risky
IMPLEMENT edits in scope; do not touch generated/vendor/secrets; focused tests along the way
VERIFY lint/typecheck/tests; integration by risk; diff; independent review
HANDOFF result summary; changed files + commands; risks; commit by human decision// .claude/settings.json - a reviewable baseline (replace for your repo)
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"defaultMode": "default",
"allow": ["Bash(npm run lint:*)", "Bash(npm run typecheck:*)", "Bash(npm test:*)"],
"ask": ["Bash(git push:*)", "Bash(dangerouslyDisableSandbox:true)"],
"deny": ["Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)",
"Read(/dist/**)", "Read(/coverage/**)"]
},
"sandbox": {
"enabled": true, "autoAllowBashIfSandboxed": true, "allowUnsandboxedCommands": false,
"network": { "allowedDomains": ["registry.npmjs.org"] },
"credentials": {
"files": [{ "path": "~/.ssh", "mode": "deny" }, { "path": "~/.aws/credentials", "mode": "deny" }],
"envVars": [{ "name": "GITHUB_TOKEN", "mode": "deny" }, { "name": "NPM_TOKEN", "mode": "deny" }]
}
},
"respectGitignore": true,
"cleanupPeriodDays": 30
}