1.2 Verify Installation
Let's confirm Claude Code is working correctly and learn the basic commands you'll use throughout this program.
Your First Claude Code Session
Start an interactive session:
claude
You should see Claude Code initialize and present a prompt where you can type messages. Try a simple greeting:
Hello! Can you confirm you're working correctly?
Claude should respond conversationally. This confirms:
- Your API key is valid
- Network connectivity works
- Claude Code is properly installed
Type /exit or press Ctrl+C to end the session.
Essential Commands
Here are the commands you'll use most frequently:
Starting Claude Code
# Start in current directory
claude
# Start in a specific directory
claude /path/to/project
# Start with an initial prompt
claude "What files are in this directory?"
# Start in non-interactive mode (runs once and exits)
claude -p "List all JavaScript files"
In-Session Commands
While in a Claude Code session, these slash commands are available:
| Command | Description |
|---|---|
/help | Show available commands |
/clear | Start a new session with empty context — the previous session stays on disk and is resumable |
/compact | Summarize conversation to free context space |
/rewind | Undo to a specific point and compact from there |
/context | Visualize current context usage as a colored grid |
/status | Show session status and context usage |
/exit | Exit Claude Code |
/config | Open settings — model, theme, permission mode, and output style |
/model | Switch between Claude models |
/doctor | Diagnose installation and configuration issues |
/memory | View and manage persistent memories |
/review | Review recent changes |
/init | Bootstrap CLAUDE.md for a project |
/rename | Name the current conversation (alias: /name) so it's findable in /resume |
/color | Set the prompt bar color for this session |
/branch | Branch the conversation at this point into a separate session |
/resume | Resume a previous conversation |
Open /config and set Output style to Explanatory (or Learning). Claude then narrates why it chose an approach as it works, instead of just producing the result. When you're ramping on an unfamiliar codebase, language, or tool, this is the single highest-value setting in the product.
There is no separate /output-style command — output styles live under /config. Switch back to the default once the narration stops teaching you anything new.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+C | Cancel current operation or exit |
Ctrl+L | Clear screen |
Escape | Interrupt current generation |
Esc Esc | Same as /rewind — step back through conversation and code-modification history |
Shift+Tab | Cycle operational modes (Manual, Accept Edits, Plan, Auto) |
Shift+Enter | Insert a newline without sending |
Up/Down | Navigate command history |
Tab | Autocomplete file paths, skills, plugins, and slash commands |
Ctrl+A | Inside /resume: search sessions across all projects on this machine |
Shift+Enter only works after you run /terminal-setup once. In Apple's built-in Terminal the equivalent binding is Option+Enter. Claude Code tells you which one applies when you run the command.
The /compact, /rewind, and /context commands listed above are essential tools for keeping your AI agent sharp during long sessions. You'll learn exactly when and how to use them — along with /branch, /rename, and /resume — in Context Management Best Practices.
Verification Exercise: Hello Claude
Let's run a simple exercise to verify everything works. Create a temporary directory and test Claude's file operations:
mkdir -p ~/claude-test && cd ~/claude-test
claude
Notice that you cd into the directory before running claude. That matters: Claude Code creates and stores a session scoped to the working directory. Opening Claude here creates a ~/claude-test session that has nothing to do with sessions you start elsewhere.
You'll feel this the moment you run /resume — it lists only the sessions started in your current directory. Press Ctrl+A to widen the search to every project on the machine; if you then pick a session from somewhere else, Claude hands you a cd <path> && claude --resume <id> command instead of resuming in place.
This shapes how you organize your work. More on it in Session Management.
In the Claude session, try these prompts:
1. Create a file:
Create a file called hello.py with a simple Python script that prints "Hello from Claude Code!"
2. Read the file back:
Read hello.py and confirm its contents
3. Run the script:
Run the Python script and show me the output
4. Clean up:
Delete hello.py
If all four steps complete successfully, your installation is working correctly.
Understanding Claude's Tools
Claude Code has access to several built-in tools:
| Tool | Purpose |
|---|---|
| Read | Read file contents |
| Write | Create or overwrite files |
| Edit | Make targeted changes to existing files |
| Bash | Execute shell commands |
| Glob | Find files matching patterns |
| Grep | Search file contents |
| Task | Launch specialized sub-agents |
You don't need to memorize these — Claude uses them automatically based on your requests. But understanding they exist helps you phrase requests effectively.
Starting in Claude Code v2.1.117, native macOS and Linux builds (which most of us run at Liatrio) replace the separate Glob and Grep tools with embedded bfs and ugrep binaries that run through the Bash tool — the same searches, just without a separate tool round-trip. On these builds you'll see Claude reach for Bash to find files and search contents rather than calling Glob or Grep directly. Windows and npm-installed builds are unchanged and still expose Glob and Grep as first-class tools, so if you want them back, install Claude Code via npm.
Either way, you don't do anything differently — Claude picks the right search method for your platform automatically.
Check Model Access
Verify you have access to the models you'll use:
claude "What model are you currently using?"
For this program, we primarily use:
- Claude Opus (latest version) — Anthropic's most advanced model, ideal for complex reasoning, high-level planning, and long-horizon tasks
- Claude Sonnet (latest version) — Excellent for most development tasks, offering a good mix of speed and intelligence
Troubleshooting Verification
Claude doesn't respond
- Check your internet connection
- Verify your API key is valid at console.anthropic.com
- Check for service status at status.anthropic.com
"Permission denied" when creating files
- Ensure you have write permissions in the current directory
- Try running in a directory you own (like
~/projects)
Commands run slowly
- Large context windows take longer to process
- Start fresh sessions for new tasks to avoid context buildup
- Check your network latency to Anthropic's API
Configure Your Status Line
Claude Code can display a customizable status line at the bottom of your terminal — a live bar that runs any shell script you configure. It receives JSON session data and can show things like your current model, context window usage, session costs, git branch, and more. See the full list of available properties for everything you can display. Setting this up now gives you useful session telemetry from day one.
Run the /statusline Command
The /statusline slash command generates a status line script and configures it for you automatically. Start a Claude Code session and run /statusline with a prompt describing what you want to see. Here's a sample prompt to get you started:
/statusline I would like a multi-line status line with emojis for a fun, colorful feel.
Line 1: Current model (🤖), a color-coded context meter showing tokens used (📊, from context_window.total_input_tokens plus total_output_tokens — green below 80k, yellow 80k–120k, red above 120k), and total session duration in human-readable format like 2m 34s or 1h 2m (⏱️).
Line 2: Current directory (shortened — strip everything up to and including /repos/ from the path) and git branch. Use 📂 before the directory and 🌿 before the branch.
Use ANSI colors throughout. The script should be POSIX /bin/sh compatible and read JSON from stdin.
Claude will generate a shell script, save it to ~/.claude/, and update your settings — all in one step. Experiment with different prompts to make it your own!
Why tokens instead of a percent? Research shows model quality degrades with the absolute number of tokens in context — most models are substantially degraded near ~100K tokens whether their window is 200K or 1M — so a percent gauge means different things on different models. You'll learn the full story in 1.7 Context Management and the Context Internals appendix.
Verify the Status Line
Claude should automatically reload its config to pick up your new status line, displaying it at the bottom of the terminal. If it doesn't appear, ask Claude to help troubleshoot — try something like "my status line isn't showing up, can you help me debug it?"
Clean Up Test Directory
Once verified, clean up the test directory:
cd ~
rm -rf ~/claude-test
Next Steps
With Claude Code verified and working, the next section walks you through installing the Spec-Driven Development workflow prompts that form the backbone of this program.