Founding launch - the 3-module starter stack is $19 for the first 100 licenses, then $39

Claude Code Commands: The Interactive Guide for AI Builders

claude-code-course.md — Stage 1 of 7: Welcome to Claude Code
Stage 1 of 7

Welcome to Claude Code

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).

Free
To install & start
20+
Built-in commands
Custom commands you build
Stage 2 of 7

How Commands Work

How a command actually works

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.

Step 1
You type
A slash command, e.g. /compact
Step 2
Claude Code parses it
Built-in, custom, or subagent command?
Step 3
Runs the action
Tool call, your saved prompt, or a delegated agent
Step 4
Result lands in your terminal
Ready for the next step — no copy-pasting

The five command categories

Almost everything Claude Code can do falls into one of these five buckets. The first two are where most of the daily value is.

/

Session Management

Built-in commands that control context, cost, and model — /clear, /compact, /model, /cost.

Custom Commands

Markdown files in .claude/commands/ that become your own reusable slash commands.

Subagents & Automation

Delegate research or multi-step tasks to a subagent that works in the background and reports back.

Hooks & MCP

Wire Claude Code into your own scripts, linters, and external tools or data sources.

Skills

Packaged capabilities in .claude/skills/ — bundle a prompt with scripts and reference files, and Claude loads them by name when the task fits.

Stage 3 of 7

Built-in Commands

Built-in commands you'll use every day

These ship with Claude Code — no setup required. Tap "Copy" to grab one and try it in your next session.

CommandWhat it doesWhen 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
Plan Mode — your safety net

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.

Extended thinking

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.

See it in action

Click a tab below to see what each command actually looks like in your terminal.

claude — zsh
> /compact Compacting conversation history... Compacted 42,310 tokens → 3,800 tokens Context freed up — keep working in this session without losing the decisions you've already made.
> /model Current model: claude-sonnet-5 1. claude-fable-5 (most capable, higher cost) 2. claude-sonnet-5 (balanced — current) 3. claude-haiku-4-5 (fastest, lowest cost) Switch up for a gnarly bug, switch down for a simple, repetitive task.
> /code-review Loading .claude/commands/code-review.md... Reviewing changed files against your team's checklist (security, naming, tests) This is YOUR command — same prompt, same checklist, every single time.
Stage 4 of 7

Custom Commands

Custom commands: write once, reuse forever

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.

Level up with $ARGUMENTS

Drop $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.

Write
A markdown file
Describe the task once, in plain English
Becomes
A slash command
The filename is the command name
Reuse
Anytime, any project
Consistent results without re-typing the prompt
Stage 5 of 7

Subagents, Skills, Hooks & MCP

Subagents: delegate the boring (or huge) parts

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.

When a subagent is worth it
The task is read-heavy and would otherwise burn through your context — "find every place this function is used across the codebase" is a classic example. Or you want a second opinion that isn't biased by everything said so far in your conversation.
When to just do it yourself
Subagents start cold — no memory of your conversation. For a quick, two-line edit, handing it off and waiting for a report back is slower than just making the change directly.

Skills: reusable capabilities, not just prompts

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.

Memory: teach Claude your project once

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 & MCP: connecting Claude Code to your world

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.

  • Hook idea: automatically run your test suite after Claude edits a file
  • Hook idea: block any git push to main without an explicit confirmation
  • MCP idea: connect Claude Code to your CRM so it can look up client data while building an automation for them
Advanced — not day one

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."

Pro tip

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.

Stage 6 of 7

Get Started

Get started in 4 steps

1
Install Claude Code
Install it for your platform, then run claude inside any project folder to start a session.
2
Create a CLAUDE.md
Run /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.
3
Write your first custom command
Create .claude/commands/my-command.md with a prompt describing a task you repeat often. It instantly becomes /my-command.
4
Try a subagent on a research task
Ask Claude Code to "use a subagent to find every place X is used" and watch it delegate the search and come back with a summary.

Ready to build something that pays?

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 →
Stage 7 of 7

Knowledge Check

Seven questions covering the full guide. Click an answer for instant feedback.

Score: 0 / 0
1. What's the main reason builders use Claude Code instead of a regular AI chat window?
Claude Code works directly in your project — reading files, running commands, and editing code — so you stay in the terminal instead of bouncing to a chat tab.
2. When you type a command, what does Claude Code do first?
Every command follows the same loop: parse → run → return the result, all without leaving your terminal.
3. A long session is dragging and slowing down. Which command should you reach for?
/clear wipes everything and starts fresh. /compact summarizes the conversation — you keep the decisions made so far while freeing up tokens.
4. How does a markdown file in .claude/commands/ become a slash command?
Save code-review.md in .claude/commands/ and /code-review just works — same prompt, every project, every time.
5. When is handing a task off to a subagent probably NOT worth it?
Subagents start cold with no memory of your conversation — for a tiny edit, just making the change yourself is faster than handing it off and waiting for a report back.
6. What's the recommended way to start using hooks and MCP servers?
Hooks and MCP are powerful but advanced — most builders get more value nailing the daily basics first, then layering these on once a real workflow is established.
7. What does Plan Mode actually change about how Claude Code works?
Toggle it with 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.
0 / 7

Keep the momentum — grab the cheat-sheet

A free one-page printable cheat sheet with every command, Plan Mode, and Skills — opens instantly, no email needed.

Open the cheat-sheet →

You know the tool. Now build something that sells.

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 →