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
- Structure shared and personal memory with the CLAUDE.md hierarchy
- Check skills and custom slash commands into the repo so the whole team uses the same workflows
- Write hooks that enforce guardrails deterministically, including blocking PreToolUse hooks
- Configure project MCP servers in .mcp.json without leaking credentials
- Set team-wide permission rules in .claude/settings.json and keep personal overrides local
- Run an AI-assisted code review process that keeps humans accountable
Outline
- Shared CLAUDE.md and the memory hierarchy (16 min, 3-question quiz)
- Skills and slash commands in the repo (17 min, 4-question quiz)
- Hooks as guardrails (18 min, 4-question quiz)
- MCP servers, .mcp.json and settings.json (17 min, 4-question quiz)
- AI-assisted code review practices (17 min, 4-question quiz)
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.mdImports 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
- Open your repo's CLAUDE.md, or create one with /init.
- Delete anything vague ("write clean code") or already obvious from the code.
- Add exact commands for build, single test and pre-push checks.
- Move any package-specific rules into a subdirectory CLAUDE.md.
- 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 startedIndependent course. Not affiliated with or endorsed by Anthropic, OpenAI or Anysphere.