If you're building AI automations, bots, or digital products, there's a good chance you're already going back and forth with an AI chat window — typing prompts, copy-pasting code, switching tabs. Claude Code skips all of that. It's Anthropic's command-line AI assistant: it reads your project files, runs commands, and edits code directly, right in your terminal.
The real power isn't just chatting with it — it's the command system underneath. Built-in commands manage your session and cost. Custom commands let you write a prompt once and reuse it forever. Subagents delegate whole chunks of work in the background. Learn these and you'll move through builds noticeably faster — which matters a lot when speed is the whole business model (see our AI Automation Agency guide).
This guide also covers the workflow features that make Claude Code trustworthy enough to run unattended: Plan Mode (it proposes before it touches a file), checkpoints (instant undo if a change goes wrong), and Skills (packaged, reusable capabilities that go beyond a single saved prompt).
Every interaction follows the same loop — type a command, Claude Code figures out what kind it is, runs it, and hands the result back without you ever leaving the terminal.
/compactAlmost everything Claude Code can do falls into one of these five buckets. The first two are where most of the daily value is.
Built-in commands that control context, cost, and model — /clear, /compact, /model, /cost.
Markdown files in .claude/commands/ that become your own reusable slash commands.
Delegate research or multi-step tasks to a subagent that works in the background and reports back.
Wire Claude Code into your own scripts, linters, and external tools or data sources.
Packaged capabilities in .claude/skills/ — bundle a prompt with scripts and reference files, and Claude loads them by name when the task fits.
These ship with Claude Code — no setup required. Tap "Copy" to grab one and try it in your next session.
| Command | What it does | When to use it |
|---|---|---|
/clear |
Wipes the conversation and starts fresh | Switching to a completely unrelated task |
/compact |
Summarizes the conversation to free up context | Long sessions that are slowing down or hitting limits |
/model |
Switches between Claude models | A hard problem needs more power, or a simple one doesn't |
/cost |
Shows token usage and estimated cost for the session | Keeping an eye on spend during a long build |
/agents |
Lists and manages your available subagents | Checking what specialized agents you have configured |
/init |
Scans your project and writes a CLAUDE.md file describing it | The first time you run Claude Code in a new project |
/rewind |
Rolls files (and optionally the conversation) back to an earlier checkpoint | An edit broke something and you want an instant undo |
--resume |
Reopens a previous session with its full history | Picking a build back up after closing the terminal |
Not a slash command — a mode. Toggle it with Shift+Tab and Claude reads the codebase and proposes a step-by-step plan before touching a single file. You approve, tweak, or reject it first. Combined with checkpoints (every accepted edit is a /rewind-able snapshot), it's what makes handing Claude a big, messy task feel safe instead of risky.
Add "think hard" or "think harder" to a prompt (e.g. "think hard about why this race condition happens") to make Claude reason more deeply before answering. Save it for genuinely gnarly bugs and architecture calls — it's slower, so it's not the default for routine edits.
Click a tab below to see what each command actually looks like in your terminal.
A custom command is just a markdown file describing a prompt. Save it in .claude/commands/ inside your project (or ~/.claude/commands/ to make it available everywhere), and Claude Code turns the filename into a slash command automatically.
# .claude/commands/code-review.md
Review the files changed in this branch against our checklist:
- No hardcoded secrets or API keys
- New functions have a clear single purpose
- Error handling matches existing patterns in the file
- Tests exist for new logic
Summarize findings as a short bullet list, grouped by file.
Save that file, restart Claude Code, and /code-review is now a command — same checklist, every time, across every project where you drop the file in.
$ARGUMENTSDrop $ARGUMENTS into the file and whatever you type after the command name gets substituted in — turning a static prompt into a parameterized tool.
# .claude/commands/fix-issue.md
Find and fix issue #$ARGUMENTS in this repo:
1. Read the issue description and reproduce the bug
2. Fix it with the smallest reasonable change
3. Report what you changed and why
/fix-issue 482 now fixes issue #482 specifically — same command, any issue number, no editing the file each time.
A subagent is a separate Claude instance you can hand a task to — it works independently and reports back with a summary, instead of dumping its entire process into your main conversation.
A custom command is one prompt. A Skill is a small package — a folder in .claude/skills/ with instructions plus any scripts, templates, or reference files the task needs. Claude reads the list of available Skills and loads the right one automatically when a task matches, instead of you having to remember and type the exact command name.
Beyond the CLAUDE.md that /init writes, you can add a quick note mid-session by starting a line with # — Claude offers to save it straight to memory. Small habit, big payoff: the next session starts already knowing the conventions you'd otherwise re-explain every time.
Hooks let you run your own shell commands automatically at points in Claude Code's workflow — for example, auto-formatting a file after every edit, or blocking a commit that fails your linter. MCP (Model Context Protocol) servers go further, giving Claude Code new tools entirely — connecting it to Slack, a database, your project management tool, or any API you can wrap in a server.
Most builders don't need hooks or MCP servers in week one. But once your workflow is established, they're the difference between "Claude did something I didn't want" and "that's not possible — the hook would have stopped it."
The 80/20 of Claude Code: /clear between unrelated tasks, /compact when a long session drags, Plan Mode before any big or risky change, and one or two custom commands or Skills for whatever you do most — writing PR descriptions, running your test suite, reviewing code. That alone covers most of the daily value.
claude inside any project folder to start a session./init in your project. Claude Code reads your codebase and writes a CLAUDE.md describing how it works, so future sessions don't start from zero..claude/commands/my-command.md with a prompt describing a task you repeat often. It instantly becomes /my-command.This guide covered the command basics. The fastest way to put them to work is a paid module — a real system you build with Claude Code, brand, and sell. AI Automation Agency shows you which automations clients pay for and how to land the first one.
Get my plan →Seven questions covering the full guide. Click an answer for instant feedback.
/clear wipes everything and starts fresh. /compact summarizes the conversation — you keep the decisions made so far while freeing up tokens..claude/commands/ become a slash command?code-review.md in .claude/commands/ and /code-review just works — same prompt, every project, every time.Shift+Tab. Claude reads the code and lays out its plan first — you approve it before a single file changes, and every accepted edit becomes a /rewind-able checkpoint.A free one-page printable cheat sheet with every command, Plan Mode, and Skills — opens instantly, no email needed.
Open the cheat-sheet →You've got the commands down. AI Automation Agency is a full paid module — which automations clients actually pay for, what to charge, and how to land client #1 — built and run with the exact Claude Code workflow from this guide.
Get my plan →Want the full catalog first? Browse all modules →