Reseek
Claude Code

Claude Code for Engineering Teams: The Complete Playbook

Why Claude Code for Engineering Teams

Every engineering org faces the same tension: the tools that make individual engineers more productive often create new coordination overhead at the team level. Copilot autocompletion helped individual velocity but didn’t touch PR review latency or architecture drift. Claude Code is different because it operates at the session level—it can hold a full context window of your codebase, your standards, and your specific task, then help you move from idea to mergeable code without the constant context-switching that kills deep work.

For engineering teams, the compounding value isn’t the individual autocomplete—it’s what happens when every engineer on your team can hold a 30-minute pairing session with an AI that knows your conventions, your test patterns, your migration scripts, and your deploy process. The unlock is consistency: Claude Code configured well produces output that looks like it was written by a senior member of your team, not a generic LLM.

But that configuration work is real. This hub covers it end to end: the CLAUDE.md substrate that makes Claude useful team-wide, the hook patterns that enforce standards automatically, a phased rollout playbook, and the metrics that tell you whether it’s working.

The CLAUDE.md Substrate

CLAUDE.md is the configuration file Claude reads at the start of every session. Think of it as a persistent system prompt that travels with your code. A well-crafted CLAUDE.md can encode years of institutional knowledge—the stuff that’s currently locked in senior engineers’ heads and only surfaces during code review.

What belongs in CLAUDE.md

Repository context: What does this service do? What are its uptime requirements? What’s the blast radius of a bad deploy? A single paragraph here saves Claude from making suggestions that are technically correct but operationally dangerous.

Tech stack and versions: “We use React 18 with the app router, not pages. We use Prisma 5 with PostgreSQL 15. Do not suggest class components.” Version pinning alone eliminates a large class of hallucinated API calls.

Test conventions: “All tests use Vitest. Unit tests live adjacent to source files. Integration tests live in tests/integration/. Run npm test for unit tests, npm run test:int for integration. Coverage threshold is 80%.” Without this, Claude will write tests that are structurally fine but break your CI.

Code style that ESLint doesn’t catch: “Functions should be named for what they return, not what they do—prefer userByEmail() over getUser(). Event handlers use the handle prefix: handleSubmit, not onSubmit. Avoid abbreviations in function names.” Style linters enforce syntax; CLAUDE.md encodes your team’s semantic conventions.

Forbidden patterns: “Do not use any in TypeScript. Do not use console.log in production code—use the logger at src/lib/logger. Do not write raw SQL—use the Prisma query builder.” This is the highest-ROI section. Every time a senior engineer says “we don’t do it that way” in code review, ask whether it belongs in CLAUDE.md.

External resources: Links to your internal docs, your API contract files, your database schema. Claude can read files you reference explicitly; a CLAUDE.md that says “see docs/api-contracts/ for the canonical shape of all API responses” saves significant back-and-forth.

The two-tier CLAUDE.md architecture

The most scalable approach for large codebases is a two-tier structure:

  1. Org-level CLAUDE.md (in a shared standards repo or the root of your monorepo): Company-wide conventions, security requirements, deployment process overview, links to internal tooling docs. All engineers pull this as a starting point.

  2. Repo-level CLAUDE.md (at the root of each service repo): Service-specific context—what this service does, its test commands, its environment setup, any quirks in its architecture. Stays close to the code it describes.

Claude merges these automatically when both are present. The org-level file handles the 80% of standards that apply everywhere; repo-level files handle the 20% that’s specific.

CLAUDE.md anti-patterns

Avoid writing CLAUDE.md as a tutorial for Claude about how to write code generally. Claude already knows how to write code. What it doesn’t know is your team’s specific decisions and the context behind them. A CLAUDE.md that says “write clean, readable code” is noise. A CLAUDE.md that says “we migrated from Express to Hono in 2025—do not suggest Express middleware patterns” is signal.

Also avoid burying everything in a single massive file. If your CLAUDE.md is over 500 lines, it’s probably trying to do too much. Extract reference material into linked files and keep CLAUDE.md as a navigational index.

Hook Patterns for Enforcement

Claude Code supports hooks—scripts that run before or after Claude executes commands. Hooks are where enforcement moves from aspirational (written in CLAUDE.md) to automated (checked in CI equivalent, but local).

Pre-tool-call hooks

Pre-tool-call hooks run before Claude executes a shell command or file write. They’re useful for:

Blocking dangerous patterns before they land: A hook that scans proposed file writes for console.log or debugger statements and warns Claude before the write happens catches issues earlier than code review.

Enforcing scope boundaries: If you’re working in a microservices architecture, a hook can check whether Claude is about to write to a service directory outside the declared scope of the current task. Useful for preventing “while I’m here” sprawl.

Audit logging: In regulated environments, hooks can log every file Claude writes to a structured audit trail. The hook doesn’t block—it just records. When compliance asks what changed and when, you have an answer.

Post-tool-call hooks

Post-tool-call hooks run after commands execute. Common patterns:

Auto-formatting: Run prettier --write on any file Claude modifies. Guarantees consistent formatting regardless of what Claude generates, and removes formatting from code review entirely.

Test execution: After Claude writes or modifies a test file, automatically run npm test --testPathPattern={file}. Claude sees the output immediately and can self-correct before you even look at the code.

Type checking: Run tsc --noEmit after Claude modifies TypeScript files. Surfacing type errors in-session rather than at CI time shortens the feedback loop dramatically.

The hook configuration file

Hooks are configured in .claude/settings.json at the repo level. A minimal but useful hook configuration:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write",
        "hooks": [
          {
            "type": "command",
            "command": "npm run lint:fix -- ${file}"
          }
        ]
      }
    ]
  }
}

The key insight is that hooks close the feedback loop that makes Claude Code genuinely useful for production code: write → validate → self-correct, all within a single session.

Rollout Playbook

Phase 0: Foundation (Week 1)

Before anyone uses Claude Code beyond the core platform team, get the substrate right.

Write the org-level CLAUDE.md: Pull your senior engineers into a 90-minute working session. Ask: what are the things you always catch in code review that aren’t covered by linters? What context do you wish new engineers had on day one? What patterns has the team explicitly decided against and why? That session usually produces 80% of a good CLAUDE.md.

Configure hooks for the pilot repos: Pick two or three repositories that will be part of the pilot. Set up auto-formatting and test-execution hooks. This ensures every engineer in the pilot starts with the same baseline configuration.

Establish a feedback channel: A dedicated Slack channel or linear project where engineers can report when Claude did something unexpected. During the rollout, this is your most valuable signal.

Phase 1: Pilot (Weeks 2–3)

Select 5–10 engineers: The ideal pilot group is mixed seniority. Include senior engineers who can assess quality and junior engineers who will stress-test the guardrails. Include at least one skeptic—they will find the failure modes faster than enthusiasts.

Define two or three specific use cases: Don’t let the pilot be “use Claude Code for whatever.” Define the first use cases: writing tests for existing code, refactoring a specific module, writing runbooks. Constrained use cases produce cleaner signal about whether the tool is working.

Weekly syncs: 30-minute pilot sync each week. Not to report metrics—you won’t have meaningful metrics yet—but to share moments where Claude was unexpectedly useful or unexpectedly wrong. Update CLAUDE.md after every sync.

Phase 2: Broad Rollout (Weeks 4–5)

Communicate the “why”: Engineers who weren’t in the pilot will be skeptical about AI tools. The communication should focus on what the pilot group learned, including the failure modes. Honest communication about limitations builds more trust than marketing language.

Run a 2-hour onboarding session: Walk through CLAUDE.md, hooks, and the three most common use cases. Include a live demo on a real codebase problem. Make the recording available for async viewing.

Designate Claude Code champions: At least one engineer per team who went through the pilot. They’re the first line of support for their teammates.

Phase 3: Stabilize (Week 6+)

Establish a CLAUDE.md review cadence: Quarterly review of the org-level CLAUDE.md. What patterns have been added to linters that can be removed? What new conventions have the team adopted? CLAUDE.md should evolve with your codebase.

Track escalation patterns: If the same types of Claude errors keep appearing in the feedback channel, that’s a signal that CLAUDE.md needs an update, not that the engineer is using Claude wrong.

Measuring Adoption

Adoption metrics for AI coding tools are notoriously easy to game and easy to misread. The goal is not 100% Claude Code usage—it’s better engineering outcomes. Measure the outcomes, not the tool usage.

Leading indicators

PR cycle time: Time from first commit to merge. This is the metric most sensitive to AI assistance because the biggest lever Claude Code pulls is reducing the time engineers spend blocked. A 10–15% reduction in average cycle time after rollout is a credible signal; larger reductions in early months often reflect novelty effects.

Review round-trips: Average number of review cycles per merged PR. If Claude Code is helping engineers write code that’s closer to the team’s standard on the first pass, review round-trips should decrease. This is the most direct measure of whether CLAUDE.md is working.

Time-to-first-green-build: On new feature work, how long from first commit to a clean CI run? Claude Code with good hook configuration should help engineers catch type errors, test failures, and lint issues before pushing.

Lagging indicators

Self-reported unblocking: In quarterly retros, ask: “Were there moments in the last quarter where you were stuck on something technical and Claude helped you get unstuck?” Count the yes/no. Qualitative signal about whether Claude is earning trust.

Code ownership confidence: Ask engineers whether they feel confident owning code that Claude helped write. A “yes” rate below 80% suggests engineers are treating Claude as a black box, which is a governance risk. Address it by reinforcing that all Claude output requires review, not rubber-stamping.

What not to measure

Avoid measuring Claude Code “usage” (sessions, tokens, file writes). Engineers will optimize for the metric, not the outcome. An engineer who uses Claude Code thoughtfully for one hour of focused session work is getting more value than one who runs it continuously without review.

Spoke Articles in This Hub

This hub covers the strategic and operational layer of Claude Code deployment. The following spoke articles go deep on specific aspects:

Next Steps

The best way to start is with a single CLAUDE.md for a single repository—one that your team actually works in every day. Write it collaboratively, deploy it to a pilot group, and treat the first two weeks as a learning exercise rather than a proof of concept. The goal isn’t to prove that Claude Code works; it’s to discover how it works best for your specific codebase and team conventions.

If you’re a platform lead or engineering manager responsible for the rollout, the Claude Code for Platform Leads spoke article covers the operational specifics that this hub intentionally abstracts.