Claude Code: A Software Engineer’s Field Guide
I’ve spent the last few months living in Claude Code. If you’re wondering if it’s worth the hype, the answer is yes—but probably not for the reasons you think. It isn’t just a better autocomplete. It’s more like a competent pair programmer that actually reads your whole codebase, runs your terminal commands, and never needs a coffee break.
This is the guide I wanted when I started: a practical, no-fluff look at how to actually use it.
What Claude Code actually is
Claude Code is Anthropic’s CLI that lives in your terminal. Unlike a browser window where you’re constantly copy-pasting snippets, this has:
- Full filesystem access: It reads, writes, and searches your actual files.
- Shell execution: It runs your tests, build scripts, and linter.
- Deep context: It understands how your project is wired together, not just the file you have open.
- Agentic behavior: It can plan a five-step refactor and just… do it.
The mental shift: Stop treating it like a chatbot. Start treating it like an agent sharing your terminal.
Setup
npm install -g @anthropic-ai/claude-code
Run claude to authenticate. Once you’re through the OAuth flow, you’re in the REPL.
IDE Integration
Claude Code works with VS Code and JetBrains. If you use the extension, it runs in a side panel and automatically tracks which file you’re looking at. This is huge—it means Claude always knows your current “focus.”
The REPL: Your new home base
Launch it from your project root:
cd ~/projects/my-api
claude
Now you’re in an interactive session. Claude can see your files, run your tests, and check your git history.
How to talk to it
Ask about the architecture:
> How does auth work here?
Claude won’t give you a generic “JWTs are common” answer. It will find your auth.ts, see your Redis implementation, and explain your specific refresh token logic.
Request a change:
> Add rate limiting to /api/users using our Redis client.
It finds the endpoint, reads your Redis config, writes the middleware, and shows you a diff. You just hit ‘y’ to apply it.
Debug a failure:
> The tests are failing. Fix them.
It runs the suite, reads the stack trace, finds the bug, and patches it.
Slash commands that matter
| Command | What it does |
|---|---|
/help | The basics |
/compact | Squashes history to save on token costs |
/cost | See what you’ve spent this session |
/init | Crucial. Generates a CLAUDE.md for your project |
/memory | See what Claude “remembers” about your preferences |
Run /init immediately. It creates a CLAUDE.md file that acts as a “manual” for Claude. It’s where you store your project’s soul: its conventions, its quirks, and its build commands.
CLAUDE.md: The secret sauce
Think of CLAUDE.md as documentation written for an AI, not a human. Here’s a real-world example for a Node API:
# Project: Inventory API
## Architecture
- Express + Prisma (PostgreSQL)
- Redis for sessions
- JWT with rotation
## Conventions
- Logic lives in `/src/services/`, not controllers
- Use Prisma for everything—no raw SQL
- Throw `AppError` instances for global handling
## Commands
- `npm run dev` — start server
- `npm test` — run Jest
- `npm run db:migrate` — Prisma migrations
If you tell Claude “Prisma only,” it will never hallucinate a raw SQL query.
Permission modes
- Default: Claude asks before doing anything. Good for starting out.
- Auto-approve: You give it the green light for certain actions (like reading files). Speeds things up significantly.
- Plan mode: Claude writes a plan first. You approve the plan, then it executes. Best for big refactors.
Real-world workflows
1. Onboarding
Instead of reading source files for two hours, just ask: > Trace the path of a payment from the HTTP handler to the DB.
2. Feature work
Be specific: > Add pagination to GET /api/products. Use cursor-based (product ID). Follow the pattern in /api/orders. Claude copies your existing style perfectly.
3. Debugging
> This test is failing: [paste error]. Fix the rounding issue. It’s surprisingly good at spotting floating-point errors or off-by-one bugs.
4. Refactoring
> Extract the email logic from UserRepository into a new NotificationService. Update all callers. This is where it shines. It handles the tedious “find and replace” across 10 files and runs tests to make sure it didn’t break anything.
Headless mode
You can run Claude as a one-off command with -p:
# Find all TODOs
claude -p "List all TODOs with line numbers" --output-format json
# Generate a changelog
claude -p "Make a changelog from git commits since v2.0" > CHANGELOG.md
MCP: Connecting to the world
Model Context Protocol (MCP) lets Claude talk to your database, your Jira, or your Sentry. Once you add a server to ~/.claude/settings.json, you can ask: > What's the schema for the orders table? Are we missing any indexes?
Security
Claude has shell access. Don’t be reckless.
- Don’t run it in your home directory. Keep it scoped to the project.
- Use
.claudeignore. Block it from seeing.envfiles, SSH keys, or secrets. - Read the diffs. Before you hit ‘y’, actually look at the code it wrote.
My daily routine
- Morning:
claude -p "Summarize my git commits from yesterday"for standup. - Before PRs:
> Review my changes for security issues or missing error handling. - When stuck: I use it as a rubber duck. Explaining the problem to Claude often helps me find the fix myself.
Final thoughts
The engineers who love Claude Code aren’t the ones looking for a “magic button.” They’re the ones who treat it like a junior dev that happens to be incredibly fast.
You still need to know your codebase. You still need to review the code. But the distance between “I have an idea” and “it’s shipped” just got a whole lot shorter.
Docs: docs.anthropic.com/claude-code