Claude Code setup: my lean config with hooks and a critic
From a bloated setup to a lean one
This page looked completely different over the summer, and so did my setup, and I’ll describe both, because the difference between them will probably tell you the most.
Before. In summer 2026, Claude Code on my personal computer was stuffed with everything I’d seen other people use, a hundred-odd skills and dozens of hooks, plugins and agents, mostly taken from the community, including big bundles like Superpowers. It looked like a well-equipped workshop, and I give the exact numbers and the whole story in a case study.
In practice, it got in the way, because every skill and every plugin takes up a slice of context, the conversation’s working memory, which only holds a limited amount of text. So part of that memory was taken up by tools I didn’t need that day, my subscription limits ran out faster and rules from different bundles contradicted each other. When something then broke, it was hard to tell which of those dozens of things was to blame.
The turn. In October 2026 I deliberately tore it all down and started over. Since then I add new tools one at a time and only when I really need them, and if one doesn’t prove itself, I remove it again.
Today. I keep three plugins permanently enabled, along with my own skills for tasks I genuinely repeat, eight hooks as safeguards and a critic, a helper agent that only reads finished work and looks for mistakes without changing anything.
I noticed the result right away, because Claude responds faster when it doesn’t have to keep dozens of unneeded tools in mind, the work is better and usage dropped. There are also fewer conflicts and nasty surprises, because I know what’s in my setup and why.
You don’t have to copy someone else’s setup, because you can start with the bare app and add only what you actually miss. I put ready-to-copy pieces on the Templates page.
CLAUDE.md
CLAUDE.md is the project rules file, which Claude reads at the start of every conversation, so it knows how to behave in that project.
It doesn’t appear on its own, so either I type the /init command and Claude goes through the project and drafts a first version, or I say “add to CLAUDE.md that…” and it adds the rule. I never edit the file by hand.
Over the summer, my CLAUDE.md was a long list of mandatory procedures, connected services and exceptions. Today it has a clear skeleton with the three things that have worked best for me.
A task, tool, done map. I have one line for each type of work that says which task it is, what does it and when it counts as done, for example “Checking output against the brief: the critic. Done when it returns the verdict USABLE.” Then Claude doesn’t have to guess when it can stop.
Lessons from my own mistakes. Like “Verify state with a concrete test, never just by the page URL and title.” Or “One change, one commit,” where a commit is a single saved step in the project’s history, and I’ve had that rule ever since I saved three changes at once and then spent three days figuring out which one broke something. Another one is “Every number must come from a script, not from the model’s head.”
What to keep when compacting. When a long conversation gets compacted, some details are lost, so at the end of the file I have a short section on what must not get lost, meaning tasks in progress, file paths, the critic’s verdict and what is waiting for me.
Five minutes spent writing down a rule saves me hours of explaining later. You’ll find a skeleton to copy in Templates.
Auto memory
Auto memory is a second, separate thing where I don’t enter anything myself, because Claude writes down what it learns as it works, for example when I correct it or when it figures out how I like something done.
On its own, the model is like someone with amnesia who forgets absolutely everything after every conversation, and memory is its notebook. At the start of a conversation, at most the first 200 lines or 25 kilobytes are loaded, which is why it pays to have it tidied up now and then by saying “Go through your memory and throw out whatever no longer applies.”
Memory is mostly about how Claude behaves, while I keep my working notes and source material elsewhere, in plain text files stored in git. I write more about that in My stack.
Model and effort
Claude keeps its basic settings in a file called settings.json, which records which model I want, how thoroughly it should think and what it’s allowed to do. I don’t edit this one by hand either. I say what I want to change, and Claude updates the file.
My main conversation runs on Claude Opus 5.5 with the large one-million-token context, at high effort. Effort controls how thoroughly the model thinks before it answers, and higher effort tends to be more thorough but uses up more of your limit. Subtasks are handled by subagents, helper agents that get one piece of work and return only the result, and they run at medium effort to save the limit.
In settings.json it looks like the example below. Effort is now saved separately for each model under the modelSettings key, and when you type /effort high, Claude Code writes it there itself. Watch out for older guides, though, because an effortLevel key at the top level of the file no longer applies to Opus 5.5 (it belongs inside modelSettings), and the model otherwise runs at its default medium effort. The last line sets how long conversation history is kept, and the default of 30 days was too short for me, because I sometimes go back to old conversations.
{
"model": "opus[1m]",
"modelSettings": {
"claude-opus-5-5": { "effortLevel": "high" }
},
"cleanupPeriodDays": 3650
}
I’m on the Max plan at $100 a month, which besides Opus 5.5 lets me use the most powerful Fable 5.2, the faster Sonnet 5.5 and the cheapest Haiku 5.5. The cheaper plan is Pro at $20 and the pricier one is Ultra at $200, and you can switch the model at any time with the /model command, and the effort with /effort.
Hooks
A hook is an automatic safeguard that Claude Code itself runs, not the model, and it fires on its own at a specific moment, for example before Claude does something or when it wants to wrap up its work. That’s why it runs every time, not only when Claude happens to remember it.
Over the summer I had 39 of them, some of which just restated rules while others overlapped with each other. Today I have eight entries in my settings, each guarding against one specific weakness of the agent, and these are the three most important:
- Done guard (the Stop event). When Claude reports “done” without proof, it sends it back to work, but only once, so it can’t loop.
- Question guard (the PreToolUse event on questions to me). It lets a question through only if it contains a “Searched:” line saying where Claude looked for the answer itself.
- Protected-places guard (PreToolUse on writes, edits and commands). It blocks writing to shared folders and deleting anything in them.
The rest are helpers, one adding the rules relevant to the topic of each of my messages and another logging when Claude is waiting for my approval, and usage is recorded at the end of each conversation. Simplified, the question guard looks like this:
# Question guard (shortened)
# PreToolUse, matcher: AskUserQuestion
import json, sys
data = json.loads(sys.stdin.buffer.read().decode("utf-8"))
question = json.dumps(data.get("tool_input", {}), ensure_ascii=False)
if "?" in question and "Searched:" not in question:
print("Search first. Add a line "
"'Searched: <where> - <what you found>' to the question.", file=sys.stderr)
sys.exit(2) # code 2 = the question is not sent, Claude gets the reason
sys.exit(0)
I paid for two lessons. The first is that a hook must never fail silently, and if it crashes, it should log the error and tell you, otherwise you believe for a long time that it’s protecting you. The second is that a hook that sends work back needs a guard against looping. You’ll find the full done guard in Templates.
Permissions
Permissions define what Claude may do on its own, what it has to ask about, and what it may not do at all. There are three lists, allow, ask and deny, and a deny rule always wins.
I leave reading, searching, editing files and web search open. Reading passwords and keys is firmly denied, covering .env files, certificates, SSH keys and login details for cloud services, and writing to shared drives it has no business touching is denied too.
On my work laptop I now run in auto mode, where a checking model decides on routine steps and doesn’t bother me. I added my own rules to its defaults in plain sentences, and anything on this list auto mode stops and leaves the decision to me:
"autoMode": {
"soft_deny": [
"$defaults",
"Sending an email or message in my name.",
"Deleting files. Archive instead of deleting.",
"Overwriting an original. Always save a new version under a new name."
]
}
This setting belongs in the personal ~/.claude/settings.json file, not in the project. I trust Claude, but on irreversible steps I want the final say. A simpler version with allow, ask and deny lists is in Templates.
Status line
The status line is the line under the prompt box in the terminal version of Claude Code. It shows whatever you set up, for example which model is running, at what effort, what percentage of the context is full and how much of your weekly limit is gone. You set it up with the /statusline command by describing what you want to see in it. In the desktop app, the Context card in the session details panel shows how full the context is.
I mostly look at the context fill when I’m deciding whether to start a new conversation. The fuller the context, the more Claude loses track, and then it’s better to start fresh. When exactly I do that, and what Anthropic says about it, is on the Context and modes page. I cover the other commands on the Commands page.
MCP and subagents
MCP servers work like USB, because each one plugs a single service into Claude, such as email, a database or GitHub, and thanks to that I no longer have to be the human USB cable, copying data between windows by hand.
Over the summer I had lots of them connected at once, but today I enable only the ones I actually need for the project at hand, because every connected server gives Claude more tools it has to keep in its head. I also pin each server to a fixed version, because when the latest version was downloaded at every start, the server sometimes didn’t start at all.
Subagents are helper agents between which the main Claude splits up the work, so each one gets its own piece and returns only the result. They’re useful for big tasks that break down into independent parts, and since they run in parallel, the work gets done sooner. But they also eat into your limit faster, which is why I don’t use them for everything.
I keep three checkers permanently, all of which only read and change nothing.
- Critic. It compares finished work with the brief, getting only the paths to the brief and the output, never the author’s conclusion, and returns the verdict USABLE, FIX BEFORE USE, or STOP.
- Rules checker. When Claude writes down a new rule, it compares it with my exact words and mainly catches overgeneralisation, when one exception turns into a ban on everything. It starts without CLAUDE.md so that it isn’t influenced by it.
- Settings auditor. After every change to hooks, permissions or rules, it checks that nothing contradicts anything else.
I describe how I work with all this day to day in How I work. You’ll find the specific plugins and skills in What I use. Try starting small, and let me know what you found missing.