The short version: Two developers, same tool. One automates their entire workflow. The other is still typing the same context prompt for the hundredth time. The difference isn't skill — it's configuration.
TL;DR
- The
.claude/folder has a project layer (shared with your team) and a user layer (personal, never committed). Knowing which is which is step zero. - CLAUDE.md compliance rate is roughly 80%. Hooks are 100%. If a rule actually matters, don't trust CLAUDE.md to enforce it.
- Over-engineering is a trap. One engineer built a complex system over four months, then deleted 60% of it. Start simple. Add only what you need.
You Think You're on the Same Starting Line — You're Not
Picture two developers opening Claude Code at the same time.
The first one types into the chat box every single session: "Review this code, make sure it follows our company style guide, check for type safety, and don't forget that we don't use console.log in production…" They repeat this context every time, hoping Claude remembers the last conversation. It doesn't.
The second developer doesn't type anything. The moment they save a file, Prettier runs automatically. Before any command containing rm -rf executes, the system intercepts it and asks for confirmation. They type /review, and Claude already has the full git diff of the current branch loaded — the report is ready in seconds.
Is that second developer smarter? No. They just understand how the .claude/ folder is designed to work. That gap — between the person who understands the system and the person who doesn't — is what separates a power user from someone who's barely scratching the surface.
The Four-Layer Onion: Put Things in the Wrong Place, Your Rules Are Worthless
Fig 1: Global → Project → Hooks → Runtime — each layer overrides the one before it.
The .claude/ configuration system has four distinct scopes, stacked like an onion from the outside in:
- Organization layer — baseline rules for your entire org
- User layer (
~/.claude/) — your personal preferences; never committed to git, never affects your teammates - Project layer (
.claude/in your repo, committed to git) — shared team standards and tooling - Local override layer — situational, temporary adjustments
Most people only know about layer three. They dump everything into the project CLAUDE.md — personal habits, team conventions, one-off workarounds — all mixed together. The result? Either your teammates get stuck with your personal quirks, or your personal settings leak into shared config and create confusion for everyone.
There's also a detail most people overlook: keep your CLAUDE.md under 200 lines. Once you go over that, compliance measurably degrades. Claude doesn't "forget" the later rules — but in a long file, the weight of instructions toward the end gets diluted. Your carefully written rule on line 180 is doing a lot less work than the one on line 20.
If you want precision, use the rules/ subdirectory pattern. Scope your rules by path — frontend conventions only load inside src/components/, backend rules only activate in api/. This makes your rules more targeted and, as a bonus, significantly reduces the token count consumed on each conversation.
80% vs. 100%: Why Hooks Are Actually Your Safety Net
This is the single biggest cognitive gap between someone who's figured it out and someone who hasn't.
CLAUDE.md compliance sits at roughly 80%. That's not Claude being lazy — it's the nature of natural-language instructions. They're suggestions, not constraints. You write "never use console.log" and Claude follows it most of the time. But on certain reasoning paths, it slips through. You've seen this happen.
Hooks run at 100% compliance. Because they operate at the system level — they don't go through Claude's judgment at all.
What does that actually look like in practice?
- PostToolUse Hook: Every time Claude modifies a file, Prettier automatically runs. Your codebase stays consistently formatted whether or not Claude "remembered" to format this time.
- PreToolUse Hook: Before Claude executes any Bash command, a scanner checks the content. Detects
rm -rf? Intercepted. User confirmation required. This guardrail doesn't rely on Claude's self-restraint — it's a physical block at the execution layer.
The principle generalizes: want a suggestion? Use CLAUDE.md. Want enforcement? Use Hooks. Conflating the two is the most expensive mistake beginners make, and most of them don't realize they're making it until something goes wrong.
settings.json also belongs in the enforcement layer — it's hard configuration at the client level. Just be aware that Bash deny rules don't constrain child processes. True path isolation requires a sandbox environment, which is a separate conversation.
Four Months Later, He Deleted 60% of It
Now, you might be sketching out an elaborate configuration system in your head after reading all of this. Hold on.
An engineer shared a story: he spent four months building out his Claude Code setup. Dozens of rules/ subdirectories, a complex Hooks pipeline, multiple custom Skills integrated throughout. The system looked impressive.
Four months later, he deleted 60% of it.
Why? Complex systems require complex maintenance. Some rules created friction in specific contexts. Some Hooks triggered unexpected behavior in edge cases. And some Skills — the ones he'd built to paper over gaps in Claude's capabilities — became unnecessary constraints after a model upgrade. The model could now handle those cases directly, but the Skills were getting in the way, narrowing its solution space rather than expanding it.
The signal that you've gone too far is simple: when the time you spend maintaining your configuration exceeds the time your configuration saves you, you've crossed the line.
Three Steps to Start — Not Four
Step 1: Set up your personal global config first (~/.claude/CLAUDE.md). Put your personal habits and style preferences here. It never gets committed. It only serves you.
Step 2: The project layer gets only what the whole team must align on. Naming conventions, architectural boundaries, banned packages — these are the things that genuinely belong in git. Keep it under 150 lines. Leave 50 lines of headroom for future additions.
Step 3: Write your most important rule as a Hook, not a prayer. Find the one thing in your project that absolutely cannot go wrong. Turn it into a PreToolUse Hook. That single Hook delivers more safety than a hundred CLAUDE.md lines ever could.
Commands, Skills, multi-agent parallel architectures — those come later. Nail these three steps and you're already ahead of 90% of users.
One question: What's causing you the most friction with your current Claude Code setup — rules that aren't being followed, or a configuration that's grown too complicated to reason about?
References
- Anthropic (2025). Anatomy of the .claude/ folder — project vs. user scope design. Anthropic Documentation / Blog.
- Community Contributors (2025). 40 practices that changed everything — Claude Code power user guide. Developer Blog / Community Post.
- Engineering Team (2025). .claude folder team configuration patterns — team-level configuration guide. Internal Guide / Blog Post.
- Pachaar, Akshay (2025). Thread on Claude Code Hooks and CLAUDE.md compliance rates. X (Twitter).
Found this useful?
Follow for new AI × biomedical research notes:
Or buy me a coffee to keep new content coming.
☕ Buy Me a Coffee