If you learn only three, make them /clear for a fresh start, Esc to stop Claude, and Esc twice to take a wrong turn back. The rest are below, each with a note where the desktop app’s Code tab works differently from the terminal, all checked against Anthropic’s Claude Code docs on 16 October 2026.
If the desktop app replies that a command “isn’t available in this environment”, start a new session in place of /clear, or run the command in Claude Code in your terminal.
When the session gets long or muddled
/clearstarts an empty conversation and keeps your project memory, the CLAUDE.md file. It costs nothing, and the old conversation stays available through/resume. Add a name, such as/clear pricing page, to find it again./compactsqueezes the conversation into a summary so you can keep going on the same job. Add what to keep, such as/compact keep the pricing decisions. Compacting a very long session is itself a large request, per Anthropic’s costs page./contextshows how full the session is, as a coloured grid with suggestions. In the desktop app, the ring next to the model picker shows the same fill./btwasks a side question that never enters the conversation, so it stays clean. It works in the desktop app too.
Anthropic’s best-practices page gives a simple rule: if you have corrected Claude more than twice on the same thing, type /clear and start again with a better first message.
When Claude takes a wrong turn
Escstops Claude mid-reply and keeps the work done so far.Esctwice on an empty prompt, or/rewind, opens a menu of your earlier messages;/undois the same command. Pick the one where things started to go wrong.- That takes you back to just before it, puts the message back in the box to edit, and lets you restore the conversation, and the files too if Claude changed any.
/diffshows exactly what changed in your files, so you can read it before you trust it. In the desktop app, the diff pane does this./branchcopies the conversation so you can try another direction and keep the original.
When your limit is running low
/usageshows how much of your plan you have used and, on Pro, Max, Team and Enterprise, what is eating it: long sessions, add-ons or a job left repeating on a timer./costand/statsopen the same screen. In the desktop app, the ring by the model picker shows your plan use./modelswitches model, and/effortsets how hard it thinks. A lighter model or a lower effort stretches the limit for simple jobs. In the desktop app,Cmd+Shift+Iopens the model menu andCmd+Shift+Esets effort (Ctrl on Windows)./autocompactsets how full a session gets before it compacts by itself. On the newest models it waits until the session holds close to a million tokens (the chunks of text AI counts), and every late message carries all of them;/autocompact 400kmakes it compact at 400,000.
Every message resends the whole conversation, so /clear between unrelated jobs is the cheapest habit, and it costs nothing.
When you want it to remember your project
/initlooks through the folder and writes a CLAUDE.md file with what it learns, which every new session reads. If the file exists, it suggests improvements./memoryopens your CLAUDE.md files and shows what Claude has saved about the project by itself./doctorchecks your setup, flags an overgrown CLAUDE.md and unused add-ons, and asks before it changes anything.
Many cheat sheets still teach a # shortcut for saving a note to memory. Anthropic removed it in December 2025, per its changelog, so ask Claude in plain words to add the note to CLAUDE.md.
When you want it to ask before acting
- Check your mode first. Recent versions start new terminal sessions in Auto, which decides for itself what needs your OK, per Anthropic’s best-practices page.
Shift+Tabin the terminal cycles the permission modes. Manual asks before every change; Accept edits stops asking about file edits; Plan looks and plans first. In the desktop app, use the mode menu by the prompt, orCmd+Shift+M(Ctrl+Shift+Mon Windows)./planstarts plan mode with a task, such as/plan tidy my invoices folder.!at the start of a message runs a command yourself, with no permission prompt and nothing rewind can undo, such as!lsto list the folder; Claude sees the result.
When you want a second look at the work
/code-reviewchecks your changes for bugs, and/reviewis the same command. It is built around git, the version-tracking tool developers use, so it suits projects that already use it./security-reviewchecks changes for security holes, and needs a git project linked to an online copy.
No git yet? Ask Claude to “set up git in this folder and save a snapshot of everything as it is now”. That gives /code-review something to compare against, and gives you a way back from changes rewind cannot undo; to go back later, ask Claude to put the folder back to that snapshot.
For a folder of documents, read the changes with /diff, then ask in plain words: “check the changes you made against my notes”.
When a connected app stops working
/mcplists the outside apps and services Claude Code is connected to, and handles signing in to them. If one stops responding,/mcp reconnect allreconnects every one. An empty list means nothing is connected yet.
When you want it to keep working while you are away
/goalsets a finish line, and Claude keeps working until it is met, with a check after every turn. Anthropic’s goal page suggests adding a limit, such as “or stop after 20 turns”. In Manual mode it still stops to ask before each change, so it only keeps going on its own in Auto./looprepeats a job on a timer, such as/loop 30m check the build, while the session stays open. It stops after 7 days, and each run sends your whole conversation again, per the costs page.
To watch a file or folder, ask in plain words, such as “tell me when a new file lands in my Downloads folder”; Claude can keep watch for up to 30 minutes.
For anything longer, set up a scheduled task on the desktop app’s Routines page, which runs while your computer and the app are on.
The skill: reset without losing your place
Before a /clear, save a handoff note so the next session starts from it. This skill reads the session, asks what you are doing next, picks /clear, /compact or rewind, writes the note when one is needed and then gives you the exact words to type, because Claude cannot type those commands for you.
---
name: fresh-start
description: Resets a long or muddled Claude Code session: picks /clear, /compact or rewind, writes a handoff note first and gives the exact words to type. Use when a session drags or goes wrong.
---
# Fresh start
You are the colleague who writes the handover before a shift change. Nothing I decided in this session gets lost when it is wiped, I never pay for a bigger reset than I need, and I never undo work I meant to keep. You cannot run /clear, /compact or /rewind yourself, so your job ends with the exact words for me to type.
Work through the four stages in order. If Stage 2 decides no reset is needed, go straight to Stage 4.
## Stage 1: Read the session, then ask
Before you ask anything, look back over this session and work out:
- how many times I corrected you on the same issue, and what the issue was;
- whether my latest messages are about a different job from the earlier ones;
- whether I stated rules or preferences in this chat that are not in CLAUDE.md;
- whether a /goal is running.
If this session has been compacted, say you can only see what came after the summary.
Then ask me these, with your read filled in, and stop and wait:
1. What happens next: (a) I keep going on the same task, (b) I switch to something unrelated, or (c) the last few replies went wrong and I want to go back. Say which one the session looks like to you. If (b), ask what the new task is, in one line.
2. "I count [number] corrections about [issue]. Does that match?" Skip this if you count none.
3. Am I in the terminal, VS Code or the desktop app?
IF I answer (a), ask one more thing and wait: type /context and paste the line that shows how full the session is (in the desktop app, say how full the ring next to the model picker looks), and tell me if my plan limit is nearly used up or if I have been away for more than an hour.
If my first message already answers these, say so in one line and go to Stage 2. If I reply "not sure" to a question in this stage, use your own read from above and say that you did. If I reply "not sure" to any later question or offer, take the safe choice: write [NOT STATED], skip the optional extra, and change nothing.
## Stage 2: Pick one reset, and say why
Choose exactly one, using the first rule that fits, and give the reason in one sentence:
1. IF I chose (c): recommend rewind (Esc twice on an empty prompt, or /rewind).
2. IF I chose (b), something unrelated: recommend /clear. It starts an empty conversation, keeps project memory (CLAUDE.md) and costs nothing. Do not draft a better prompt for the task I am leaving.
3. IF I chose (a) and I corrected you more than twice on the same issue: recommend /clear with a better first prompt, because the session is now full of failed attempts.
4. IF I chose (a) and my plan limit is nearly used up: recommend /clear with the handoff note, and do not recommend /compact, because compacting a long session is itself a large request.
5. IF I chose (a) and I am coming back after more than an hour away: lean to /clear with the handoff note, because my next message rereads the whole session anyway, so a break is the cheapest moment to start clean.
6. IF I chose (a), the session is half full or more, and one stretch of it was a detour (a long fix, a dead end, a pasted log) while my opening instructions still matter: recommend rewind's "Summarize from here" on the first message of the detour. It squeezes everything from there to now into a summary and keeps the earlier messages word for word. Warn me the menu puts that message back in my prompt box, so I delete it unless I want to send it again.
7. IF I chose (a) and the session is half full or more: recommend /compact with a focus line. Tell me compacting is itself a large request, and that /clear with the handoff note is the cheaper choice if I am happy to start from the note.
8. IF I chose (a) and the session is under half full: say no reset is needed yet, tell me to run /fresh-start again when it passes half, and go to Stage 4.
9. IF you are unsure which applies: name the two you are choosing between and ask me the one question that decides it.
Whatever you picked:
- IF a /goal is running and you picked /clear: tell me /clear ends it, and copy the goal's condition into the handoff note so I can set it again.
- IF I am in the desktop app and a command replies that it isn't available in this environment: for /clear, tell me to start a new session and paste the first message there; for rewind, first ask me to try Esc twice on an empty prompt; if that fails too, offer to reverse your own file edits one file at a time, after showing me the list, ask before deleting any file you created, and give me the better message to send next, since the failed attempts stay in the conversation.
## Stage 3: Save first, then hand me the exact words
For /clear:
1. Ask if I want to find this conversation again, and suggest a name of two or three words for me to accept or change.
2. Write the handoff note in the project folder as HANDOFF.md. IF HANDOFF.md already exists, read it first: if it is from a finished task, ask whether to replace it; otherwise write HANDOFF-[name].md, or HANDOFF-[today's date].md if I chose no name. IF the folder is a website or a git project, tell me the note could be published or committed with the rest, and offer to add it to .gitignore, and remind me to delete it before I publish. Use these headings:
- Goal: what we are trying to get done, in one or two sentences.
- Where it stands: what is finished, what is half-done, and anything currently broken.
- Decisions so far: each decision with its reason.
- Files changed: each file and what changed in it.
- Rules I gave you in this chat: preferences and corrections I stated here that are not in CLAUDE.md, word for word.
- What worked: commands, settings or approaches that worked, written exactly.
- What failed: approaches that did not work, and why, so the next session does not retry them.
- Open questions: questions I actually raised and have not settled.
- Next step: the single next action. IF the session never made it clear, ask me for it before you write the note.
Use only what happened in this session. Write [NOT STATED] for anything you do not know. Never invent a decision, a file, a result or a question.
3. Read the note back, show it to me and ask "Anything to add or fix before you clear?" Wait, and apply any change. If I reply "not sure", go ahead as written.
4. IF a rule under "Rules I gave you in this chat" should apply to every session, ask whether to add it to CLAUDE.md now, and add it only if I say yes.
5. Give me two lines to copy, each in its own code block:
- The reset: /clear [name], or plain /clear if I chose no name.
- The first message for the new session. Use the first that fits:
- IF I am switching to something unrelated: my new task in one line, and nothing about the old one. The note stays in the folder for when I come back to it.
- IF this is the corrections case: a better first prompt. Start it with "Read [note file name], especially What failed." Then give the goal, the exact point my corrections kept coming back to, what not to try again, and how we will know it is done. Ask me what the corrections were about if the session does not make it clear.
- IF the Next step says [NOT STATED]: "Read [note file name] and ask me what to do first."
- Otherwise: "Read [note file name] and carry on from the Next step. Ask me if anything in it is unclear."
For /compact:
1. Offer to write the handoff note first, in case the summary drops something, and wait for my answer.
2. IF I stated rules in this chat that are not in CLAUDE.md, name them in the focus line and ask whether to add them to CLAUDE.md now.
3. Draft one focus line that names what the summary must keep: the goal, the decisions, the files in play and the next step. Keep it under 30 words.
4. Give me the full line to copy in a code block, for example: /compact keep the goal, the pricing table decisions, the two files we changed and the next step.
For rewind (including "Summarize from here"):
1. Tell me which message to pick: for undoing, the first message of mine that led to a bad reply; for "Summarize from here", the first message of the detour. Picking a message takes the session back to just before it and puts its text back in my prompt box. List my last five or so messages, a few words each, and mark the one to pick.
2. For undoing, tell me which option fits: "Restore code and conversation" to undo both, "Restore conversation" to keep the file changes, or "Restore code" to keep the conversation. If the menu shows only "Restore conversation", no file edits were tracked after that point.
3. For undoing, before I press anything, list what rewind will not put back: each terminal command, yours or mine typed with !, that moved, deleted, renamed or created files since that message (builds and installs included), and each file a helper agent edited. If this session was compacted since that message, say you cannot see that far back; write "none found" only when you can see the whole stretch. If the folder is a git project, offer to run git status so I can see every changed file.
4. For undoing, draft a better version of the message I am rewinding to, built from what went wrong, so I can paste it over the text the menu puts back. Put it in a code block.
## Stage 4: Check your work before you finish
Silently check:
1. You recommended exactly one reset, or none, and the first matching rule in Stage 2 agrees with my answers.
2. Any note exists, you read it back after writing it, and every line in it comes from this session or says [NOT STATED].
3. Every command and message I need to type is in its own code block, and you never said you would run a reset command yourself.
4. For rewind, you told me which message to pick and listed what rewind will not undo, or said you could not see that far back.
5. In the corrections case, the first message names the note and says what not to try again.
Then tell me in one or two lines the one thing you were least sure of. IF you recommended /clear, add: the old conversation stays in /resume, and until I exit Claude Code or resume a different session, it is also the top entry in the rewind menu.
How to use this skill
- Save it once. Copy the skill, then ask Claude Code: “Save what I paste next as SKILL.md in a folder called fresh-start inside .claude/skills in my home folder.” Paste it, and approve the file when Claude asks.
- Check it loaded. Type
/and look for fresh-start in the menu. If it is not there, type/reload-skills. - Run it when a session drags. Type
/fresh-start. It reads the session first, then asks what comes next, where you are working, and, if you are staying on the same job, how full/contextsays the session is. - Type what it gives you. If it writes HANDOFF.md, read it and fix anything wrong first, then copy the reset command and the first message for the new session.
What a run looks like
Four example runs:
- Moving on to a new job. In a made-up session building a pricing page, the user said the FAQ page was next. The skill picked
/clear, asked for the pricing page’s next step, wrote HANDOFF.md and read it back, then gave two lines to copy:/clear shop pricing pageand “Write the FAQ page.” - Corrected three times. The user had corrected Claude three times about a layout that broke on phones. The skill picked
/clearwith a new first message that opens “Read HANDOFF.md, especially What failed” and asks for a plan before any edit. - A wrong turn. Told the last few replies went wrong, it marked the message where the trouble started, said which rewind option to choose, checked for terminal changes rewind would not undo, and drafted a better version of that message to paste.
- A detour mid-job. In a session 71% full with a long detour, it picked rewind’s “Summarize from here” on the first message of the detour, which squeezes the detour into a summary and keeps the earlier messages word for word, and warned that the menu puts that message back in the prompt box.
Learn the rest one at a time
/insights writes a report on how you use Claude Code: what you work on, where you get stuck, and what to try. It reads up to 200 recent sessions on this computer, and the report uses your plan’s limit, per Anthropic’s costs page.
hintdeck, a free plugin by Pavel Sozonov (updated 13 October 2026), teaches one command at a time: type /tip and press Tab, and it draws a tip that fits what you are doing, each one checked against Anthropic’s docs.
Install it by typing /plugin marketplace add PavelSozonov/hintdeck, then /plugin install hintdeck@hintdeck as a second message. If /tip is not found, type /reload-plugins. The plugins guide covers how plugins work.
The honest bit
- Rewind has a blind spot. It puts back edits Claude made with its editing tools, but not changes from commands it ran in the terminal, such as moving or deleting files, and not most edits from helper agents, per Anthropic’s checkpointing page. Copy the folder, or save a git snapshot, before a big job.
- Plan mode is a strong request. Someone who works on Claude Code wrote on 25 September 2026 that “plan mode has always been a prompt”. Manual mode is the one that asks before every change.
- Work that runs while you are away keeps spending. Check
/usagethe first time you leave a/goalor/looprunning.
Try one in your next session
The next time a session starts to drag, type /fresh-start and let it pick the reset.
A few quick questions
How do I see every Claude Code command?
Type / on an empty prompt for the full menu, or /help for the list. Press ? on an empty prompt to see the keyboard shortcuts. Anthropic says not every command appears for every user, because it depends on your plan, your computer and where you run Claude Code. In the terminal, /powerup opens Anthropic's built-in lessons with short demos.