My Claude Code Workflow for Real Projects
After months of using Claude Code as my primary coding tool, here is the workflow that stuck.
Setup
Claude Code runs in the terminal. No IDE plugin, no web UI, just your shell:
npm install -g @anthropic-ai/claude-code
claude
It reads your codebase, understands context, and can edit files directly.
The CLAUDE.md File
Every project gets a CLAUDE.md at the root. This is Claude Code’s persistent memory:
# Project Context
## Stack
- Go 1.22, Chi router, PostgreSQL 16
- Frontend: React 19, TypeScript, Tailwind
## Conventions
- Use structured logging (slog)
- Errors wrap with fmt.Errorf("operation: %w", err)
- Tests use testify/assert
- API responses follow JSON:API spec
## Commands
- Build: make build
- Test: make test
- Lint: make lint
This saves you from repeating context in every conversation.
Daily Patterns
1. Explore Before Editing
Start sessions by asking Claude Code to read relevant files:
> Read the auth middleware and explain how JWT validation works
Then make targeted changes:
> Add rate limiting to the auth middleware, 100 requests per minute per IP
2. Test-Driven Prompts
Write the test first, then let Claude Code implement:
> Here is the test I want to pass: [paste test]
> Implement the function to make this test pass
3. Code Review Mode
Point it at a diff:
> Review the changes in git diff HEAD~3 for bugs and security issues
4. Refactoring Confidence
Large refactors with a safety net:
> Refactor the user service to use the repository pattern.
> Run tests after each file change to make sure nothing breaks.
What Works Well
- Multi-file changes: Claude Code handles cross-file refactors naturally
- Understanding existing code: It reads your entire codebase, not just the current file
- Running commands: It can run tests, builds, and verify its own changes
- Git awareness: It understands your commit history and branch state
What to Watch Out For
- Over-engineering: It loves adding abstractions. Be explicit about keeping things simple.
- Hallucinated APIs: Verify library function signatures, especially for newer packages.
- Context window: For very large codebases, point it to specific directories.
My Prompt Style
Bad:
> Make the code better
Good:
> In src/api/handlers.go, the CreateUser handler doesn't validate
> email format. Add validation using net/mail.ParseAddress and
> return a 400 with a clear error message if invalid.
Specific prompts get specific results. Vague prompts get creative surprises.
Claude Code has replaced about 70% of my Stack Overflow visits and made me noticeably faster at unfamiliar codebases.