Mastering Claude Code
The comprehensive guide to Claude Code — from first install to building a personal system that compounds over time. For beginners and experts alike.
0% complete (0/70 lessons)
The comprehensive course on Claude Code — Anthropic's autonomous coding agent for the terminal. Whether you just installed it or you've been using it for months, this course covers everything from basic navigation to building a personal system that compounds over time.
What you'll learn
- Install, configure, and master Claude Code across every surface
- Write CLAUDE.md files that consistently shape behavior
- Manage context windows, tokens, and costs effectively
- Build hooks, skills, plugins, and custom commands for your workflow
- Use multi-agent patterns, background agents, and advanced reasoning modes
- Automate workflows with headless mode and CI/CD pipelines
- Connect external tools through MCPs
- Deploy securely in team and enterprise environments
- Avoid anti-patterns that silently degrade output quality
Prerequisites
No prior Claude Code experience required. You should be comfortable using a terminal and have basic programming knowledge in any language.
Syllabus
Not an autocomplete tool — an autonomous coding agent in your terminal. Understand what that means before you type a single command.
Install Claude Code on any OS, authenticate, and complete your first real task. No toy examples.
Escape, accept, reject, scroll, switch modes. The shortcuts that make you fast instead of fumbling.
Claude asks before destructive actions. Understand permission modes, sandboxing, and why this matters before you go further.
Permissions decide what Claude may do. Sandboxing decides what the system physically allows. Filesystem boundaries, network isolation, and why this is your real safety net.
Use Claude Code inside your IDE — keybindings, terminal integration, inline diffs. When the IDE extension beats the terminal and vice versa.
Claude Code runs everywhere — not just your terminal. Desktop app, browser, Chrome DevTools, even Slack. Know which surface fits which workflow.
Font rendering, color profiles, status line, shell integration. Small terminal tweaks that remove friction from every session.
The most powerful feature most people underuse. It loads once at session start and shapes every response. Learn to write one that works.
Three layers — global user, project, and project-local. The hierarchy, override behavior, and when to use each one.
Vague rules get ignored. Patterns for writing instructions that consistently change behavior — with real before-and-after examples.
Curated templates for different project types — web apps, CLI tools, data pipelines, monorepos. Start from proven configs.
Claude saves notes across sessions automatically. MEMORY.md, topic files, the 200-line limit, and how to shape what gets remembered without micromanaging.
Every session is a conversation with a context window. The main thread concept — what goes in, what stays, and why it matters.
Plan mode forces Claude to think before acting. Auto plan triggers automatically for complex tasks. Core operating modes for everything that follows.
The context window is finite and expensive. How Claude Code manages it, what dynamic memory does, and how to prevent session degradation.
The primary lever for managing long sessions. When to compact, what gets preserved, and strategies for keeping context relevant.
Wrong turn five messages ago? Rewind lets you branch. Combined with context inspection, debug why Claude behaves unexpectedly.
Claude automatically checkpoints your code. Restore any previous state without manual git commits. Your safety net when experiments go wrong.
Name your sessions, resume them later, continue from another device. Remote control turns Claude into a persistent assistant across machines.
When Claude misbehaves, diagnose it. The /debug skill, /doctor diagnostics, /insights reports, and /security-review. Built-in tools most users never discover.
Every session starts from zero. This is a feature, not a bug. Why fresh sessions produce better results and when to kill a thread.
Opus, Sonnet, Haiku — different models for different tasks. When to switch, what each excels at, and the cost-quality tradeoff.
Fast mode trades depth for speed. Effort levels control how hard Claude thinks. Match the reasoning intensity to the task complexity.
Track your spending, understand token consumption patterns, and prevent runaway costs. Practical cost optimization without sacrificing quality.
Repeated context costs tokens every time — unless you cache it. How prompt caching works and when it dramatically cuts your bill.
Every token counts. Techniques for fitting more signal into less context — file selection, summarization, and reference patterns.
Prompting Claude Code is not chatting. You are writing instructions for an autonomous agent. The mental shift that makes prompts dramatically better.
Make Claude rate its confidence 1-100 on every response. Below 85 means investigate further. A simple rule that catches hallucinations before they ship.
Verbose explanations, terse diffs, code-only, structured summaries. Output style rules that save you from scrolling through walls of text.
The methodology: explore thoroughly, then design, then implement. Why jumping to code produces brittle solutions and how to enforce the right order.
How Claude Code reads your project structure. Workspace conventions for mono and multi-package repos that help Claude navigate effectively.
Control what Claude can and cannot see. The difference between .claudeignore and .gitignore, and what belongs in each.
Run multiple Claude sessions on different branches simultaneously using worktrees. Parallel development without conflicts.
Feed Claude screenshots for UI debugging, architecture diagrams, or error logs. When visual input beats text descriptions.
When and how to use web search. Citing, verifying, and integrating external information into your workflow.
Claude reads your git state — diffs, logs, branches, status. How to leverage this for context-rich prompts.
Let Claude write commits with meaningful messages, create branches, draft PRs — with guardrails that keep your history clean.
Use Claude as a reviewer — for your own changes, PRs, or dependencies. Prompting for security, performance, and architecture review.
Find untested code, generate test scaffolding, catch edge cases, run TDD loops. How to make Claude a reliable testing partner instead of a test-skipping shortcut.
Hooks inject context into every message — unlike CLAUDE.md which loads once. The hook lifecycle, types, and why this changes everything.
Inject reminders, constraints, or dynamic context on every turn. Flags to toggle special behaviors without editing CLAUDE.md.
Get notified when Claude finishes. Play a sound, send a message, trigger a build. Turn Claude into a background worker.
Create slash commands that execute predefined prompts. Build /review, /refactor, /test that do exactly what you want every time.
Reusable instruction sets for non-trivial workflows. Not prompts — structured knowledge Claude can invoke. The concept before the build.
Create a skill from scratch — trigger definition, instructions, testing, iteration. A real deployment skill as the example.
Skills rot if you do not update them. A system for reviewing, versioning, and pruning your skills library as workflows change.
Ready-made patterns for code review, test writing, docs, migration, and debugging. Adapt to your stack instead of starting from scratch.
Bundle your skills, hooks, and MCP configs into a single installable plugin. Share your setup with teammates or the community.
Spawn sub-agents for isolated tasks while keeping your main thread clean. When to delegate, how to scope, how to merge results.
Multiple Claude sessions working in parallel on different parts of a problem. Coordination, message passing, and merging results from agent teams.
Fire off a task and keep working. Background agents handle long-running jobs while you stay productive in your main thread.
Force Claude into extended thinking for architecture, debugging, or security analysis. When brute-force reasoning beats clever prompting.
Agents are only as good as their context. Engineer the perfect context package so agents produce correct output on the first try.
Generate multiple solution variants and evaluate systematically. Exploring design spaces when there is no obvious single answer.
MCP connects Claude to external tools through a standard protocol. The architecture before you install your first server.
Curated MCP servers worth installing — filesystem, GitHub, database, browser. What each does, when it helps, and the gotchas.
No existing MCP fits? Build your own. A walkthrough of creating a custom MCP server for your team internal tools.
The -p flag turns Claude into a scriptable tool. Pipe input, capture output, chain with other commands. Automation starts here.
Automated PR reviews, issue triage, and code generation in GitHub Actions and GitLab CI. Claude as part of your deployment pipeline.
Go beyond the CLI. The Python and TypeScript SDKs let you build custom applications that control Claude Code as a library. Automation at the API level.
Standardize Claude Code across a team. Shared CLAUDE.md patterns, org-wide rules, and onboarding consistency.
Track and manage Claude Code spending across a team. Budgets, alerts, usage dashboards, and preventing bill shock.
Get a new developer productive with Claude Code in hours, not weeks. Team conventions, shared skills, and collaborative patterns.
Sandboxing, data retention policies, what gets sent where. The security architecture you need to understand before using Claude on sensitive code.
Kitchen sink sessions, correction spirals, trust-then-verify gaps, infinite exploration. Operational mistakes that burn context and money — distinct from config anti-patterns.
Contradictory rules, context overload, vague constraints. Anti-patterns that degrade output and how to recognize them in your own config.
Use a second AI as an independent reviewer of Claude output. When to invoke it, what to ask, and how to integrate without slowing down.
Give loose direction and let the agent iterate. When it works, when it destroys your codebase, and how to set guardrails.
Combine everything — CLAUDE.md, hooks, skills, commands, MCPs — into a system that compounds over time. A framework for continuous improvement.