Claude Code commands come in four kinds: terminal commands that start with claude, flags, slash commands typed in a session, and keyboard shortcuts. The official reference lists over 200 entries, but about 15 cover most marketing work: /init, /plan, /context, /compact, /clear, /rewind, /resume, plus Shift+Tab for permission modes.

You open the terminal, type claude, and a blinking prompt waits. You know it can audit a site, rewrite title tags or sort a search terms export, but the command list runs past a hundred entries and most of them are for software engineers. So you type a long prompt, the session fills up, the answers get vaguer, and by Thursday you are back in a chat window.

This cheat sheet fixes that. It covers the Claude Code commands a marketer actually needs in November 2026: the terminal commands, the flags, the slash commands, the permission modes and the keyboard shortcuts, each checked against Anthropic's official reference. If you would rather have Claude Code set up around your own SEO and Google Ads work, that is what my Claude consultant service does, and prices are published.

TL;DR

  • Claude Code has four kinds of command: terminal commands (claude ...), flags, slash commands typed inside a session, and keyboard shortcuts.
  • The official reference lists 121 slash command rows and 80 flags. You need about 15 commands to work well.
  • Learn /init, /plan, /context, /compact, /clear, /rewind and /resume first. They control planning, memory and undo.
  • Since version 2.1.283, interactive sessions start in auto mode, where a classifier approves or blocks each action. Shift+Tab switches modes.
  • For unattended jobs use claude -p with allow rules, /schedule for cloud runs, and decide permissions before you walk away.

What are Claude Code commands?

Short answer: Claude Code commands are the instructions you type to control Claude Code, Anthropic's coding agent that runs in a terminal, an editor or the desktop app. There are four kinds: terminal commands that start with claude, flags that change how a session starts, slash commands typed inside a session, and keyboard shortcuts.

The four kinds do different jobs. Terminal commands and flags decide how a session starts: which folder, which model, how much freedom. Slash commands steer a session that is already running. Shortcuts make the steering fast. Three typed prefixes complete the set: / opens the command menu, @ points Claude at a file, and ! runs a shell command and adds its output to the conversation, as the interactive mode reference lists them.

The reference is large. On 18 November 2026, when the newest release was Claude Code 2.1.327, the commands page listed 121 slash command rows, of which 20 are bundled skills (prompts that ship with the tool), and the CLI reference listed 80 flags. Most are for developers, cloud sessions or enterprise setups. The chart below shows the scale, and the green bar is the starter set this guide recommends.

Bar chart of the Claude Code reference on 18 November 2026: 121 slash command rows, 80 CLI flags, 35 CLI command rows, 22 general shortcuts, 6 permission modes, and a starter set of 15
Rows counted in Anthropic's official Claude Code docs on 18 November 2026. Counts change with each release.
KindWhere you type itExampleWhat it controls
Terminal commandYour shellclaude -cStart, resume, update
FlagAfter claude--model opusHow a session starts
Slash commandInside a session/compactA running session
ShortcutInside a sessionShift+TabSpeed and modes
PrefixStart of a message@ or !Files and shell

How do you install and start Claude Code?

Short answer: Install it with one command from Anthropic, run claude in your project folder and sign in through the browser. It needs a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Console account, because the free plan does not include Claude Code, according to the setup guide.

The native installer updates itself in the background. Homebrew and WinGet installs do not, so you run the upgrade yourself. After installing, claude --version confirms it works and claude doctor prints a read-only health check without starting a session.

# macOS, Linux or WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

# Check it, then start in your project folder
claude --version
claude doctor
cd ~/sites/my-site
claude
CommandWhat it doesWhen to use it
claudeStart a sessionEvery time
claude "query"Start with a first promptYou know the task
claude -cContinue the latest conversation hereNext morning
claude -r "name"Resume a session by name or IDAn older thread
claude -p "query"Answer once, then exitScripts, scheduled jobs
claude updateUpdate to the latest versionIf not auto-updating
claude doctorInstall and settings checkSomething feels off
claude auth loginSign in from the terminalNew machine
claude mcp addConnect an MCP serverNew tool or data source
Screenshot of the CLI commands table in the official Claude Code docs, showing claude, claude -p, claude -c, claude -r, claude update and claude auth commands
The CLI commands table in the official reference, code.claude.com, captured 18 November 2026.

Which CLI flags matter for marketers?

Short answer: About ten. -c and -r pick up earlier work, -n names a session, --model chooses the model, --permission-mode sets how much Claude may do alone, --add-dir adds a second folder, and -p with --output-format json turns Claude Code into a script you can schedule.

Flags go after claude when you start a session. A few only work in print mode (-p), where Claude answers once and exits with no interactive screen. That is the mode for scheduled reports and repeatable checks.

FlagWhat it doesMarketing use
-c, --continueLoad the latest conversation in this folderCarry on yesterday's audit
-r, --resumeResume by name or ID, or open a pickerReturn to one client thread
-n, --nameName the sessionOne name per job
--modelPick sonnet, opus, haiku or a full IDCheaper model for bulk tasks
--permission-modeStart in plan, auto, default and othersPlan first on a live site
--add-dirGive access to another folderExports folder next to the site
-p, --printAnswer once and exitWeekly checks
--output-format jsonJSON output, including costFeed a sheet or log
--max-turnsCap agent turns (print mode)Stop runaway jobs
--allowedToolsTools that run without askingRead-only reports

Two flags need care. --dangerously-skip-permissions skips every prompt, and the permission modes page says that mode is for isolated containers and virtual machines only. --max-budget-usd stops a print-mode run at an estimated spend, but the reference warns the estimate can differ from your bill and spend can pass the cap.

Which slash commands should you learn first?

Short answer: Fifteen cover most marketing work: /init, /memory, /plan, /model, /effort, /context, /compact, /clear, /btw, /rewind, /resume, /mcp, /permissions, /usage and /doctor. Type / on an empty prompt to see every command your plan and setup allow.

Anthropic's own commands page groups them by moment: first session, during a task, between sessions and when something is wrong. That order is a good way to learn them, because each group answers a question you will actually have.

Screenshot of the Commands across a typical workflow section in the Claude Code docs, grouping /init, /memory, /plan, /context, /compact, /clear, /resume and /rewind by stage
Anthropic groups commands by stage of a session. Commands page, captured 18 November 2026.
CommandWhat it doesUse it when
/initWrites a starter CLAUDE.mdFirst session in a folder
/memoryEdit CLAUDE.md and auto memoryRules keep being ignored
/planPlan mode: read and propose, no editsBefore any site change
/modelSwitch model, saved as defaultHeavy versus bulk work
/effortSet reasoning effort, low to maxHard problem or quick fix
/contextGrid of what fills the contextAnswers get vague
/compactSummarise the thread to free spaceLong task, same goal
/clearNew conversation, memory keptTask finished
/btwSide question, not added to historyQuick check mid-task
/rewindRoll back code, chat or bothA step went wrong
/resumeReopen an earlier conversationComing back to a job
/mcpManage connected MCP serversA tool will not connect
/permissionsAllow, ask and deny rulesToo many prompts
/usageCost, plan limits, activityBefore a big run
/doctorSetup checkup with fixesSomething is broken

A few behave differently from what their names suggest. /clear keeps your project memory (the CLAUDE.md file) and only empties the conversation; its aliases are /reset and /new. /model saves your pick as the default for new sessions unless you press s in the picker to switch for this session only. /cost and /stats are now aliases for /usage. And /agents no longer opens a manager: since version 2.1.198 it prints a reminder to ask Claude to create subagents (helper agents with their own context) or to edit the .claude/agents/ folder.

Your own commands are now skills. A folder with a SKILL.md file becomes a command you type, as the skills docs explain. My Claude slash commands cheat sheet for marketers covers building a marketing command set; this page stays with the built-in ones.

Animated diagram of six Claude Code commands in order: /init, /plan, /context, /compact, /rewind and /clear, each with what it does
Illustrative. One way to order the core commands across a single website or SEO task.

How do permission modes work, and which should you use?

Short answer: Permission modes set what Claude may do without asking. There are six: Manual (default), acceptEdits, plan, auto, dontAsk and bypassPermissions. Press Shift+Tab to cycle them. Use plan mode before touching a live site, and keep bypassPermissions for isolated containers.

The default changed this year. With version 2.1.283 or later, the permission modes page says auto mode is the built-in starting mode for interactive terminal and VS Code sessions. In auto mode a separate classifier model reviews each action: safe ones run, risky ones are blocked and Claude looks for another route. Anthropic's announcement of the new default says it caught more dangerous commands than manual review in its own testing. Your organisation can turn auto mode off, and it needs a supported model.

Screenshot of the Available modes table in the Claude Code docs listing default, acceptEdits, plan, auto, dontAsk and bypassPermissions with what runs without asking
What each mode allows without a prompt. Permission modes page, captured 18 November 2026.
ModeRuns without askingGood for
Manual (default)Reads onlyClient sites, first runs
acceptEditsReads, edits, mkdir, mv, cpDrafting pages you review
planReads, plus classifier-approved commandsAudits and change plans
autoEverything, with safety checksLong tasks on your own site
dontAskOnly pre-approved toolsLocked-down scripts
bypassPermissionsEverythingIsolated containers only
Animated mock-up of pressing Shift+Tab in Claude Code to cycle from Manual to Accept edits, Plan mode and Auto
Illustrative mock-up, not a screenshot. Shift+Tab cycles Manual, accept edits and plan, then auto and bypass where available.

One trap matters for anyone who starts Claude Code with bypass enabled. The docs say plan mode blocks edits until you approve the plan, except in interactive terminal sessions where bypass permissions are available. If you launch with --dangerously-skip-permissions or --allow-dangerously-skip-permissions, do not rely on plan mode as a safety net.

Which keyboard shortcuts save the most time?

Short answer: Learn six: Shift+Tab to change mode, Esc to stop Claude mid-step, Esc twice on an empty prompt to open the rewind menu, Ctrl+R to search past prompts, Ctrl+B to send a long job to the background, and Ctrl+J for a new line in any terminal.

ShortcutWhat it doesWhy it helps
Shift+TabCycle permission modesPlan, then build
EscInterrupt, keep work done so farRedirect without losing it
Esc EscRewind menu (empty prompt)Undo a bad step
Ctrl+CInterrupt, or clear inputSecond press exits
Ctrl+RSearch prompt historyReuse a good prompt
Ctrl+BBackground running tasksKeep typing during a crawl
Ctrl+OTranscript viewerSee every tool call
Ctrl+TShow or hide the task listTrack a long job
Ctrl+GEdit the prompt in your editorLong briefs
Ctrl+J or \ then EnterNew line in the promptMulti-line instructions
Option+P / Alt+PSwitch modelWithout losing the draft
Screenshot of the General controls keyboard shortcuts table in the Claude Code interactive mode docs
Part of the shortcuts table. Interactive mode page, captured 18 November 2026.

How do you keep context clean in long sessions?

Short answer: Check /context before a big task, run /compact with a short instruction when the thread gets long, and /clear when the task is done. Keep CLAUDE.md under about 200 lines, as the memory docs advise, and point at files with @ instead of pasting them.

The context window is everything Claude holds in mind at once: your prompts, its replies, the files it read and the tools connected. When it fills, answers drift. Claude Code compacts automatically near the limit, but a summary you steer is better than one it guesses. /compact accepts focus instructions:

/compact Keep the list of pages we changed, the title tag rules we agreed and the open questions. Drop the crawl output.

For a marketing project, CLAUDE.md is where the standing rules live: brand voice file, which folders hold exports, what Claude must never change. CLAUDE.md files can pull in other files with @path imports. A starting point:

# Project: example-site.com SEO
- Exports live in /exports (crawl, Search Console, Google Ads search terms).
- Brand voice: @docs/brand-voice.md
- Never edit /pages without showing a plan first.
- Reports go to /reports as CSV with one row per URL.
- British spelling. No prices in copy.

"Context Management in Claude Code" from Anthropic's official Claude channel, May 2026. A short official explainer; it links Anthropic's free course.

A longer walkthrough of the same habits is in Claude context window management, and the CLAUDE.md file for marketing covers what to put in that file.

How do you run Claude Code without watching it?

Short answer: Use claude -p for a one-off scripted run, /loop to repeat a prompt while a session stays open, /schedule for cloud scheduled tasks that run with your laptop closed, and /goal to keep Claude working until a condition is met. Decide permissions first, because nobody is there to answer a prompt.

This is where I have seen unattended work fail on my own site. Scheduled daily article runs for vickylalwani.net kept stopping on permission prompts with nobody at the keyboard. The workaround was to run each day's article as its own session with a self-contained brief file. The lesson is simpler: decide every permission before an unattended run starts.

The docs now give you the tools for that. Since version 2.1.302, a claude -p run with no permission mode set starts in Manual mode and denies anything that needs approval, unless an allow rule, a hook or auto mode covers it, per the permission modes page. The headless docs add --permission-prompts none so Claude is told nobody can approve and does not keep retrying.

claude -p "Read exports/crawl.csv. List URLs with a missing or duplicate title tag or meta description. Write reports/titles.csv with one row per URL. Change nothing else." \
  --allowedTools "Read,Edit" \
  --max-turns 10 \
  --output-format json
ToolStarts the next runRuns whereBest for
claude -pYou or a schedulerYour machineOne scripted check
/loop 1h ...A time intervalOpen session onlyWatching a deploy
/scheduleA schedule or eventAnthropic's cloudWeekly reports
/goal ...The last turn endingCurrent sessionFinish a fix list

The /goal page explains the difference from auto mode: auto mode approves tool calls inside one turn, while /goal adds a separate model that checks your condition after every turn and starts another turn if it is not met. Write the condition so it can be checked, such as "every URL in reports/titles.csv has a unique title under 60 characters".

For a full system of scheduled marketing jobs, see scheduled marketing automation.

Which Claude Code commands fit SEO and Google Ads work?

Short answer: Plan mode and @ file references do most of the SEO work: audits of crawl exports, title tags, schema and internal links. For Google Ads, claude -p runs on exported search terms and ad copy CSVs, and /mcp connects data sources. Keep changes to live ad accounts behind your own approval.

JobCommandsOutput
Title and meta audit/plan, @exports/crawl.csvCSV of fixes
Schema for service pages/plan, then acceptEditsJSON-LD per page
Internal link gaps@ sitemap and pagesLink list by page
Search terms reviewclaude -p on the exportNegative keyword list
Responsive search ad copy/btw for checks, skill for formatHeadlines CSV
Weekly report/schedule or claude -pOne-page summary

On a live ad account, a safe rule is: audit first, put the findings in a sheet, check them by hand, and change nothing until the account owner approves. Commands make the audit fast. They do not replace that review.

/plan Read @exports/search-terms.csv. Flag terms with cost and no conversions over the export period. Group them by theme, suggest negative keywords with match type, and write reports/negatives.csv. Do not touch any other file.

Worked examples: a Screaming Frog and Claude Code technical SEO audit, a one-folder Claude Code SEO workflow and ten Claude Code PPC workflows. If you want the SEO side done for you, see my SEO consultant service; for paid search, Google Ads management.

How should you learn the commands in one week?

Short answer: Spread it over five working days, one group a day, each on a real task. By Friday you will use about a dozen commands without thinking, which is enough for most marketing work.

DayLearnPractice task
1Install, claude doctor, /initCLAUDE.md for one site
2/plan, Shift+TabAudit one landing page
3@, /context, /compactCompare two exports
4/rewind, /resume, -cUndo and resume a draft
5/mcp, claude -pA scripted weekly check

What breaks, and how do you fix it?

Short answer: Most problems are setup, context or overlapping sessions. Run claude doctor or /doctor first, /context when answers degrade, /mcp reconnect all when a tool drops, and use Git for anything /rewind cannot undo.

SymptomLikely causeFix
command not foundInstall not on your PATHclaude doctor, reinstall
Answers get vagueContext full of old output/context, then /compact
A tool stopped workingMCP server dropped/mcp reconnect all
/rewind missed a changeBash changes not trackedUse Git
Job stalls overnightWaiting on a permission promptAllow rules, -p
Two sessions clashSame folder, same taskName sessions, one owner
Install asks for a passwordNeeds your own terminalRun it yourself

The last three rows come from my own site and setup work. Two Claude sessions given the same deploy request nearly shipped the same change twice; naming sessions with -n and giving one session ownership of deploys is the simple guard. An app installer run from a Claude session stopped at a system password prompt the session could not answer; run that kind of step in your own terminal. The checkpointing docs confirm the /rewind limit: a file changed only by shell commands is not tracked, and neither are edits from other sessions.

What people say on X and Reddit

Short answer: Users mostly lean on a handful of commands: /clear, /usage, /context, /rewind and /resume come up most. Anthropic's own posts stress auto mode, side questions and parallel work, with a clear note that auto mode reduces risk but does not remove it.

SourceDateTypeWhat it says
Claude on X24 Mar 2026VendorLaunches auto mode
Claude on X24 Mar 2026VendorRecommends isolated environments
A Claude Code team member10 Mar 2026Vendor staffIntroduces /btw
Claude on X14 Apr 2026VendorRoutines run in the cloud
ClaudeDevs on X14 Oct 2026VendorParallel tasks as nested sessions
r/ClaudeCode16 Nov 2026First-handTop two commands thread
r/ClaudeAI31 Oct 2026First-handWhich built-ins to adopt
r/ClaudeAI28 Jul 2026OpinionCommands versus plain language
r/ClaudeCode27 May 2026OpinionHooks, commands, skills

On X, the official Claude account announced auto mode in March as a middle path between approving everything and skipping permissions, and in a follow-up post said it reduces risk but does not eliminate it, recommending isolated environments. A member of the Claude Code team introduced /btw for side conversations while Claude works. The ClaudeDevs account explained that parallel tasks run as nested sessions that report back, which keeps the main thread readable.

On Reddit, a November r/ClaudeCode thread asking for people's top two commands drew /clear, /usage, /model and /effort, plus plenty of custom ones. In r/ClaudeAI, replies to a user who knew only /init, /clear and /compact recommended /context, /usage, /rewind and /resume, and one noted that a fresh context often beats a summarised one. A July r/ClaudeAI discussion put the case for commands well: plain language when you want the model's judgement, a command when you have already decided how.

Videos worth watching

Short answer: Start with Anthropic's own videos: a 30-minute talk on using Claude Code well and a short piece on how the team uses it. Independent tutorials are useful for walkthroughs, but check their commands against the current docs, because names change between releases.

"Mastering Claude Code in 30 minutes" from Anthropic's official channel, May 2025. Older than most of this guide, so some commands have changed; the habits still hold.

"How we Claude Code" from the official Claude channel, May 2026. Anthropic's own video about its own product.

VideoChannelDateCovers
Context Management in Claude CodeClaude (official)May 2026/context, /compact
Build a proactive agent workflowClaude (official)May 2026/schedule end to end
Mastering Claude Code in 30 minutesAnthropic (official)May 2025Core habits
How we Claude CodeClaude (official)May 2026Team workflows
Context Window ExplainedPrompt Vidya AINov 2026Auto-compact
Claude Code Tutorial #6: Slash CommandsNet NinjaAug 2025Custom commands (older)

Where this advice is weak

Short answer: Commands change fast, the starter set is my suggestion rather than a tested benchmark, and some details differ between Anthropic's own pages. Check the official reference before you script around any flag.

  • Claude Code ships often; 2.1.327 was the newest release when this was checked. A flag here can be renamed or removed by the time you read it, as /vim, /pr-comments and /ultraplan already were.
  • Anthropic's Help Center cheat sheet still says subagents are configured with /agents and lists /cost separately, while the commands reference now treats /agents as a reminder and /cost as an alias. This guide follows the reference.
  • Not every command shows for every user. Availability depends on plan, platform and admin settings.
  • Auto mode's safety claims come from Anthropic's own testing, not an independent study.
  • Usage and cost depend on your plan and how much context you load. Anthropic's cost page gives enterprise averages, which may not match a marketer's use.

Want Claude Code set up around your marketing work?

The commands are the easy part. The hard part is the folder structure, the CLAUDE.md rules, the permission settings and the scheduled checks that make Claude Code safe to run on a real site or ad account. I set that up as a Claude consultant, alongside SEO and Google Ads work, with published prices. If you are starting from scratch, building a website with Claude Code is a good first project.

Sources

SourceWhat it supportsDateLink
Claude Code CLI referenceCommands, 80 flags, print-mode limitsRead 18 Nov 2026code.claude.com
Claude Code commands121 rows, aliases, removed commandsRead 18 Nov 2026code.claude.com
Interactive modeShortcuts, @, !, /btwRead 18 Nov 2026code.claude.com
Permission modesSix modes, auto default, plan caveat, -pRead 18 Nov 2026code.claude.com
SetupInstall, plans, claude doctorRead 18 Nov 2026code.claude.com
MemoryCLAUDE.md, 200 lines, importsRead 18 Nov 2026code.claude.com
Headless--permission-prompts none, JSON outputRead 18 Nov 2026code.claude.com
Checkpointing/rewind limitsRead 18 Nov 2026code.claude.com
Goal/goal versus /loop and auto modeRead 18 Nov 2026code.claude.com
MCPclaude mcp add, scopesRead 18 Nov 2026code.claude.com
CostsUsage and cost trackingRead 18 Nov 2026code.claude.com
ChangelogVersion 2.1.32717 Nov 2026GitHub
Help Center cheat sheetOlder command wordingRead 18 Nov 2026support.claude.com
Claude blogAuto mode as default7 Aug 2026, updated 22 Octclaude.com
X and RedditUser and vendor viewsMar to Nov 2026Linked above

This article expands on my post on LinkedIn ↗.

FAQ

What are the most useful Claude Code commands?

For most marketers the core set is /init, /plan, /context, /compact, /clear, /rewind and /resume, plus Shift+Tab to change permission mode. Those cover planning, memory, context and undo. Add /mcp, /usage and /doctor once you connect tools.

How do I see all Claude Code commands?

Type / on an empty prompt inside Claude Code to open the command menu, then type letters to filter it. The full list, including flags, is in Anthropic's official commands and CLI reference pages, which listed 121 slash command rows and 80 flags in November 2026.

What is the difference between /clear and /compact in Claude Code?

/clear starts a new conversation with empty context but keeps your CLAUDE.md project memory. /compact keeps the same conversation and replaces the history with a summary, and it accepts instructions on what to keep. Use /compact mid-task and /clear when the task is done.

How do I undo a change in Claude Code?

Run /rewind, or press Esc twice on an empty prompt, to roll back code, conversation or both to an earlier checkpoint. It does not track files changed only by shell commands or by other sessions, so keep the project in Git as well.

What is plan mode in Claude Code?

Plan mode lets Claude read files and propose a plan without editing them, and edits stay blocked until you approve. Enter it with Shift+Tab, with /plan before a prompt, or with claude --permission-mode plan. It does not block edits in terminal sessions started with bypass permissions available.

Is auto mode the default in Claude Code?

Yes, from version 2.1.283 auto mode is the built-in starting mode for interactive terminal and VS Code sessions, according to Anthropic's docs. A classifier reviews each action and blocks risky ones. Your organisation can turn it off, and you can still pick another mode with Shift+Tab or a flag.

Can I use Claude Code on the free Claude plan?

No. Anthropic's setup guide says Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account, and the free plan does not include it. It can also run through cloud providers such as Amazon Bedrock.

How do I run Claude Code on a schedule?

Use /schedule to create cloud scheduled tasks that run on Anthropic's infrastructure, or call claude -p from your own scheduler. For unattended runs, set allow rules or a permission mode first, because a run with nobody present cannot answer permission prompts.