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 | Clear conversation history |
/compact | Summarize conversation to free context space |
/rewind | Undo to a specific point and compact from there |
/status | Show session status and context usage |
/exit | Exit Claude Code |
/config | View or modify configuration |
/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 |
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+C | Cancel current operation or exit |
Ctrl+L | Clear screen |
Escape | Interrupt current generation |
Esc+Esc | Rewind — undo and compact from a checkpoint |
Shift+Tab | Insert newline without sending |
Up/Down | Navigate command history |
Tab | Autocomplete file paths |
The /compact and /rewind 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 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
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.
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 4.6 — Anthropic's most advanced model, ideal for complex reasoning, high-level planning, and long-horizon tasks
- Claude Sonnet 4.6 — 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 bar showing % context window usage (📊, green below 50%, yellow 50–79%, red 80%+), 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!
Verify the Status Line
Restart Claude Code and you should see your status bar 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.