Pređi na glavni sadržaj
Claude Code Bootcamp

Two days · four hours each · hands-on

Working with an agent in your own repositories

You will install it, steer it, break it, and ship real changes to code you actually own. By the end of day two you will know where the sharp edges are.

Format
40% talk / 60% doing
Your repo
bring a real one
Labs
9

Set expectations

What this is, and what it isn't

It is

A working session

You do the work, in your repository, on a task you actually care about. Nothing here is a canned demo.

It is not

A product pitch

We spend real time on what it does badly, because knowing that is what makes you fast rather than frustrated.

  • This is an agent, not autocomplete. It reads files, runs commands, edits code, and decides what to do next in a loop.
  • The mental model is a fast colleague with perfect recall and no judgment about your business.

Nothing in these two days changes who is accountable for what lands on the default branch.

Everything that follows assumes you still read the diff.

Day one

From zero to a trusted daily driver

By the end of today, every person in this room has shipped one real change to their own repository and can explain why the agent did what it did.

Module 1 · 45 minutes

Setup and first contact

  • Install, log in, and prove it works
  • Workspace trust — what you are actually agreeing to
  • The four surfaces: terminal, editor, desktop, web
  • Lab 1: three questions about your own codebase

Everyone at once

Install

# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
claude --version
claude doctor

Learn claude doctor now. It prints installation and settings diagnostics without starting a session, so every later "it isn't working" has an obvious first step. Homebrew, WinGet, apt, dnf, apk and npm all work too — but only the native install updates itself in the background.

If it goes wrong

The four failures you will see

SymptomCauseFix
command not found~/.local/bin not on PATHNew terminal, then add it to your shell profile
'&&' is not a valid statement separatorRan the CMD line in PowerShellUse the irm command
'irm' is not recognizedRan the PowerShell line in CMDPowerShell shows PS C:\
Download blockedCorporate proxyPair with a neighbour; fix at the break

Hard cutoff at twenty minutes. Anyone still broken pairs up — the room does not wait.

Read it, don't click past it

Workspace trust

The first time you run Claude in a directory, it asks whether you trust it.

  • You are about to let it read this directory and run commands in it
  • A repository can carry configuration that runs at startup — hooks, servers, instruction files
  • This matters most for repositories you did not write

Same instinct as npm install on a stranger's project. The prompt is the moment you decide.

The UI-versus-CLI question, answered once

Four front ends, one product

SurfaceWhat it isReach for it when
Terminalclaude in any directory. Every knob exposed.Default. Everything in this course works here.
Editor extensionVS Code, JetBrains. Editor-native diffs.You live in the editor and review diffs inline.
Desktop appmacOS, Windows, Linux. Every session gets its own worktree.Parallel work without git plumbing.
Webclaude.ai/code. Runs in the cloud on a checkout.Starting work from a phone or a borrowed machine.

Your configuration in ~/.claude/ and in the repository applies across all of them. The desktop app's automatic worktree is the same mechanism you'll build by hand tomorrow.

Lab 1 · 10 minutes

Your first session

Ask three questions about a part of your codebase you already know well. No edits.

Ask one badly on purpose. Then ask it properly. Compare.

labs/lab-01-first-session.md

Watch what it does before you read what it says. If it answered without opening a file, it guessed — and that tells you something useful about how to prompt it.

Module 2 · 45 minutes

How it actually works

This is the module that makes people effective instead of superstitious.

  • The agentic loop, and the two consequences that explain most confusing behaviour
  • The context window — made concrete, not mystical
  • Permission modes, and why plan mode is the one people skip
  • Interrupting as a skill

The whole mechanism

Read, choose a tool, run it, decide

  1. It reads your request
  2. It picks a tool — read a file, search, edit, run a shell command, delegate
  3. It runs the tool and reads the result
  4. It decides whether it is done, and loops

That is genuinely all of it. Everything else in these two days is about controlling what goes into step one and what tools exist in step two.

Two consequences

Why it behaves the way it does

Consequence one

It only knows what it has read

If it hasn't opened the file, it is guessing. This is why "look at how X works, then do Y" beats "do Y" every single time.

Consequence two

It runs real commands

When it runs your tests, the tests really run. When it deletes a file, the file is really gone. This is the whole value and the whole risk.

Make it concrete

The context window

/context   # what is loaded, and how much room is left
/cost      # what this session has spent
/clear     # start fresh — free, and the habit that matters most
  • Long sessions get worse, not better. Output from a hundred commands crowds out the thing you care about.
  • Clear between unrelated tasks. This single habit separates people who find the tool reliable from people who don't.
  • Compaction is a fallback, not a feature. When the window fills, the conversation gets summarized. Something is always lost.

Shift+Tab cycles the mode

Permission modes

ModeBehaviourWhen
defaultAsks before edits and commandsLearning a codebase, or any repo you don't own
planResearches, changes nothing at allBefore anything non-trivial. The most underused mode.
acceptEditsApplies edits, still asks for commandsA tight loop where you're reviewing diffs anyway
bypassPermissionsAsks for nothingThrowaway containers. Not on a work laptop.

The cheapest place to correct an agent is before it writes any code.

Plan mode makes that the default instead of an act of discipline. Reject one plan on purpose today, even a good one, so you feel how little it costs.

Muscle memory

Stop it early

KeyDoes
Shift+TabCycle permission mode
EscStop mid-turn. It keeps the work done so far.
Esc EscRewind to an earlier message
Ctrl+OTranscript view — exactly which tools ran
Ctrl+CInterrupt, or clear the input

Interrupting early is a skill, not rudeness. Watching a wrong approach unfold for two minutes is the most common way people waste time with an agent.

Lab 2 · 10 minutes

Plan mode, and interrupting

Run the same small task twice: once planned, once straight in. Compare the results.

Then start something deliberately over-broad and stop it with Esc. Twice, until it's reflex.

labs/lab-02-plan-mode.md

Module 3 · 45 minutes

Stop repeating yourself

Everything in this module is about writing something down once so you never type it again.

  • CLAUDE.md — persistent instructions, loaded every session
  • .claude/rules/ — topic and path scoped, for when that grows
  • Custom commands, which are now just skills
  • Settings and the permission allowlist

Broadest to most specific — they all load

Where instructions live

ScopeLocationShared with
Managed policy/Library/Application Support/ClaudeCode/CLAUDE.md
/etc/claude-code/CLAUDE.md
Everyone on the machine, deployed by IT
User~/.claude/CLAUDE.mdYou, across every project
Project./CLAUDE.md or ./.claude/CLAUDE.mdThe team, via version control
Local./CLAUDE.local.mdYou, this project. Gitignore it.

/init drafts one from your codebase. /memory opens them. /context proves which ones actually loaded.

The part that matters

Write what it could not have discovered

/init can find your build commands and directory layout by looking. It cannot know any of this:

  • Why something is the way it is. "The retry logic in the payment path is deliberate. Don't simplify it."
  • What's half-finished. "We're mid-migration. New code uses the new client; don't 'fix' the old call sites."
  • Local setup. "Integration tests need a database: run make db-up first."
  • What a reviewer would flag. "Errors are wrapped with context at every boundary; never return a bare error."

Rules of thumb

Specific enough to verify

Write thisNot this
"Run npm test before committing""Test your changes"
"Use two-space indentation""Format code properly"
"API handlers live in src/api/handlers/""Keep files organized"
Add a rule the second time you correct the same mistakeAdd rules speculatively

Keep it under about 200 lines. Longer files are followed less reliably, not more — and they cost context every session. Contradictions are worse than gaps: if two rules disagree, behaviour becomes arbitrary.

When one file gets too big

Scope rules to paths

.claude/rules/api-design.md
---
paths:
  - "src/api/**/*.ts"
---

# API conventions

- Every endpoint validates its input.
- Errors use the standard error envelope.

The rule only enters context when the agent touches a matching file. This is the answer to "our CLAUDE.md is enormous", and it's how a monorepo keeps frontend conventions out of a backend session.

A command you'll actually use

Custom commands are skills now

.claude/skills/review-diff/SKILL.md
---
description: Reviews the current diff for risk before I open a PR.
---

## Current changes

!`git diff HEAD`

## Instructions

Summarize the change in two or three bullets, then list anything
risky: missing error handling, hardcoded values, tests that
should have changed and didn't.

That's /review-diff. The ! line runs the command and inlines its output before the agent reads the file — so the review is grounded in your real diff. An older .claude/commands/foo.md still works and still gives you /foo.

Stop being asked

The permission allowlist

.claude/settings.local.json
{
  "permissions": {
    "allow": [
      "Bash(git status)",
      "Bash(git diff *)",
      "Bash(npm test *)"
    ]
  }
}

~/.claude/settings.json is yours everywhere. .claude/settings.json is the team's, committed. .claude/settings.local.json is yours here, gitignored.

Allowlist what is safe to run while you aren't looking.

Reads, status, tests, builds. Not git push. Not anything that deletes or deploys. The prompt is the last check before something irreversible — the allowlist exists to make the prompts you do get worth reading.

Lab 3 · 25 minutes, finish it tonight

Write it down once

A real CLAUDE.md with at least three things /init could not have known.

One custom command you'll use next week. Three allowlist entries.

labs/lab-03-claude-md.md

This is the highest-value half hour of day one, and it's compressed. Finish it tonight.

Module 4 · 45 minutes

Ship the thing you brought

One loop, learned properly, beats a toolbox of tricks.

  1. Explore. "Read the files involved and explain how this works." No edits. Check its model against yours.
  2. Plan. Plan mode. Read it properly. This is where you catch the wrong approach for thirty seconds.
  3. Implement. Let it work. Interrupt the moment it goes sideways.
  4. Verify. Tests, build, run the thing. Not "it says it's done."
  5. Review. Read the diff as you would a colleague's pull request.

Give it a way to check its own work.

A test suite, a type checker, a script that reproduces the bug. An agent with a feedback loop converges. An agent without one produces plausible code and stops. This is the single highest-leverage habit in the whole course.

The pattern that keeps it honest

Failing test first

Write a failing test that captures this bug. Run it, and show me
it fails for the right reason. Don't fix anything yet.
Now make it pass without changing the test.

Confirm the failure is real before you let it fix anything. The test is what stops "done" from meaning "it compiled".

Be blunt about this

What it is bad at

  • Large ambiguous refactors where the right answer depends on where the codebase is heading. It optimizes locally.
  • Context that exists only in someone's head. A half-finished migration, a deliberate inconsistency, a decision from a meeting. If it isn't written down, it isn't known.
  • Knowing when to stop. If the third fix attempt hasn't worked, the approach is wrong. Take over.
  • Reporting failure clearly. It can describe work as complete when the tests were never run.
  • Wide blast radius. The more files touched, the worse your review — and review is the control.

If you couldn't review the diff properly, the task was too big.

Split it and run the loop again. This is the heuristic that scales to everything on day two.

Lab 4 · 25 minutes

Your real task, end to end

Branch first. Explore, plan, implement, verify, review, commit.

Ask yourself out loud at step four: did I actually run it?

labs/lab-04-ship-a-feature.md

Module 5 · 40 minutes

Version control is the safety net

  • Commit before you start. A branch you can throw away is what lets you say yes to an ambitious attempt.
  • Let it commit. It reads the diff, so the message describes what actually changed.
  • Be deliberate about pushing. Fine on your own branch. Never unattended to a shared one.
  • Never let it merge. The review gate is the entire point.

Keep git push out of your allowlist. That prompt is doing real work.

Sort the findings

What automated review is worth

Pile one

Real, worth fixing

An unhandled error path, a missed edge case, a test that doesn't assert the thing it claims to.

Pile two

Real, not now

Technically true, out of scope for this change. Say so and move on.

Pile three

Wrong

It misread the intent. This is the useful pile: it shows where a human reviewer will also get confused.

Good at the boring, real things. No substitute for someone who knows why the system is built this way.

Lab 5 · 15 minutes, then debrief

Open a pull request

Run /code-review on your branch, fix what deserves fixing, push, open the PR.

labs/lab-05-pull-request.md
  • Debrief: what worked better than you expected, and where did you have to take over?
  • Homework: use it for real work tomorrow morning. Finish your CLAUDE.md. Bring a task that spans two repositories.

Day two

Scaling out

Yesterday was one person, one repository, one task. Today is everything that breaks when reality is messier than that.

Yesterday's board

Where you had to take over

Some of these get solved today. Some of them stay yours — and saying which is which is the point of this slide.

  • Solved today: work that spans repositories, several things in flight at once, and information that lives outside the codebase
  • Improved today: repeating yourself, and setup that lives in one person's head
  • Still yours: knowing what the business needs, and reviewing what comes back

Module 6 · 45 minutes

Working across repositories

A session is rooted where you launched it, and it will not wander into a sibling repository on its own. That is a safety boundary, not an oversight.

ShapeExampleAnswer
MonorepoMany packages, one checkoutNested instruction files, path-scoped rules
Coordinated changeAn API and its client, changing togetherOne session, extra directory added
Independent workUnrelated tasks in unrelated reposSeparate sessions. Don't merge them.

Adding a directory

One session, two repositories

claude --add-dir ../api-client ../shared-types

# or mid-session
/add-dir ../api-client
# the gotcha: instruction files from added dirs are NOT loaded by default
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir ../shared-config

Without that variable the agent can read the other repository's code but is blind to its conventions. This one surprises everybody.

Finding your way back

Name your sessions

claude -n "payments-migration"   # name it when you start
claude -c                        # continue the most recent one here
claude -r "payments-migration"   # resume by name or id

A small habit that pays off the first time you have four sessions going. Start now, while you only have two.

One session per coherent piece of work.

Not one per repository, and not one for everything you're doing today. If two tasks don't need to know about each other, everything one loads is noise for the other — and quality drops accordingly.

Lab 6 · 10 minutes

Across repositories

Make one change spanning two of your repositories with --add-dir.

Then do two unrelated tasks as two separate sessions. Be able to say why each was right.

labs/lab-06-multi-repo.md

Module 7 · 45 minutes

Two agents, one checkout, no

They edit each other's files. One runs tests against the other's half-finished change. Neither result is trustworthy.

  • A git worktree is a separate working directory with its own branch, sharing the same history and remote
  • Different files on disk, same git database
  • It has existed in git for a decade. What's new is having a reason to use it daily.

Built in

Start a session in its own worktree

echo ".claude/worktrees/" >> .gitignore   # do this first

claude --worktree feature-one   # terminal 1
claude --worktree feature-two   # terminal 2

Creates .claude/worktrees/feature-one/ on a new branch worktree-feature-one and starts a session inside it. -w is the short form. Omit the name and it generates one.

In the order you'll hit them

What will surprise you

ThingWhy
Tests fail immediatelyA worktree is a fresh checkout. No node_modules, no .env, nothing gitignored.
It starts from the default branchThat's the default. Set worktree.baseRef to "head" to branch from your current work.
--worktree errors about trustRun plain claude once in the repo and accept the prompt first.
Editing a main-checkout file is refusedIntentional. Isolation is enforced, not just conventional.

Carry your environment across

.worktreeinclude

# .worktreeinclude at the project root — gitignore syntax
.env
.env.local
config/secrets.json

Only files that match and are gitignored get copied, so tracked files are never duplicated. Every worktree Claude creates from now on gets them automatically.

Don't accumulate them

Merge and clean up

git worktree list
git merge worktree-feature-one
git worktree remove .claude/worktrees/feature-two
git worktree remove --force <path>   # if it has uncommitted changes

On exit, Claude checks each worktree for work that removal would destroy — changed files, untracked files, unpushed commits — and asks before deleting anything. git worktree list is your "what have I got running?" command.

Your limit isn't how many agents you can run. It's how much code you can properly review in an hour.

Parallelism pays when tasks are genuinely independent and each runs a while unattended. It costs the moment you become the bottleneck and start rubber-stamping the second diff.

Lab 7 · 15 minutes

Two worktrees, two tasks

Create two, run a different task in each, merge one, clean both up.

Then review both diffs and ask yourself honestly whether you reviewed the second as carefully as the first.

labs/lab-07-worktrees.md

Module 8 · 60 minutes · the long one

Connecting the systems outside your codebase

The Model Context Protocol is an open standard for connecting an agent to tools and data. A server exposes tools; the agent can call them.

  • Anything you currently copy and paste into a chat window is a candidate. A stack trace, a row of query results, a ticket description.
  • The real win isn't saving the paste. It's that the agent can go and get the next piece of information without asking you.

Three transports

Where the server runs

TransportWhat it isTypical case
stdioA local process on your machineA database server, an internal script
httpA remote endpoint, supports OAuthHosted services
sseOlder remote style, deprecatedServices that still only offer this

The part teams get wrong

Scopes

ScopeStored inWho gets it
local (default)Your own config, per projectJust you, just this project
project.mcp.json, committedEveryone who checks out the repo
userYour user configJust you, every project

Everyone is asked to approve a committed .mcp.json before its servers run. That approval exists because committing a server config is asking your colleagues to run something.

Secrets never go in the file

.mcp.json

{
  "mcpServers": {
    "dev-db": {
      "type": "http",
      "url": "https://internal.example/mcp",
      "headers": { "Authorization": "Bearer ${DEV_DB_TOKEN}" }
    }
  }
}

Environment variables are expanded at load. And note "type": an entry with a url but no type is read as a stdio server and silently skipped. That mistake costs ten minutes every time.

The commands

Adding servers

claude mcp add --transport http notion https://mcp.notion.com/mcp
claude mcp add --env DB_URL=... --transport stdio my-db -- npx -y <server>
claude mcp add --scope project --transport http <name> <url>

claude mcp list
claude mcp get <name>
claude mcp login <name>

For stdio servers the -- separates Claude's own options from the command that runs the server. Without it, the server's flags get parsed as Claude's. In session, /mcp lists servers, shows status, and starts authentication.

Tool output is untrusted input.

A ticket description, a log line, a row from a table — whatever a server returns enters the agent's context. If someone can write text into that system, they can write text the agent may act on. This is why "which servers do we trust" is a real question, not paperwork.

Before you connect anything

Five rules

  1. Read-only replica, read-only role. Not the production primary with write credentials. The most important line in this module.
  2. Scoped credentials. A token that reads one project, not the whole organization.
  3. Review a server before committing it to .mcp.json.
  4. Be deliberate about allowlisting MCP tools. Read-only, fine. Writes to a shared system, no.
  5. Assume anything it reads can influence it. Pointing it at arbitrary external content is a decision, not a default.

Lab 8 · 25 minutes

Wire up three, finish one

Source control — find the three oldest open pull requests and what's blocking each.

Logs — "there was an error this week; find it, and find the code that produced it."

Database, read-only — a real data question, then the code that writes that table.

labs/lab-08-mcp.md

One server fully working beats three half-configured. The pay-off in every case is the handoff from operational data to source code.

Module 9 · 45 minutes

Four mechanisms that look alike

You wantUseBecause
A fact known in every sessionCLAUDE.mdAlways loaded
A procedure, loaded when relevantSkillCosts nothing until used
A big side task kept out of your contextSubagentSeparate context, returns a summary
Something that must always happenHookDeterministic, not the agent's decision
To share any of it across reposPluginPackaged and installable

A directory with a SKILL.md

Skills

.claude/skills/deploy-preview/SKILL.md
---
description: Deploys the current branch to a preview environment.
  Use when asked to deploy a preview or share a build.
disable-model-invocation: true
---

1. Run the test suite; stop if anything fails.
2. Build the application.
3. Deploy to the preview target and report the URL.

description is how the agent decides it's relevant — write it as when to use this. disable-model-invocation means it only runs when you type /name: right for anything with consequences. Write one the second time you paste the same instructions.

The value is in what doesn't come back

Subagents

.claude/agents/test-runner.md
---
name: test-runner
description: Runs the test suite and reports only what failed and why.
tools: Read, Glob, Grep, Bash
---

Run the full test suite. Report only failing tests, with the
assertion that failed and the most likely cause. Do not fix anything.

It can read forty files and run the suite three times; you get three sentences. But it starts fresh — it does not inherit your conversation. If you'd have to re-explain everything, do it in the main session. Add isolation: worktree and it runs in its own checkout.

Shell commands on lifecycle events

Hooks

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          { "type": "command",
            "command": "npx prettier --write $CLAUDE_FILE_PATHS" }
        ]
      }
    ]
  }
}

/hooks configures them interactively, which is easier than hand-editing JSON the first time.

Only a hook is guaranteed.

Instruction files and skills are context: persuasive, not enforced. People write "always do X" into CLAUDE.md and are surprised when it happens most of the time. If it must happen every time, it's a hook.

Lab 9 · 15 minutes

One skill, one hook

A skill for something you genuinely repeat — pick it from yesterday's frustrations.

A hook that runs your formatter after every edit, whether the agent thinks of it or not.

labs/lab-09-skills-and-hooks.md

Module 10 · 25 minutes · no lab

What survives contact with Monday

Commit itKeep it local
CLAUDE.md, .claude/rules/CLAUDE.local.md
.claude/skills/, .claude/agents/.claude/settings.local.json
.claude/settings.jsonAnything with a credential in it
.mcp.json (reviewed first).claude/worktrees/ — gitignore it

Treat the committed ones as code and review them in pull requests. A change to the team's instruction file changes how the agent behaves for everyone — same scrutiny as a change to CI.

Two things people ask about

Secrets and cost

Secrets

Assume it can read what's there

Environment variables, never literals in committed files. Read-only database roles. Scoped tokens, rotated. If a .env sits in the working directory, assume its contents can reach context — permissions.deny can block paths outright.

Cost

The expensive thing is the bad thing

/cost for the session, /usage for plan limits. What costs money is long sessions full of irrelevant context — which is the same thing that costs quality. /clear is both the cheap and the good answer.

Somebody will build this before next week

Headless, briefly

claude -p "summarize the changes on this branch"
claude -p --output-format json "list the failing tests"
claude setup-token   # a long-lived token for automation

That's the entry point to CI and scripting. It exists, it works, and it's a day-three topic.

Concretely

What to do next

  1. This week. Everyone uses it for real work, daily. Nothing else.
  2. Two weeks. Compare CLAUDE.md files across the team, merge the good parts, commit them.
  3. A month. One shared skill and one shared hook the whole team uses.
  4. Ongoing. Someone owns the shared configuration the way someone owns CI.

It makes a good engineer faster. It does not make review optional.

The teams who get the most out of this are the ones who stayed rigorous about what they shipped. Everything in these two days was in service of that.

All slides — click to jump, Esc to close
← → navigate O overview Home End jump