Module
Back to courses
AI & DevelopmentAdvanced

Work with Claude Code on a real project: context, planning, review

Context and CLAUDE.md, exploring and planning before coding, permissions, hooks and a review workflow in place on your repository.

44 steps~3 hrLevel: Advanced · Regular practice: you already use the tools or work on this topic.

Move from "ask and hope" to a reliable way of working with Claude Code on a repository that matters: money, data, users. You learn to manage what the agent has in mind (context, CLAUDE.md, sessions), to run a task by exploring and planning before coding, to choose between subagent, skill, MCP server and hook, to set its permissions, to put in place guardrails that always apply and to review its work before it ships. You leave with CLAUDE.md, permissions, hooks and a review workflow in place on your repository.

What you will be able to do

  • Explain what fills Claude Code's context window and manage it (/context, /clear, /compact, resuming and naming sessions), taking cost into account.
  • Write a short, useful CLAUDE.md placed at the right level of the hierarchy (user, project, local, subdirectory, path-scoped rules), with imports if needed.
  • Run a task on existing code as explore, plan, code, commit, with plan mode, verification criteria and Git rather than checkpoints alone.
  • Choose and justify the right mechanism for a need (CLAUDE.md, skill or command, subagent, MCP server, hook) and set it up in the repository.
  • Choose a permission mode and write allow, ask and deny rules suited to the project's risks, in the right settings file.
  • Write simple hooks as deterministic guardrails (block, format, verify) and know their risks and limits.
  • Review the agent's work with a checklist (scope, tests, secrets, migrations, dependencies) and an independent review, and know when to automate it in non-interactive mode or in GitHub Actions.

Prerequisites

  • Have already built something with Claude Code: an app like the one in the course "Build and ship a web app with an AI coding agent", ideally extended in "Add a database, authentication and payments to your app"
  • Be able to run a command in a terminal, read a diff and make a commit
  • Tools: Claude Code (paid Claude plan, Pro or higher, or an API account), Git, a GitHub repository. Without Claude Code, part of the deliverable is still doable: CLAUDE.md becomes an AGENTS.md (which Claude Code also reads when there is no CLAUDE.md) or your agent's rules, guardrails become Git hooks (pre-commit) and branch protection, and the review checklist works as is; permissions, Claude Code hooks, subagents, /code-review and plan mode, however, require Claude Code
  • Related courses: "Build reliable Claude Skills for your product work" for skills in depth, "Git for PMs: ship as a team without putting production at risk" for branches, pull requests and protections
  • Build and ship a web app with an AI coding agent

Syllabus

What will I set up on my repository in this course, and in what order?

  1. Objective · By the end of this introduction, you will know what you will be able to do (frame Claude Code on a real repository: context, planning, extensions, permissions, hooks, review), the deliverable you will install on your repository and the four modules that get you there.

What does the agent know about my project at any moment, and how do I give it the right information without drowning it?

  1. Objective · By the end of this lesson, you will be able to explain what fills Claude Code's context window (instructions, CLAUDE.md, files read, command output, conversation), measure it with /context and choose between continuing, compacting, starting fresh or resuming a named session, taking cost into account.

  2. Objective · By the end of this lesson, you will be able to write a short, useful CLAUDE.md for your repository, choose where each instruction belongs (user, project, local, subdirectory, path-scoped rule, import) and evolve it based on the agent's mistakes.

How do I run a real task without the agent heading the wrong way, and which tool do I give it for what?

  1. Objective · By the end of this lesson, you will be able to run a non-trivial task on existing code in four steps (explore, plan, code, commit), with plan mode, verification criteria the agent runs and Git commits, and to know when checkpoints are enough and when they are not.

  2. Objective · By the end of this lesson, you will be able to choose between CLAUDE.md, skill or command, subagent, MCP server and hook for a given need, create a review subagent and a reusable command in your repository, and connect an MCP server with limited scope and rights.

What can the agent do without asking me, and how do I enforce what must never happen?

  1. Objective · By the end of this lesson, you will be able to choose a permission mode suited to the task, write allow, ask and deny rules in the right settings file according to your repository's risks, and know what those rules don't cover.

  2. Objective · By the end of this lesson, you will be able to write and test simple hooks that block a forbidden action, format or verify automatically, choose the right event, and assess a hook's risks before installing it.

How do I know the agent's work is good before it ships, and install the whole set-up on my repository?

  1. Objective · By the end of this lesson, you will be able to review a change produced by Claude Code with a checklist (scope, tests, secrets, migrations, dependencies), add an independent review in a fresh context, decide to merge, fix or reject, and know when to automate part of the review in non-interactive mode or in GitHub Actions.

  2. Objective · By the end of this workshop, you will have installed on your own repository a reviewed CLAUDE.md, a .claude/settings.json with tested permissions and hooks, a useful extension (review subagent or command) and a review checklist, and applied them to a real task, with evidence.

  3. Objective · By the end of this lesson, you will have the course's templates, prompts and checklists (CLAUDE.md, settings, hook, subagent, review checklist) and you will have planned how to apply them to your repository over 7 and 30 days.