The four layers, and the highest-leverage move in each
It helps to stop thinking of “working with Claude Code” as one skill and start thinking of it as four stacked layers, each trusted by the one above. Almost every practice worth following lands in exactly one of them, and each layer has a single highest-leverage move that buys you more than anything else you could do there.
- Substrate - the repository and toolchain the agent works in.
- Configuration - the files that steer the agent:
CLAUDE.md, hooks, and subagents. - Context - how decisions and progress survive across sessions.
- Conventions and reasoning - and how you review what the agent produces.
Substrate: be green from commit one
The single best thing you can do is make the repository give honest feedback before the agent writes a line. A toolchain that type-checks, lints, and tests from the first commit turns “it ran” into “it is correct,” because the agent gets caught the moment it drifts. This is the whole argument for getting CI green from commit one: an agent without gates ships code that nothing checks, and you find out later.
For anything multi-surface, give the agent clear boundaries to work within. A project that is set up right - and for larger work, a real Turborepo and pnpm monorepo - stops the agent from inventing a structure you then have to undo.
Configuration: lean instructions, deterministic enforcement
The most common mistake is a sprawling CLAUDE.md the agent half-ignores. The practice that actually works is the opposite: keep it lean enough that Claude reads all of it. That is the heart of CLAUDE.md best practices - a short, well-structured file beats a long one, every time.
The corollary matters just as much. Anything that must happen - formatting after an edit, blocking a destructive command, running a check - does not belong in an instruction the agent can forget. It belongs in a hook, which runs deterministic code that cannot hallucinate. Put the soft guidance in the prose; put the non-negotiables in code. And when a chunk of work repeats - a migration, a review pass - hand it to a scoped subagent with one clear goal and a narrow set of tools, rather than bloating the main session’s context.
Context: hand off to disk, not to memory
The most-felt pain in Claude Code is that every session starts from zero - it forgets your codebase, the decisions you made an hour ago, and the reasoning behind them. The best practice is not a memory plugin bolted on afterward; it is treating context management as part of the project. Write durable state - decisions, progress, open questions - to files early and often, never at the edge of a full context window, and never trust compaction to preserve it. A handoff that lives on disk is the difference between an agent that remembers and one that re-learns your project on every boot.
Conventions: review the diff like a junior dev’s PR
The last layer is human, and it is the one teams skip. Read every agent diff the way you would a capable junior engineer’s pull request: assume good intent and real competence, but verify. Look for the change that technically passes but quietly widens scope, reformats a file no linter guards, or solves the symptom instead of the root cause. The agent is fast and mostly right, which is exactly why an unreviewed diff is dangerous - the failures are plausible, not obvious. “Verified, not should-work” means you ran it and watched it behave, not that the code looked reasonable.
How claudesetup fits
Most of these practices are setup decisions you only get to make once, cleanly, at the start. That is what claudesetup does in a single command: it lays down the green substrate, a lean CLAUDE.md, the context handoff, and the conventions - and ships the reasoning for every choice alongside the files, so you understand what you own. It does not replace the human review at the end; it just makes sure the first four layers are already right when you get there.