Chapter 5: Getting started with Claude Code
Introduces Claude Code’s ability to work autonomously in a repository and the judgment required to decide how much independence to give it.
After this chapter you will be able to
- Claude Code’s agentic scope. Describe how Claude Code differs from an ordinary chat: it runs inside a repository with access to code and machine tools, so one prompt can initiate an extended coding turn.
- Autonomy and review tradeoff. Explain why giving Claude Code free rein creates a review burden, and distinguish tasks suited to that approach from ones that call for closer direction.
- Agentic coding and tools. Explain how agentic coding goes beyond generating code and can work autonomously from a problem description.
- Repository access and navigation. Describe where Claude Code runs and how access to the repository helps it investigate a problem.
- Cloud model and local tools. Trace how a Claude Code turn combines a cloud-hosted model with tool calls on your machine.
- Permissions without a sandbox. Distinguish Claude Code’s permissions model from a physical sandbox.
- Claude Code setup and login. Describe how to install Claude Code and sign in before using it: download a native installer or install from the terminal, then complete the Anthropic account login in a browser.
- Editor-based code review. Explain why running Claude Code inside a familiar editor helps with reviewing its work, and distinguish optional editor plugins from the Claude Code engine.
- Editor session in manual mode. Describe how to start Claude Code from an editor opened on the application’s Git repository, and explain what manual permission mode requires.
- Fresh session repository context. Explain how CLAUDE.md gives a fresh Claude Code session a head start on a repository.
- CLAUDE.md creation with init. Describe how CLAUDE.md can be created and what Claude can draw on to write it in an established or not-yet-coded project.
- Initialization and decision clarification. Describe how to use /init with project context and respond to Claude’s questions to prepare documentation for future agents.
- Project-level instructions file. Justify choosing a project-level CLAUDE.md file instead of a personal one for shared project work.
- Agent documentation and guidance. Explain what the generated CLAUDE.md contains and why the author prefers Claude to generate and maintain it.
- Permission mode tradeoffs. Distinguish what manual, acceptEdits, plan, auto, and bypassPermissions allow, and explain why the choice affects both interruptions and control.
- Unrestricted mode risks. Explain why bypassPermissions is risky, when the author has used it despite that risk, and what the Azure incident illustrates.
- Auto mode permission review. Describe how auto mode evaluates proposed tool use and why the author presents it as a better alternative to bypassPermissions.
- Walking skeleton scaffolding. Describe the intended first build for a greenfield, distributed application and what Claude produced in the example session.
- Auto mode workflow control. Explain the workflow trade-off of letting Claude handle permission requests and how the author changed its future behavior.
- Selective code review. Explain why the reviewer should focus on important parts of Claude's code rather than read every line, while recognizing that a quick scan alone provides limited confidence.
- Independent quality checks. Describe how to increase confidence in Claude's work by independently running the build, tests, and application, using the checks you would normally apply before a PR.
- MVP for a greenfield build. Explain why the author starts a large greenfield build with an MVP of the auth service rather than asking Claude for a complete first draft.
- Superpowers skills and design approval. Describe how Claude Code can pick up Superpowers skills without being told which one to use, and how an MVP request can lead to brainstorming, questions about scope, and a proposed design for the reader to approve or adjust.
- Goal driven work and limits. Explain how /goal keeps Claude Code working toward a stated condition, why unit and integration tests can serve as gates, and how a turn limit guards against extended work on an ambiguous goal.
- Tests and client side exploration. Describe how the author checked the generated service by running the containerized application and tests, then explored the API with a generated REST Client file that documents and executes linked HTTP calls.
- Agent productivity and review balance. Explain how to choose between one well-prompted session and several smaller sessions by considering both the productivity gained from Claude and the review needed to trust and accept its output.
- Complete service beyond MVP. Describe what must change for a built and tested MVP to count as a complete service in this exercise: implement all its features, include engineering deliverables, and run it on the chosen platform.
- Interactive review during implementation. Describe how to use the Claude Code session while implementation is underway to gain confidence in the result.
What it builds on
- Tokens and context windows (chapter 1) · The idea that Claude usage involves tokens.
Section by section
Introduction
Introduces Claude Code’s ability to work autonomously in a repository and the judgment required to decide how much independence to give it.
- Claude Code’s agentic scope: Describe how Claude Code differs from an ordinary chat: it runs inside a repository with access to code and machine tools, so one prompt can initiate an extended coding turn.
Why it matters: This explains why using Claude Code calls for a different level of oversight than an ordinary chat. - Autonomy and review tradeoff: Explain why giving Claude Code free rein creates a review burden, and distinguish tasks suited to that approach from ones that call for closer direction.
Why it matters: Choosing the right level of direction keeps a long autonomous run from becoming an unmanageable review task. - Low-risk project testing ground: Justify using the specified, production-grade project that will not run in production to experiment with Claude Code.
Why it matters: The project provides room to try more autonomous coding without treating the experiment as a live production deployment.
Key terms: Claude Code, agentic coding, repository, reviewer, acceptance-test, free rein, production-grade project, testing ground
5.1 What is agentic coding?
This section introduces agentic coding and explains how Claude Code works with a repository, local tools, and permissions.
- Agentic coding and tools: Explain how agentic coding goes beyond generating code and can work autonomously from a problem description.
Why it matters: This distinction helps you see Claude as a participant in the development workflow, not just a code generator. - Repository access and navigation: Describe where Claude Code runs and how access to the repository helps it investigate a problem.
Why it matters: Running in the repository lets Claude investigate the actual project rather than only the text pasted into a prompt. - Cloud model and local tools: Trace how a Claude Code turn combines a cloud-hosted model with tool calls on your machine.
Why it matters: This explains how one prompt can lead to several local development actions. - Permissions without a sandbox: Distinguish Claude Code’s permissions model from a physical sandbox.
Why it matters: Permissions matter because a separate sandbox is not physically limiting what Claude Code can access.
Key terms: agentic coding, autonomously, terminal application, repository, codebase, tool calls, single turn, Anthropic’s cloud, permissions, sandbox
5.2 Installing and running Claude Code
This section explains how to install and sign in to Claude Code, how its usage affects other Claude tools, and why running it in an editor helps with code review.
- Claude Code setup and login: Describe how to install Claude Code and sign in before using it: download a native installer or install from the terminal, then complete the Anthropic account login in a browser.
Why it matters: Installation alone is not enough; you need to authenticate before using Claude Code. - Shared account usage quotas: Explain that Claude Code and other Claude tools draw on the same account quotas, so exhausting usage in one affects access to the others until the quota resets.
Why it matters: Heavy use of Claude Code can temporarily limit your use of Claude elsewhere. - Editor-based code review: Explain why running Claude Code inside a familiar editor helps with reviewing its work, and distinguish optional editor plugins from the Claude Code engine.
Why it matters: Seeing changed files and their differences supports your role as reviewer when Claude writes code.
Key terms: native installers, claude command, Anthropic account, token consumption model, quotas, editor, Git integration, file differences, Claude Code plugins, Claude Code engine
5.3 Try it now — run Claude Code in your editor
This exercise starts a Claude Code session in the application repository from an editor terminal, with approvals required before Claude acts.
- Editor session in manual mode: Describe how to start Claude Code from an editor opened on the application’s Git repository, and explain what manual permission mode requires.
Why it matters: It establishes a session in the right project while keeping file edits and tool use subject to your approval.
Key terms: Git repository, docs folder, terminal window, manual permission mode
5.4 Your first Claude Code session
This section explains how CLAUDE.md gives fresh Claude Code sessions repository context and how to create it with /init.
- Fresh session repository context: Explain how CLAUDE.md gives a fresh Claude Code session a head start on a repository.
Why it matters: A repository description saves Claude from having to rediscover basic project details in every session. - CLAUDE.md creation with init: Describe how CLAUDE.md can be created and what Claude can draw on to write it in an established or not-yet-coded project.
Why it matters: You can give future sessions useful project guidance even before the project has code.
Key terms: CLAUDE.md, context, Claude Code session, /init, project README, design documentation
5.5 Try it now — use Claude to build the agent documentation
This section walks through using Claude Code to initialize shared agent documentation and resolve project decisions before coding.
- Initialization and decision clarification: Describe how to use /init with project context and respond to Claude’s questions to prepare documentation for future agents.
Why it matters: Initialization helps turn existing project context and unresolved decisions into useful guidance before implementation begins. - Project-level instructions file: Justify choosing a project-level CLAUDE.md file instead of a personal one for shared project work.
Why it matters: The file’s location determines whether its guidance is shared with the project team. - Agent documentation and guidance: Explain what the generated CLAUDE.md contains and why the author prefers Claude to generate and maintain it.
Why it matters: Good agent documentation gives later sessions context and warns them away from predictable mistakes.
Key terms: /init, initialization, CLAUDE.md, project-level CLAUDE.md, personal, repo, markdown, repo layout, open decisions, conventions that are easy to get wrong
5.6 Changing the permission mode to let Claude run free
This section compares Claude Code permission modes and explains why auto mode can reduce approval interruptions without removing permission checks entirely.
- Permission mode tradeoffs: Distinguish what manual, acceptEdits, plan, auto, and bypassPermissions allow, and explain why the choice affects both interruptions and control.
Why it matters: The mode you choose determines how often work pauses and what Claude can do without your approval. - Unrestricted mode risks: Explain why bypassPermissions is risky, when the author has used it despite that risk, and what the Azure incident illustrates.
Why it matters: Removing approval pauses can also remove the chance to stop a costly mistake. - Auto mode permission review: Describe how auto mode evaluates proposed tool use and why the author presents it as a better alternative to bypassPermissions.
Why it matters: Auto mode offers fewer human interruptions while retaining a check on proposed actions.
Key terms: permission mode, manual, acceptEdits, plan, auto, bypassPermissions, CLAUDE.md, risk-accepted circumstances, auto mode, AI classifier
5.7 Try it now — build out the application scaffolding in auto mode
The section walks through using Claude Code in auto mode to build a walking skeleton, then shows why the user must clarify scope and retain control over workflow decisions.
- Walking skeleton scaffolding: Describe the intended first build for a greenfield, distributed application and what Claude produced in the example session.
Why it matters: It gives you a concrete first milestone without mistaking scaffolding for a finished feature. - Scaffolding scope clarification: Explain why the user clarified the depth of scaffolding before letting Claude proceed.
Why it matters: Files in a repository can influence Claude’s proposed work even when they were not intended as implementation instructions. - Auto mode workflow control: Explain the workflow trade-off of letting Claude handle permission requests and how the author changed its future behavior.
Why it matters: Auto mode can save interruptions, but explicit project rules help keep consequential workflow choices with you.
Key terms: walking skeleton, boilerplate code, Dockerfiles, Docker Compose, Helm chart, design docs, full vertical slice, phase 0, auto mode, permission requests
5.8 Your role as reviewer
The section explains how to review Claude-written code efficiently by combining selective inspection with independent checks and remaining accountable for the result.
- Selective code review: Explain why the reviewer should focus on important parts of Claude's code rather than read every line, while recognizing that a quick scan alone provides limited confidence.
Why it matters: Targeted inspection saves time without mistaking a plausible-looking implementation for a verified one. - Independent quality checks: Describe how to increase confidence in Claude's work by independently running the build, tests, and application, using the checks you would normally apply before a PR.
Why it matters: Independent checks turn a reviewer's expectations into observable evidence about the delivered app. - Accountability at greater distance: Explain how the engineer remains accountable when Claude does more work autonomously, and when user-acceptance testing can be an appropriate review role.
Why it matters: Autonomy can improve productivity, but it does not transfer responsibility for judging the result away from the engineer.
Key terms: source code scan, micro-review, external proofs, quality gates, definition of done, pytest, Docker Compose, accountable, external constraints, user-acceptance tester
5.9 Writing code with the Superpowers skills
The section explains why an MVP is a manageable first step for a complex Claude Code build, while noting where Claude has already saved time.
- MVP for a greenfield build: Explain why the author starts a large greenfield build with an MVP of the auth service rather than asking Claude for a complete first draft.
Why it matters: An early, testable slice lets you make progress without taking on an overwhelming review. - Time saved beyond coding: Describe the build work Claude has sped up so far, beyond writing code.
Why it matters: The benefit of Claude Code includes speeding up the work surrounding the code, not just typing it.
Key terms: greenfield build, minimum viable product (MVP), key workflows, auth service, dependency versions, tests, Docker images, deployment artifacts
5.10 Try it now — build the MVP for your first service
This section walks through building a service MVP with Claude Code, then checking the resulting code and API while keeping agent autonomy balanced with review.
- Fresh context for MVP work: Explain when to use /clear before starting the MVP: the existing session contains scaffolding context that no longer helps, and /clear resets that context without requiring a new session.
Why it matters: Clearing stale context gives the next task a fresh start without opening another session. - Superpowers skills and design approval: Describe how Claude Code can pick up Superpowers skills without being told which one to use, and how an MVP request can lead to brainstorming, questions about scope, and a proposed design for the reader to approve or adjust.
Why it matters: The agent can help shape the MVP, but you still get to resolve scope questions and review its plan. - Goal driven work and limits: Explain how /goal keeps Claude Code working toward a stated condition, why unit and integration tests can serve as gates, and how a turn limit guards against extended work on an ambiguous goal.
Why it matters: A goal can let Claude take on a longer task, but a clear completion condition and guard help control the work. - Tests and client side exploration: Describe how the author checked the generated service by running the containerized application and tests, then explored the API with a generated REST Client file that documents and executes linked HTTP calls.
Why it matters: Tests check whether the service runs, while trying its API helps reveal what Claude actually built for clients. - Agent productivity and review balance: Explain how to choose between one well-prompted session and several smaller sessions by considering both the productivity gained from Claude and the review needed to trust and accept its output.
Why it matters: Planning how you will verify the result is part of deciding how much work to hand to Claude at once.
Key terms: /clear, context, Superpowers plugin, brainstorming skill, MVP, /goal, evaluator, turns, testing gates, Docker Compose
5.11 Your turn: Complete the first service
This section asks the reader to turn a working MVP into a complete, verifiable service by directing Claude Code and reviewing its work.
- Complete service beyond MVP: Describe what must change for a built and tested MVP to count as a complete service in this exercise: implement all its features, include engineering deliverables, and run it on the chosen platform.
Why it matters: It gives you a concrete standard for deciding whether Claude has finished the service rather than merely extended the MVP. - Direction of implementation choices: Explain how the author directed Claude’s auth-service implementation, including the missing functionality and the choice of a locally runnable identity provider.
Why it matters: The example shows that you can specify important architectural choices while Claude carries out the implementation. - Interactive review during implementation: Describe how to use the Claude Code session while implementation is underway to gain confidence in the result.
Why it matters: Checking in and asking for evidence helps you decide whether the delivered service meets your standards.
Key terms: MVP, SOLID principles, automated testing, scripted deployments, quality gates, auth MVP, stub identity provider, Dex, OAuth Proxy, Docker Compose
5.12 Summary
Where this is used later
- Try it now — enter plan mode and think through the BDD strategy (chapter 6) · The reader enters plan mode to work through a strategy before implementation.
- (chapter intro) (chapter 6) · Allowing Claude Code to work with less direct oversight
- Writing the behavior-driven strategy plan (chapter 6) · The reader’s role as a reviewer of Claude’s work.
- Building the first feature with BDD (chapter 6) · Frames the engineer's review role as Claude builds a feature.
- Working with a hierarchy of plans (chapter 6) · Planning work in stages relies on clear task boundaries and ways to accept each result.
Concepts explained in this chapter
- minimum viable productA minimum viable product is an early implementation containing enough functionality to validate workflows and provide useful value.
- Claude CodeClaude Code is a software development tool that assists with writing, running, testing, and debugging code through natural-language interaction.
- quality gateA quality gate is a predefined verification criterion that software must satisfy before progressing in a delivery process.
- Docker ComposeA Docker Compose file is a declarative configuration file describing application services, dependencies, and their runtime settings.
- auto permission modeAuto permission mode is a Claude Code mode that uses an AI classifier to evaluate tool permissions instead of repeatedly requiring direct human approval.
- REST ClientREST Client is a Visual Studio Code extension for documenting and executing HTTP requests.
- Superpowers pluginSuperpowers is a community Claude Code plugin that provides reusable coding skills.
- agent skillA skill is a reusable set of instructions and supporting resources that guides Claude through a particular task or workflow.
- brainstormingA brainstorming technique explores an idea, investigates implementation approaches, and produces a design for implementation.
- goal commandThe /goal command instructs Claude Code to continue working until a specified condition is reached.
- agentic developmentAgentic coding is a software development approach in which an AI agent directly navigates, modifies, builds, deploys, and tests a repository's codebase.
- CLAUDE.mdA CLAUDE.md file is a Markdown instruction file that provides Claude Code with project or personal guidance for software development work.
- /init commandThe /init command is a Claude Code command that generates a CLAUDE.md file from an existing codebase or its documentation.
- permission modeA permission mode is a Claude Code setting that determines how Claude requests or receives authorization for actions.
- tool useTool use is an AI technique in which a model invokes external capabilities such as web search or script execution.
- diffA diff is a representation of the additions, deletions, and modifications between two versions of content.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
