Claude Code: The Complete Guide

NEW Covers Claude Code 2.1

Claude Code The Complete Guide

From your first session to skills, hooks, MCP, subagents, and automation. Learn to work with an AI agent that reads your code, plans the change, edits the files, runs the tests, and checks its own work, with every command, setting, and screen shown as it really ran.

Buy the paperback Kindle edition Apple Books Coming soon
  • Plan mode
  • CLAUDE.md
  • Skills
  • Subagents
  • Hooks
  • MCP servers
  • Plugins
  • Headless mode
The book Claude Code: The Complete Guide, in front of two facing pages of the chapter on plan mode
58Chapters
305Figures and screenshots
231Tables
5Appendices
781Pages
Why this book

Stop guessing what the agent will do

Claude Code can read a whole project, change many files, and run commands on your machine. Used well, it does a day's work in an hour. Used blindly, it burns tokens, asks for permission all day, or edits what it should not. This book shows how to stay in control, step by step, with every screen as it really looked.

Learning it alone

Scattered posts, and features you never find

  • Tips spread across videos, threads, and changelogs, each for a different version.
  • Skills, subagents, hooks, MCP, and plugins that sound alike, with no word on which one to pick.
  • Permission prompts all day, or a "skip all permissions" flag you were never told to fear.
  • Errors and usage limits that stop the work, with no idea of the cause.
With this book

Every feature, run and shown, in the order you need it

  • 58 chapters, from installing Claude Code to running teams of agents, each built on the one before.
  • Every command, prompt, and file labeled, so you know where it goes, and 305 screenshots of what came back.
  • A chapter on choosing the right extension, and permission rules that keep the agent safe without slowing you down.
  • Costs, token usage, /doctor, and an index of the errors you will meet, with their fixes.
How the book shows it

Every block says where it goes

Each code block in the book carries a label: TERMINAL for what you type in your shell, PROMPT for what you say to Claude, FILE with the file's name for what you save, and OUTPUT for what came back. Here is plan mode from Chapter 11, in three steps.

01

Start in your terminal

A session that only plans: Claude can read and search the project, but it changes nothing until you approve the plan.

Terminal
claude --permission-mode plan
02

Tell Claude what you want

The prompt of the chapter, for a small to-do app in Python. Claude explores the code and returns a short, numbered plan.

Prompt
Plan how to add a done command to tasks.py that marks a task as complete by its number. Keep the plan short.
03

Keep it as a setting

Like the way of working? One line in the project's settings starts every session in plan mode.

File · .claude/settings.json
{ "permissions": { "defaultMode": "plan" } }
Examples and screens

The setup, and what Claude did

Every example was run with Claude Code 2.1, and every screenshot was taken from the real session. Here are six of them, as they appear in the book.

Claude Code · Chapter 11 · Plan mode
Terminal
claude --permission-mode plan
Prompt
Plan how to add a done command to tasks.py that marks a task as complete by its number. Keep the plan short.
The session
A finished plan, followed by the approval menu and the Ctrl+G hint for editing the plan
File · .claude/skills/summarize-changes/SKILL.md
--- description: Summarizes uncommitted changes and flags anything risky. Use when the user asks what changed, wants a commit message, or asks to review their diff. allowed-tools: Bash(git diff *) ---## Current changes!`git diff HEAD`## InstructionsSummarize the changes above in two or three bullet points, then list any risks you notice such as missing error handling, hardcoded values, or tests that need updating. If the diff is empty, say there are no uncommitted changes.
Prompt
What did I change?
The session
The summarize-changes answer: a short summary, then risks such as a crash when no name is given
File · .claude/agents/code-reviewer.md
--- name: code-reviewer description: Reviews JavaScript files for bugs and readability. Use proactively after code changes. tools: Read, Grep, Glob model: haiku color: blue ---You are a careful code reviewer. You never edit files. Read the files you are asked about and report: 1. Bugs (with the line number) 2. Readability fixes Keep the report under 8 short bullet points.
Prompt
Use the code-reviewer subagent to review src/cart.js
The session
The delegation row code-reviewer marked Backgrounded agent, with a panel listing main and the running helper
File · .claude/hooks/protect-files.sh
#!/bin/bash # Blocks edits to sensitive files (PreToolUse on Edit|Write) INPUT=$(cat) FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')for pattern in ".env" "package-lock.json" ".git/"; do if [[ "$FILE_PATH" == *"$pattern"* ]]; then echo "Blocked: $FILE_PATH matches protected pattern '$pattern'" >&2 exit 2 fi done exit 0
The session
A PreToolUse hook error blocking the edit to .env, with Claude explaining the protected pattern
Terminal
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp claude mcp list
Prompt
Use the claude-code-docs server to look up what MCP_TIMEOUT does. Answer in two short sentences.
The terminal
claude mcp add saving claude-code-docs to local config, then claude mcp list showing it Connected and a project server pending approval
Terminal
claude -p "Summarize README.md in one sentence" --output-format json \ | jq '{result, session_id, num_turns, is_error, total_cost_usd}'
The terminal
JSON output filtered by jq to result, session_id, num_turns, is_error and total_cost_usd

Chapter 11: in plan mode, Claude explores the project and writes a plan, then asks how to go on: build it with auto mode, approve each edit, or keep planning.

Look inside

Real pages from the book

Chapters that open with what you will learn, steps you can follow, labeled code, tables you can scan, and screenshots of every result. Click any page to read it.

What the book covers

Everything Claude Code can do, in the order you need it

Start with the install and your first session, then learn the daily workflow, give Claude a memory, extend it, automate it, keep it safe, and use it beyond the terminal.

CH 1–6Getting startedInstall on macOS, Linux, and Windows, plans and sign-in, the terminal, your first session, and how the agent loop works.
CH 7–9CommandsInteractive mode, slash commands, and the commands for reviewing, undoing, and extending.
CH 10–12Permissions and plan modePermission modes, plan mode, and allow, ask, and deny rules that fit your project.
CH 13–19Sessions and habitsCheckpoints and rewind, sessions, the context window, models and effort, bugs, tests, and habits that get results.
CH 20–26Memory and configurationCLAUDE.md, auto memory, the .claude folder and settings, environment variables, output styles, status line, and shortcuts.
CH 27–30Skills and subagentsSkills, writing skills that work, subagents, and how to choose the right extension.
CH 31–36Hooks, MCP, and pluginsHooks, MCP servers with resources and elicitation, plugins and marketplaces, and mods.
CH 37–43Automation and scaleHeadless mode, /loop and routines, Git worktrees, agent teams, goals and workflows, monorepos, and GitHub Actions.
CH 44–46SafetyThe sandbox, dev containers and Docker, code and security review, and privacy and data handling.
CH 47–50Beyond the terminalVS Code and JetBrains, the web, your phone and Slack, Bedrock, Vertex AI and Foundry, and the Agent SDK.
CH 51–53Costs and troubleshootingToken usage and cost, /doctor and diagnosing problems, and the error messages with their fixes.
CH 54–58Five projectsA website and a to-do app, a REST API, legacy code, an app with an AI feature, and everyday jobs without code.
Contents

Nine parts, 58 chapters

Read Part I and II in order, then go to the chapter you need. Five appendices hold a quick reference of commands and keys, the settings and environment variables, an error index, extensions worth knowing, and a glossary.

IChapters 1–6

Getting Started

Install Claude Code, sign in, set up your terminal, and run your first session.

  • 1Meet Claude Code
  • 2Installing Claude Code
  • 3Plans, Sign-In and Usage Limits
  • 4Setting Up Your Terminal
  • 5Your First Session
  • 6How Claude Code Works
IIChapters 7–19

Everyday Work

The commands, modes, and habits of a working day with Claude Code.

  • 7Interactive Mode
  • 8Slash Commands
  • 9Commands for Reviewing, Undoing and Extending
  • 10Permission Modes
  • 11Plan Mode
  • 12Allow, Ask and Deny Rules
  • 13Checkpoints, Rewind and Branches
  • 14Sessions
  • 15Managing the Context Window
  • 16Models, Effort and Fast Mode
  • 17Fixing a Bug
  • 18Adding a Feature With Tests
  • 19Working Habits That Get Results
IIIChapters 20–26

Memory and Configuration

Give Claude a memory of your project, and make Claude Code your own.

  • 20CLAUDE.md: Project Memory
  • 21Auto Memory
  • 22The .claude Folder and Settings Files
  • 23Environment Variables
  • 24Output Styles
  • 25The Status Line
  • 26Your Own Keyboard Shortcuts
IVChapters 27–36

Extending Claude Code

Skills, subagents, hooks, MCP, and plugins, and which one to use when.

  • 27Skills
  • 28Writing Skills That Work
  • 29Subagents
  • 30Choosing the Right Extension
  • 31Hooks
  • 32Connecting Tools With MCP
  • 33MCP Resources and Elicitation
  • 34Installing and Managing Plugins
  • 35Building Plugins and Marketplaces
  • 36Mods
VChapters 37–43

Automation and Scale

Scripts, schedules, parallel agents, and big codebases.

  • 37Headless Mode and Scripts
  • 38Scheduling With /loop and Routines
  • 39Parallel Sessions With Git Worktrees
  • 40Parallel Agents and Agent Teams
  • 41Goals and Dynamic Workflows
  • 42Large Codebases and Monorepos
  • 43Claude Code in CI and GitHub Actions
VIChapters 44–46

Safety

Isolation, reviews, and what happens to your data.

  • 44The Sandbox, Dev Containers and Docker
  • 45Code Review and Security Review
  • 46Privacy and Data Handling
VIIChapters 47–50

Beyond the Terminal

Your editor, the web, your phone, the cloud providers, and the SDK.

  • 47Claude Code in VS Code and JetBrains
  • 48Claude Code on the Web, Your Phone and Slack
  • 49Amazon Bedrock, Google Vertex AI and Microsoft Foundry
  • 50The Claude Agent SDK
VIIIChapters 51–53

Costs and Troubleshooting

Where the tokens go, and what to do when something breaks.

  • 51Costs and Token Usage
  • 52Diagnosing Problems
  • 53Error Messages and Fixes
IXChapters 54–58

Projects

Five complete projects, from a website to jobs that need no code.

  • 54A Website and a To-Do App
  • 55A REST API With a Database
  • 56Testing and Refactoring Old Code
  • 57An App With an AI Feature
  • 58Claude Code for Everyday Jobs
A–EAppendices

Appendices

References to keep open beside your terminal.

  • AQuick Reference
  • BSettings Reference
  • CError Index
  • DExtensions Worth Knowing
  • EGlossary
Claude Code 2.1

One agent, many ways to shape it

Claude Code reads your files, runs commands, and edits code in a loop until the task is done. Around that loop sit the pieces you control: permissions, memory, skills, subagents, hooks, MCP servers, and plugins. The book covers each of them, with the chapter where it is built.

6
The agent loopgather context, take action, verify the result, and repeat, with the built-in tools it uses at each step
10
Permission modes and rulesdefault, accept edits, plan, and auto modes, and allow, ask, and deny rules for tools and commands
20
CLAUDE.md and auto memorywhat Claude knows about your project at the start of every session, and what it learns as it works
27
Skills and subagentsinstructions that load when a task fits them, and helpers with their own context, tools, and model
31
Hooksscripts that run before and after tools, on prompts, and at the end of a turn, and can block what breaks your rules
32
MCP servers and pluginsyour tools, docs, and data connected through MCP, and everything packed into plugins you can share
305figures and screenshots of real sessions
231tables of commands, settings, and choices
5complete projects in Part IX
220terms in the index

Run in 2.1

Every example was run with Claude Code versions 2.1.309 to 2.1.327, and the screenshots show those versions.

Real sessions

No screen was mocked up: each one was taken from a real session, and only what worked was kept.

Small projects

The examples are small Python and JavaScript projects that are easy to follow, whatever language you use.

For everyone

Part IX also has a chapter for people who don't write code: files, PDFs, spreadsheets, and reports.

Vinish Kapoor

Software developer · founder of AI Parabellum

  • Building software since 2001
  • Author of the Claude Code course on AI Parabellum
  • Author of five books on Oracle development and AI
About the author

Written from real sessions

From the Claude Code course

In October and November 2026 Vinish wrote a long series of Claude Code tutorials for AI Parabellum: a 53-part course, advanced guides, real projects, and fixes for the problems readers ran into. Every tutorial came from a real session. This book is that work, rewritten, reordered, and completed.

A developer since 2001

He started with dBase III Plus and FoxPro, and over more than two decades has built business applications for healthcare, education, hospitality, logistics, finance, and retail. His articles have appeared in AI News, Developer Tech, HackerNoon, and DEV Community.

His sixth book

His earlier books are Oracle APEX 26.1: The Complete Guide, Oracle APEX 26.1 API by Example, Oracle Database 26ai SQL and PL/SQL, Oracle Forms 14c, and AI Applications with Oracle Database 26ai and APEX 26.1. He is the founder of AI Parabellum and of vinish.dev.

Plan it. Build it. Check it. Every feature of Claude Code, run in a real session and shown on the page.

Get the book
  • Paperback, 781 pages
  • Kindle and Apple Books
  • Free course on AI Parabellum
FAQ

Frequently asked

Anything else? Ask on aiparabellum.com.

Who is this book for?

Developers who want to use Claude Code well, whether they have never opened it or use it every day. You need to be comfortable in a terminal and with the basics of Git, but not with any particular language: the examples are small projects in Python and JavaScript. Chapter 58 is also for people who don't write code and want Claude Code to organize files, merge PDFs, clean up spreadsheets, and write reports.

Which version does it cover?

Claude Code 2.1. The examples were run with versions 2.1.309 to 2.1.327 on macOS in October and November 2026, and the screenshots show those versions. Claude Code changes often; when a later version adds a command or changes a default, the ideas in the book still apply.

Do I need a paid plan?

Yes, Claude Code needs a Claude subscription (Pro, Max, Team, or Enterprise), a Claude Console account, or a supported cloud provider; the free claude.ai plan does not include it. Chapter 3 explains the plans, sign-in, and usage limits, and Chapter 51 shows where the tokens go and how to spend fewer.

Does it work on Windows?

Yes. Chapter 2 installs Claude Code on macOS, Linux, Windows, and WSL, checks the install, and fixes the "command not found" error. Chapter 4 sets up the terminal on each system.

Does it cover skills, hooks, MCP, and plugins?

Yes, all of Part IV: skills and how to write skills that work, subagents, hooks, MCP servers with resources and elicitation, installing and building plugins and marketplaces, and mods. Chapter 30 compares them, so you know which one to use for a job.

Does it cover automation and CI?

Yes. Part V covers headless mode and scripts, /loop and routines, parallel sessions with Git worktrees, parallel agents and agent teams, goals and workflows, large codebases and monorepos, and Claude Code in GitHub Actions.

What about VS Code, the web, and the cloud?

Part VII covers Claude Code in VS Code and JetBrains, on the web, on your phone and in Slack, through Amazon Bedrock, Google Vertex AI, and Microsoft Foundry, and the Claude Agent SDK for building your own agents.

Is the book affiliated with Anthropic?

No. It is an independent guide, written by a developer who uses Claude Code every day. Claude and Claude Code are products of Anthropic.

Is the paperback in color?

The paperback is printed in black and white on white paper, 7.5 by 9.25 inches, 781 pages, with a glossy cover. The Kindle and Apple Books editions show the code, figures, and screenshots in color.

Get the book

Paperback, Kindle, or Apple Books

Every edition has the same 58 chapters, five appendices, and index. Pick the paperback for your desk, and the Kindle or Apple Books edition for code and screenshots in color on any screen.

  1. Get the bookFrom Amazon or Apple Books, in the edition you prefer.
  2. Install Claude CodeOn macOS, Linux, or Windows, as Chapter 2 describes.
  3. Follow alongRun each example in a small project of your own as you read.

Paperback

$44.99on Amazon.com

  • 781 pages, 7.5 × 9.25 in
  • Black and white on white paper
  • Glossy cover
  • ISBN 9798143846104
Buy the paperback

Kindle edition

$12.99on Amazon.com

  • Code and screenshots in color
  • Reflowable on any Kindle
  • Linked contents and index
  • Kindle apps for phone, tablet and PC
Buy for Kindle

Apple Books

Code and screenshots in color, on iPhone, iPad, and Mac.

$12.99on Apple Books

Apple Books: coming soon

Claude Code: The Complete Guide. From your first session to skills, hooks, MCP, subagents, and automation. An independent guide; Claude and Claude Code are products of Anthropic.

Claude Code: The Complete Guide · First Edition, 2026Written by Vinish Kapoor

Newsletter

New AI tools in your inbox

The best new tools and the AI news that matters, in one short email. Unsubscribe any time.

Free · No spam · Unsubscribe any time

✓ Looks like you’re subscribed

Loading Google’s sign-up form…

Looks like you’re already subscribed

Thanks for reading! New AI tools and the AI news that matters will land in your inbox.

Not subscribed yet? Refresh the page to load the sign-up form.

The sign-up form couldn’t load. If you use an ad or content blocker, allow news.google.com and reload the page.

Free instant check before you pay. Takes a few seconds.

Scroll to Top