The argument in one line.
Claude Code's 20 slash commands manage context, permissions, memory, and model selection to solve the stateless nature of LLMs and reduce unnecessary token costs during development.
Read if. Skip if.
- You're new to Claude Code and have it installed but haven't yet explored what each of the 20+ slash commands actually do or when to use them.
- A developer who uses Claude Code regularly but treats commands like /clear, /memory, and /permissions as mysteries and wants to understand their mechanics and token implications.
- You're building a project in Claude Code and need to know how to structure conversations, manage context efficiently, and set up permissions or custom instructions without trial-and-error.
- You're already fluent in Claude Code commands and have internalized token economics — this is a command-by-command reference for people starting from scratch.
- You use Claude Code exclusively for simple one-off tasks and don't manage multi-turn conversations, custom instructions, or permission rules.
The full version, fast.
Claude Code ships twenty built-in slash commands, and knowing which ones matter is the difference between burning tokens and shipping focused work. Because LLMs are stateless, every follow-up message resends the entire chat history, so /clear should be run after each finished task to stop token costs from compounding, and /compact summarizes the conversation into a fresh window with optional custom instructions. /init scans your codebase and writes a CLAUDE.md that simulates persistent memory across sessions, while /memory layers project-wide rules with global user preferences and supports @-imports plus a # shortcut for quick adds. /permissions removes friction by allow-listing bash, read/edit, web fetch, and MCP rules with wildcards, but only allow tools you fully understand.
Chat with this breakdown — free.
Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.
Create a free account →Where the time goes.

01 · Intro + /bug
Promise stated. /bug: report directly to Anthropic; GitHub issues page shown with 1.5k open issues.

02 · /clear
Token cost compounding explained: message 2 costs 1500 tokens not 500. Live /clear demo shows context wiped.

03 · /compact
Auto-compact at 95% capacity. Custom summarization instructions demo. Ctrl+R to inspect summary.

04 · /config
All 6 settings: auto-compact, use-todo, verbose, theme, notifications, editor mode, model selector.

05 · /cost
API-only usage tracker. No output on Max/Pro plans.

06 · /doctor
npm permissions health check.

07 · /help
Full inline command list.

08 · /init
Scans codebase, generates CLAUDE.md. Acts as persistent project memory.

09 · /login
Two methods: subscription (Pro/Max) vs API (Console).

10 · /logout
Prints session summary: total cost, duration, model breakdown.

11 · /mcp
MCP as translator/interface layer. Postgres example. Anthropic docs walkthrough. No install demo.

12 · /memory
Three memory types (project, user, project-local deprecated). @-import syntax. # shortcut. Best practices: specific, structured, lean.

13 · /model
Default routing: Opus 4 until 20% session limit, then Sonnet 4. How to pin a specific model ID.

14 · /permissions
Four rule types: bash (exact + wildcard), read/edit, web fetch, MCP. Allow/deny/workspace tabs. Safety warning.

15 · /pr_comments /review /status /terminal-setup /vim + Outro
Rapid-fire final commands. /status shows account/memory/model. Comment CTA.
Lines worth screenshotting.
- The /clear command is the most important command in Claude Code — every follow-up message resends the entire conversation history, so clearing frequently prevents exponential token cost growth.
- Message two in a conversation does not cost the tokens of message two alone — it costs message one plus message two because the model is stateless and reprocesses the full history each time.
- The /compact command summarizes the conversation and starts fresh with that summary, preserving essential context while eliminating the token overhead of the full raw history.
- Custom compaction instructions — summarize only the last conversation, keep it under 500 words — let you control exactly what survives the compaction rather than accepting Claude's default.
- Claude Code auto-compacts at 95% context capacity, which is a safety net, not a strategy — proactive compaction with targeted instructions is consistently better than the auto-triggered version.
- The /memory command manages three types of memory: project-level, user-level, and global — each with different scope and lifetime relative to sessions and projects.
- The @ import syntax inside CLAUDE.md lets you pull external files into the memory context without embedding their contents directly, keeping the main file clean and composable.
- The /permissions command supports four rule types with wildcards, giving fine-grained control over what Claude Code is allowed to read, write, or execute on the file system.
- Finishing a task and immediately running /clear is the highest-leverage habit for reducing token costs — unrelated tasks accumulating in the same window is the primary source of expensive context.
- The /config command controls auto-compact behavior, which by default triggers at 95% — turning it off in favor of manual compaction with custom instructions gives more consistent results.
- The # shortcut for adding to memory mid-conversation lets you capture an important decision or preference without interrupting the flow of the current task.
- Understanding token compounding makes /clear feel urgent rather than optional — a 10-message conversation can cost five times what 10 separate single-message conversations would cost.
Own your Claude Code workflow from day one.
The commands most beginners never find - /compact with custom instructions, /memory @-import, and wildcard permissions - separate someone who fights Claude from someone who flows with it.
- Run /clear after every discrete task, not just when you hit the limit. Treat it like closing a browser tab.
- Use /compact with a specific instruction (summarize only the last task) rather than dumping the whole conversation.
- Build your CLAUDE.md with @-imports for modular instruction files - coding standards, commit message rules - keeps the root file lean.
- Use the # shortcut at the Claude prompt to add memories on the fly without opening the file.
- Set bash permissions for your most-used commands (npm run dev, npm run build) so you stop approving the same actions every session.
- The /logout session summary is your usage receipt - check it when debugging cost or model behavior.
Terms worth knowing.
- Claude Code
- Anthropic's command-line AI coding assistant that runs in a terminal and can autonomously read, edit, and run code files based on natural-language instructions.
- slash commands
- Special commands in Claude Code prefixed with a forward slash (e.g., /clear, /compact) that trigger built-in functions like clearing context, compacting conversation history, or managing settings.
- token
- The basic unit of text that language models process — roughly 3-4 characters or about 0.75 words — used to measure both the input sent to the AI and the output it generates, with cost billed per token.
- stateless (LLM)
- The property of large language models where each response is generated by reprocessing the entire conversation history from scratch — the model has no persistent memory between messages.
- context window
- The maximum amount of text a language model can process in one session — as a conversation grows longer, token costs compound because all prior messages are resent with each new message.
- /clear command
- A Claude Code command that wipes the entire current conversation history and starts a fresh session, stopping token costs from compounding across a long chat.
- /compact command
- A Claude Code command that compresses a long conversation into a concise summary, preserving essential context while reducing token count for the remainder of the session.
- /memory command
- A Claude Code command for managing persistent memory files that Claude can read across sessions — spanning project-level, global, and imported memories.
- @-import
- A syntax in Claude Code memory files that includes the content of another file by reference, allowing modular memory structures where one file pulls in another.
- /permissions command
- A Claude Code command for configuring which file paths and shell commands the AI is allowed to access or run, using wildcard rules to define security boundaries for autonomous operation.
- FastAPI
- A Python web framework for building APIs quickly, used here as the example codebase on which Claude Code commands are demonstrated.
Things they pointed at.
Lines you could clip.
“Message two actually costs a thousand five hundred tokens.”
“A good rule of thumb is to run it whenever you finish a task.”
“I have seen users with thousands of memory entries, and that usually ends up confusing both the user and the model.”
“Be very careful with permissions. Do not just copy someone elses permission rules unless you understand exactly what each command does.”
Word for word.
Don't just watch it. Burn it in.
See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.
The bait, then the rug-pull.
Every beginner who opens Claude Code for the first time stares at a terminal prompt and thinks: what do I even type? This 35-minute encyclopedic walkthrough covers every slash command in docs order, live demo included. The promise is on the thumbnail before you click.
Named ideas worth stealing.
Token Cost Compounding
Every message re-sends all prior messages. Use /clear after each discrete task.
Three Memory Types
- Project memory (./CLAUDE.md)
- User memory (~/.claude/CLAUDE.md)
- Project-local (deprecated)
Project = codebase rules. User = personal preferences across all projects. @-import keeps CLAUDE.md lean.
Four Permission Rule Types
- Bash (exact match or wildcard)
- Read/Edit (gitignore-aware)
- WebFetch (domain)
- MCP (server or tool)
Granular control over what Claude auto-runs. Wildcards supported.
How they asked for the click.
“If you have any questions or want me to cover something specific in a future video, feel free to drop a comment below.”
Low-pressure soft CTA, comment solicitation only. Leaves viewer wanting the MCP and memory deep-dives promised.

































































