Getting Started with Claude Code 4.8: A Practical Guide
Last week, I was staring down a migration I'd been putting off for months. Our API layer had organically grown into a tangled mess of inconsistent error handling, mixed authentication patterns, and about 40 endpoints that desperately needed to be refactored from Express to Fastify. I'd estimated three weeks of careful, tedious work. Then Claude Opus 4.8 dropped, and I figured I'd give Claude Code another serious shot at the problem.
What happened next genuinely surprised me. Claude Code with Opus 4.8 read the entire project structure in under 30 seconds, identified 12 files that needed changes, proposed a migration plan, and then—here's the part that caught me off guard—actually pushed back when my initial approach was flawed. I told it to start with the auth middleware, and it said, basically, "If we migrate auth first, the existing Express routes will break because they depend on the current middleware signature. We should start with the utility layer and work up." It was right.
That's when I realized this wasn't just an incremental update. This version actually has better judgment. Let me walk you through what I've learned setting it up and using it over the past week.
Installation and Setup
First things first: Claude Code runs in your terminal. Not in a browser, not in an IDE sidebar—in your actual terminal, where it can read your files, write code, and execute scripts. This is fundamental to understanding why it's useful.
npm install -g @anthropic-ai/claude-code
That's it for installation. Now you need to authenticate. Run claude in your terminal and it'll walk you through connecting your Anthropic account. You'll need a Max subscription or API access—Opus 4.8 isn't free, and for good reason.
Once you're authenticated, navigate to your project directory and run:
claude
You'll see a prompt that looks deceptively simple. Type your question or task, and off you go.
The CLAUDE.md File: Your Project's Context
Before you start asking Claude Code to do anything serious, create a CLAUDE.md file in your project root. This is probably the single most impactful thing you can do. Claude Code reads this file every time it starts, and it shapes everything about how the assistant approaches your codebase.
Here's what mine looks like for the API migration project:
# Project: Internal API Migration
## Stack
- Node.js 20, TypeScript 5.3
- Currently: Express 4.x → Migrating to: Fastify 5.x
- PostgreSQL via Knex.js
- Testing: Vitest
## Conventions
- All route handlers go in src/routes/
- Middleware in src/middleware/
- Use Zod for request validation
- Error responses follow { error: string, code: string, details?: any }
- Never use `any` type—use `unknown` and narrow
## Known Issues
- Auth middleware returns Express-specific response objects
- Some routes use req.params without validation (security risk)
- Tests are sparse in src/routes/billing/ — be careful changing those
## Working Preferences
- When proposing changes, show me the diff first
- Run tests after every significant change
- If something looks wrong in my plan, tell me before implementing
That last line turned out to be more important than I expected. Opus 4.8 actually takes it seriously. It caught two mistakes in my migration plan before writing a single line of code.
The New Dynamic Workflows Feature
This is the big addition in the 4.8 release, and it's worth understanding. Previous versions of Claude Code were great at small, well-scoped tasks: "refactor this function," "write a test for this module," "fix this bug." But when you gave it something large—like "migrate our entire API layer"—it would either get lost halfway through or produce a plan so vague it was useless.
Dynamic workflows let Claude Code break massive problems into phases, execute each one, verify the results, and then move on. It's not just generating a checklist—it's actually running the work, checking that tests pass, and adjusting when things break.
Here's how I kicked off the migration:
I need to migrate this Express API to Fastify. Start by reading the project
structure and proposing a phased migration plan. Don't write any code yet—
just give me the plan with specific files and the order we should tackle them.
Claude Code read through 47 files, mapped out the dependency graph, and proposed:
- Phase 1: Utility functions and shared types (no Express dependency)
- Phase 2: Validation layer (replace express-validator with Fastify schemas)
- Phase 3: Middleware (auth, logging, error handling)
- Phase 4: Route handlers, grouped by domain
- Phase 5: App bootstrap and server setup
- Phase 6: Remove Express dependency, verify everything
Each phase had specific files listed. I approved the plan, and then we just worked through it phase by phase. After each phase, Claude Code ran the test suite automatically and flagged anything that broke.
Effort Control: A Small But Important Feature
The 4.8 release also added effort control on claude.ai, and a similar concept applies in Claude Code. You can tell it how much work to put in. For quick questions—"what does this function do?"—you don't need it to go deep. For complex refactors, you want maximum effort.
In practice, I found that being explicit about effort in my prompts works well:
Quick question: what does the `validateSession` middleware return
when the token is expired?
Versus:
I need you to think carefully about this. The billing routes are
inconsistent about how they handle the case where a user's subscription
has lapsed mid-request. Some return 403, some return 402, and one
just passes through. Propose a consistent pattern and implement it
across all billing routes.
Opus 4.8 is smart enough to calibrate its effort based on the task, but being explicit saves tokens and time on the simple stuff.
Fast Mode: When Speed Matters More Than Depth
Opus 4.8 introduces a fast mode that runs at 2.5× the speed and is now three times cheaper than it was for previous models. I've been using it for straightforward tasks: writing boilerplate, generating test stubs, simple refactors. It's not the right choice for the complex migration work, but for the 60% of coding that's more mechanical than creative, it's a great option.
You can switch to fast mode in Claude Code by prefixing your prompt:
--fast Generate Vitest test stubs for every route handler in
src/routes/billing/. Just the describe blocks and test names—
I'll fill in the assertions.
This saved me real money over the week. The migration planning and tricky middleware work used full Opus. The test scaffolding and import reorganization used fast mode.
What I Got Wrong
A few things I stumbled on that might save you time:
Don't skip the CLAUDE.md. I tried working without it on a smaller project first, and Claude Code kept making assumptions about my stack that were wrong. It assumed Jest when I use Vitest, assumed CommonJS when I use ESM. The context file eliminates all of that.
It will make mistakes. Opus 4.8 is better about catching its own errors, but it's not perfect. During the migration, it once rewrote a middleware function to use Fastify's hook system but forgot that the function was also called directly in three places outside the request lifecycle. Tests caught it, but I should have caught it in code review. Review everything.
Large context doesn't mean infinite context. On a really big codebase (100+ files), Claude Code can lose track of earlier decisions. I found it helpful to periodically summarize what we'd decided and add it to the CLAUDE.md file so it stays grounded.
The "push back" feature is real but not infallible. Opus 4.8 pushed back on my bad ideas twice during the migration, which was great. But it also went along with two mediocre ideas that I later reconsidered. It's a better collaborator, not a perfect one.
Practical Tips After a Week of Use
Start with a read-only exploration. Before asking Claude Code to change anything, ask it to read the codebase and explain the architecture. This grounds its understanding and surfaces issues early.
Work in small commits. Even though dynamic workflows handle big tasks, I still commit after each phase. If something goes sideways, I can revert without losing everything.
Ask for diffs, not rewrites. When Claude Code wants to rewrite an entire file, I ask it to show me just the changes. It's easier to review and often reveals that the change is smaller than it initially seemed.
Use it for the tedious parts. The migration had about 40 route handlers that all needed the same mechanical transformation. Claude Code handled those in minutes. I spent my actual mental energy on the tricky auth middleware and the error handling patterns.
Run your existing tooling. Linters, type checkers, tests—run them all. Claude Code will run tests if you ask, but it doesn't automatically run your ESLint config or your TypeScript compiler. I added "run
tsc --noEmitafter changes" to my CLAUDE.md.
Honest Assessment
Claude Code with Opus 4.8 is a practical upgrade, not a magical reset. It looks strongest where Claude Code is already most valuable: long-running, multi-file tasks that require understanding dependencies and maintaining consistency across a codebase. The dynamic workflows feature transforms it from a fancy autocomplete into something that can actually tackle large projects.
But it's still a tool, not a colleague. It doesn't truly understand your business logic. It can follow patterns brilliantly, but it can't tell you whether a pattern makes sense for your users. The migration I described? Claude Code handled the mechanical transformation flawlessly. The design decisions—which errors to surface, how to structure the new middleware chain, what the API contract should look like—those were still mine.
My three-week migration estimate? It took four days with Claude Code. That's not because Claude Code wrote all the code. It's because it handled the tedious 70% and freed me to focus on the parts that actually require judgment.
If you're doing any kind of large-scale refactoring, migration, or codebase cleanup, Claude Code 4.8 is worth your time. Just remember: the better your CLAUDE.md and the clearer your instructions, the more you'll get out of it.