All courses

Claude Code . Intermediate . 85 min

Claude Code for Teams

Turn Claude Code from a personal tool into shared team infrastructure: checked-in memory, skills, hooks, MCP servers and permission settings, plus review practices that keep AI-assisted code safe to merge.

What your team will learn

Outline

  1. Shared CLAUDE.md and the memory hierarchy (16 min, 3-question quiz)
  2. Skills and slash commands in the repo (17 min, 4-question quiz)
  3. Hooks as guardrails (18 min, 4-question quiz)
  4. MCP servers, .mcp.json and settings.json (17 min, 4-question quiz)
  5. AI-assisted code review practices (17 min, 4-question quiz)
Assign this course to your team

Free lesson

Shared CLAUDE.md and the memory hierarchy

When one engineer uses Claude Code, their prompts carry the context. When a team uses it, that context needs a home everyone shares. That home is CLAUDE.md, a plain markdown file Claude Code loads at the start of every session. Getting its structure right is the cheapest way to make every teammate's sessions better at once.

The layers

  • User memory, ~/.claude/CLAUDE.md: your personal preferences across every project. Not shared.
  • Project memory, ./CLAUDE.md (or .claude/CLAUDE.md) at the repo root: checked in, shared by the team.
  • Subdirectory CLAUDE.md files: loaded when the agent works with files in that part of the tree. Useful in monorepos.
  • Local project memory, ./CLAUDE.local.md: personal notes for this repo. Add it to .gitignore. It exists only in the checkout where you create it, so if you use several git worktrees, import a file from your home directory instead.
  • Organization-wide managed memory: some companies deploy a policy-level file to every machine through device management.

More specific files add to the broader ones. Write rules at the narrowest level where they are true: a convention for the payments package belongs in packages/payments/CLAUDE.md, not at the root where every unrelated session pays for it.

What belongs in team memory

  • Exact commands: how to install, build, run one test, lint and typecheck.
  • Hard rules: generated files not to edit, migration procedures, forbidden patterns.
  • Conventions that are not visible from the code: naming, error handling style, where new modules go.
  • Known traps: a flaky test, a service that must be running locally, an env var that is easy to forget.
# Billing service

## Commands
- Install: pnpm install --frozen-lockfile
- One test file: pnpm vitest run path/to/file.test.ts
- Before pushing: pnpm check

## Rules
- Never edit src/gen/**, regenerate with pnpm codegen
- Money is integer cents everywhere, never floats
- New endpoints need a contract test in tests/contract

## See also
- @docs/architecture.md
A compact, checked-in CLAUDE.md. The @ line imports another file.

Imports keep it modular

A line like @docs/architecture.md pulls that file into memory. Use imports to reuse existing docs instead of duplicating them, and to let individuals pull in personal files from their home directory without committing them. Keep the main file short; imported files still cost context.

Anyone can add a note quickly with the /memory command or by asking the agent to remember something, but for shared files the change should still land through review. Remember that CLAUDE.md is guidance the model reads, not enforcement. If a rule must never be broken, back it with a hook or a permission rule, covered later in this course.

Exercise

Audit your team's memory

  1. Open your repo's CLAUDE.md, or create one with /init.
  2. Delete anything vague ("write clean code") or already obvious from the code.
  3. Add exact commands for build, single test and pre-push checks.
  4. Move any package-specific rules into a subdirectory CLAUDE.md.
  5. Open a pull request and ask one teammate to review it.

Keep going with your team

The other 4 lessons, quizzes, progress tracking, due dates and certificates come with the Training add-on at $12 per learner per month.

Get started

Independent course. Not affiliated with or endorsed by Anthropic, OpenAI or Anysphere.