Launch offer: the first 1,000 users get Settl free for a year* Claim your spot
settlbuilding in public

The twelve Claude Code commands kit

The short version

Most people drive an AI coding agent with two things: typing a prompt and pressing enter. Everything else in the tool is sitting there unused, which is why sessions go bad in the same three ways every time. The agent edits half the app when you wanted a plan. It gets slow and forgetful two hours in. It breaks something and the only recovery you know is asking it to please undo that.

There is a key or a command for each of those. Six of them are in the reel. Six more are below, and they are the ones that stop the problem happening in the first place rather than cleaning up after it. Nothing here is a trick or a hack. It is the tool working the way it was built to work, and it takes about ten minutes to make them habits.

Copy these prompts

Paste them into Claude Code. Each one turns a command in this list into something the agent does for you instead of something you have to remember.

1. Make it plan before it edits

Before you change a single file, give me the plan: what you will edit, in what order, and what you expect to break. Do not write code yet. I will tell you when to start.

2. Hand off the session before it goes stale

Summarise this session for a fresh session that has none of this context. Keep the decisions we made and the constraints I gave you. Drop the dead ends, the logs and the file contents you already read. Write it as instructions to yourself, not as a story.

3. Find out what is actually filling the window

Tell me what is taking up the most room in your context right now, biggest first, and which of it you no longer need. For each one, say what I should do instead next time so it never gets loaded again.

The six from the reel

  1. ESC ESC opens the rewind menu. Pick any earlier prompt and restore the code, the conversation, or both. This is the one that replaces asking it nicely to undo. Two keys, and the last twenty minutes of damage is gone.
  2. SHIFT-Tab cycles the mode. Keep pressing until the prompt says plan mode. Now it researches and proposes and edits nothing. This is the single command that stops an agent rewriting half your app while you are reading the first paragraph of its answer.
  3. /compact takes a long conversation and rewrites it as a short one. Do it when it starts repeating itself or undoing its own fixes. Tell it what to keep in the same line: /compact keep the API decisions and the failing test. A session at ninety percent context comes back around twenty.
  4. /branch copies the conversation where it stands, so you can try the risky idea on the copy. Your working version is one /resume away. This is the difference between experimenting and gambling.
  5. /context shows what is actually in the window. Look at it before you blame the model. Forty thousand tokens of logs is not the model being dumb, it is you having pasted forty thousand tokens of logs.
  6. ! starts a shell command. !npm test runs it in your terminal and the real output goes straight into the conversation. Stop copying errors out of one window and pasting them into another.

The six nobody talks about

  1. # writes a rule to memory mid session. Start a line with it, say the rule in plain language, and it lands in the project instructions file for every future session. The moment you correct the agent twice on the same thing, that correction belongs behind a #.
  2. /add-dir brings a second folder into the session. The API in one place and the app in another stops being two conversations that cannot see each other.
  3. /agents gives a job its own context window. A long search, a review, a big read: send it to a subagent, get the conclusion back, and your main session never sees the thousand lines it read to get there. This is the cheapest fix for a window that fills up too fast.
  4. /hooks runs a command automatically at a point in the loop, for example your formatter or your tests after every edit. The agent then sees its own failures without you noticing them first.
  5. /permissions ends the approval prompt fatigue. Allow the safe commands you approve twenty times a day, keep the destructive ones asking. People who click approve on everything got there by being asked about ls too many times.
  6. /cost tells you what the session has spent. Run it after a session that felt expensive and you will find the habit that made it expensive, usually one giant paste or one file read on repeat.

The order that actually helps

Plan mode first, because a plan you rejected costs nothing and a rewrite you have to undo costs an hour. Rewind second, because knowing you can go back is what makes you brave enough to let it work. Then context and compact together, as a rhythm rather than an emergency: check the window every hour, compact before it is critical, not after it starts repeating itself. The other commands are all shaped like the same idea, which is keeping work out of the main conversation so the main conversation stays sharp.

Steal this for your app

Run this on your codebase

Paste this into a Claude session in your repo:

Audit how this project is set up for agent work. Report before changing anything:
1. Is there a project instructions file, and does it hold the rules a new session would need on day one?
2. List the rules I have clearly corrected more than once, judging from the code and the instructions file, and write each as one line I can add.
3. What in this repo is huge, generated or vendored, and would waste the context window if it ever got read? Name the paths.
4. Which commands do I run constantly that are safe to allow permanently, and which should always stay behind a prompt?
5. Suggest one automatic check to run after every edit, and the exact command for it.

Get the next one in your inbox