Setting up Claude Code for a team without losing track of what it changed
Claude Code is quick to install and slow to trust. One developer using it on a side branch is easy. A team using it on a codebase that runs a business needs more than a CLAUDE.md file and good intentions. This is the se
Claude Code is quick to install and slow to trust. One developer using it on a side branch is easy. A team using it on a codebase that runs a business needs more than a CLAUDE.md file and good intentions.
This is the setup we use. It treats Claude Code like a new contributor with fast hands and no context: it gets a written brief, limited access and a reviewer.
1. CLAUDE.md is the brief, not the rulebook
Put your conventions, commands and off-limits areas in a CLAUDE.md at the repository root and commit it. Say how to run the tests, which folders are generated, and which modules nobody touches without asking.
Anthropic's documentation treats this file as context. The model reads it and usually follows it, but nothing enforces it. Anything that must hold every time belongs in the next three layers.
2. Permissions in a committed settings file
Commit .claude/settings.json so everyone on the team starts from the same rules:
{
"permissions": {
"allow": [
"Bash(npm run lint)",
"Bash(npm run test:*)",
"Bash(npx tsc --noEmit)"
],
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)"
]
}
}
Allow the commands you'd happily let anyone run: lint, type checks, tests. Deny reading environment files and secrets outright. Everything else falls back to asking.
One detail catches teams out. Deny rules apply straight away. Allow rules only take effect once each person has trusted the folder, so a fresh clone still asks before running your test command.
3. Hooks that run checks after every edit
A hook can run your linter or tests after Claude Code edits a file:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [{ "type": "command", "command": "npm run lint --silent" }]
}
]
}
}
Two things to know before relying on them. A hook that fails doesn't block by default. And command hooks run with your full user permissions, so review a hook change as carefully as a deploy script.
Hooks shorten the feedback loop. They aren't the gate.
4. CI and branch protection are the gate
The control that doesn't depend on anyone's laptop is the pull request. Run lint, types and tests in CI, protect the main branch, and require a human approval on every merge.
Then make the diffs small enough to read. Most "nobody read this" changes come from a process that lets a 2,000-line diff through, not from the tool. What has worked for us:
- One task per pull request, scoped before Claude Code starts.
- Tests written or approved by a person first, then the change.
- Extra scrutiny for any edit to the guardrails themselves: settings, hooks, CI config.
Where it helps, and where to slow down
In an operations codebase, it's strongest at integration glue, reading inherited code, writing characterisation tests before a refactor, and drafting migrations for a person to check.
Slow down around money, permissions and migration logic, and around business rules nobody has written down. Those are the places where a plausible change is the dangerous one.
What this looks like in practice
We built a school management system with Claude Code. A Claude co-author trailer sits on 136 of its 242 commits. Changes arrive as pull requests that must pass lint, tests and a build in CI before they merge, and one project command runs seven review agents in parallel, from security to accounting. The write-up is at https://skofi.tech/work/school-erp.
The longer version of this guide, with what it doesn't cover, is on our site: https://skofi.tech/insights/claude-code-for-business-teams
Saveez Irfan runs Skofi, a small studio that builds custom software, AI integrations and automation for operations teams.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.