AI Compass / Knowledge cards
Maintaining your Claude Code setup
clear out after every model change
A setup is everything Claude Code receives in every session: instruction files such as CLAUDE.md, skills, hooks and settings. All of it takes up context, that is, the space the model has to read along with every answer. With every new model, part of the old instructions becomes unnecessary, but it stays in place unless you tidy up.
What it is for
A lean setup saves context and usage limit. You also keep track of which instruction still applies.
Steps
- After every model change, run
/doctor prompt-audit(from version 2.1.283). The command checks theCLAUDE.mdfiles, skills and other settings for outdated or contradictory instructions. Read the suggestions before you accept them. - Run
/skill-doctor(from version 2.1.252). It shows, for each skill, how much context it costs and how often it is used. Switch off skills that are rarely used. - For a new project, set the environment variable
CLAUDE_CODE_NEW_INIT=1and then start/init./initthen sets the project up in a conversation. According to AI LABS, it first asks about how you work and writes only after you agree. - Reduce permission prompts:
/fewer-permission-promptssearches your past sessions for frequent read-only commands and adds them to the project’s allowlist. - Plan mode: With the setting
showClearContextOnPlanAccept, Claude Code offers to clear the context first when you accept a plan.plansDirectorysets the folder where plans are stored. - Reduce consumption: With the model
opusplan, Claude works with Opus in plan mode and otherwise with the cheaper Sonnet.CLAUDE_CODE_SUBAGENT_MODELsets the default model for subagents, that is, helper agents that Claude starts for subtasks. - Try new settings first in the settings of a test project, and only then move them into the user settings, which apply to all sessions.
What may stay
The commands above show what is in the setup. These checks decide whether it should stay:
- Test question for every line: Would the model have known this on its own? Then delete it. What stays are deviations from the default, such as a particular test tool.
- Control run without the setup:
claude --safe-modestarts withoutCLAUDE.md, skills, plugins, hooks and MCP servers. If your usual tasks run just as well that way, you can delete. - Control run line by line: remove one instruction and repeat the same task. If the result stays the same, the line was unnecessary.
- Order for knowledge gaps: first say it in the prompt, then put it in the
CLAUDE.md, then make it a skill. Use an MCP server only if Claude cannot otherwise get at the information. - Length: according to the docs, each
CLAUDE.mdshould stay under 200 lines. What applies only to part of the project goes into path-scoped rules. Older videos still say 300 lines, which is out of date. - Prohibitions: According to the docs,
CLAUDE.mdis context, not a lock. What must never happen belongs in a hook.
Limits
- AI LABS recommends
/claude-api prompt-auditinstead. According to the docs, that is a subcommand for projects that use the Claude API (from version 2.1.221), and it checks prompts, skills and tool descriptions. Only the video says that it covers theCLAUDE.md.build-evalandhillclimbbelong to the same package. According to AI LABS, they cost money if your own app calls a model. Without a model call,build-evalonly plans tests. /skill-doctoris not available in sessions that do not fetch feature flags.- The setting
askUserQuestionTimeoutlets an unanswered question continue automatically after a waiting time. AI LABS presents it as a solution for unattended work. According to the docs, it applies only in user or managed settings. A bug report in the Claude Code repository (reported in September 2026, still open, version 2.1.270, macOS) says it does not take effect. That contradicts the video and is still unresolved. - If you set the subagent model or have Claude answer questions automatically, all sessions run differently when unattended. Before switching this on, consider who else works with these settings.
- Do not adopt: the advice from the video of 31 July (from 4:17) that third-party skills are hardly risky any more. See Vetting third-party skills.
- Whether the measurement in the video of 5 September (a low effort level is often enough) carries over to current models is open. Anthropic recommends a high level.
Links
- Yes/no guards for Claude Code: Hooks check individual steps, clearing out keeps the whole setup clean.
- Model choice: cost per task:
opusplanand the subagent model are a model choice per type of task. - Checkpoints and gates: Learning files grow too. They need the same upkeep.
- Vetting third-party skills: What stays in the setup should have been vetted.
- Keeping context clean: The setup is the fixed part of the context, the history is the growing part.
- Project start with rules and plan files: what belongs in the files at the start of a project.
Sources
- AI LABS: You Need To Add This In Your Claude Code Setup Right Now, 5 October 2026, 0:38-4:54, 7:23-8:39, 13:01-15:12. Sponsored by Scrimba (8:39-9:36); the sponsor has nothing to do with the settings
- Claude Code docs: Commands (
/claude-api prompt-audit,/skill-doctor,/fewer-permission-prompts) and Skills (/doctor prompt-audit, minimum versions), retrieved 9 October 2026 - Claude Code docs: Settings reference (
showClearContextOnPlanAccept,plansDirectory,askUserQuestionTimeout), retrieved 9 October 2026 - Claude Code docs: Environment variables (
CLAUDE_CODE_NEW_INIT,CLAUDE_CODE_SUBAGENT_MODEL) and Model configuration (opusplan), retrieved 9 October 2026 - GitHub: anthropics/claude-code, Issue #94372, retrieved 9 October 2026
- AI LABS: Claude Code Setup Guide By The Creator Himself, 31 July 2026, 2:10-3:45, 4:17, 10:17-11:55. Sponsored by Buzzy
- AI LABS: You Are Using Fable 5.1 Wrong (Do This Instead), 5 September 2026, 5:09, 6:30. Sponsored by Porkbun
- Claude Code docs: CLI reference (
--safe-mode) and Memory (under 200 lines; context, not a lock), retrieved 11 October 2026
Status
Checked 9 October 2026, section “What may stay” added 11 October 2026 · Maturity new · Commands and settings have been verified in the official docs. The videos give no figures for the effect (how much context is saved).
Want to try this with your team? That’s what the AI Lab is for. See the AI Lab