Claude Code is Anthropic's terminal-based AI coding agent. You open a terminal, point it at your codebase, and it reads, writes, and runs code alongside you. No IDE plugin. No web UI. Just your terminal and a model that understands your project.
It's powerful out of the box. But the difference between "powerful" and "transformative" comes down to how you structure your project around it.
A recent discussion on r/ClaudeAI (124+ upvotes) surfaced a pattern: the developers getting the most out of Claude Code aren't writing better prompts. They're building better project infrastructure. CLAUDE.md files, reusable skills, MCP integrations, memory systems — small investments that compound into dramatically better sessions.
This guide synthesizes that community wisdom with our own experience. No Reddit recap. Just a practical, opinionated playbook for structuring Claude Code projects that actually work.
CLAUDE.md — Project Memory That Persists
Every time you start a Claude Code session, it looks for a file called CLAUDE.md in your project root and reads it automatically. No prompt needed. No copy-pasting. It just knows.
This is the single highest-leverage thing you can do with Claude Code. Full stop.
A good CLAUDE.md eliminates the "explain my project again" tax you pay every session. Your stack, your conventions, your preferences — all loaded before you type a single word.
Here's what a real one looks like:
# Project: MyApp
## Stack
- Runtime: Bun 1.x
- Framework: Hono
- Database: SQLite via Drizzle ORM
- Frontend: React + Vite
## Conventions
- Use Bun.serve, not Express
- Prefer const over let
- Error handling: Result type pattern, no try/catch for flow control
- Tests: describe/it blocks, no test utils that hide assertions
## Common Commands
- \`bun run dev\` — start dev server
- \`bun test\` — run tests
- \`bun run db:migrate\` — apply migrations
## Project Structure
src/
routes/ # API route handlers
services/ # Business logic
db/ # Schema + migrations
utils/ # Shared helpers
## Constraints
- No external HTTP calls in tests (use mocks)
- All DB queries go through service layer
- Keep route handlers thin — delegate to services
Notice what's in there. Not just coding conventions — tool preferences. "Use Bun.serve, not Express." "Prefer const over let." These are the directives that prevent Claude from defaulting to its training data assumptions.
The community insight that resonated most: putting tool preferences in CLAUDE.md was the biggest unlock. Claude defaults to what it's seen most of — Express, npm, let. Your CLAUDE.md overrides those defaults with what you actually use.
What Makes a Good CLAUDE.md vs a Mediocre One
Mediocre: A vague description of the project. "This is a web app built with modern tools."
Good: Specific, opinionated, actionable directives. Stack versions. Exact command names. Explicit "do this, not that" rules. Constraints that prevent common mistakes.
Think of it as onboarding documentation for a new team member who's brilliant but has never seen your codebase. You wouldn't tell them "we use JavaScript." You'd tell them "we use Bun 1.x, Hono for routing, and if you reach for Express I'll know you didn't read this doc."
The best CLAUDE.md files are living documents. Update them when you discover a new convention or hit a recurring issue. The five minutes you spend editing it saves hours of correction across future sessions.
Plan Mode Before Execution
Claude Code can just… go. Give it a task, and it'll start reading files, writing code, running commands. That's the default behavior, and for simple tasks, it works fine.
For anything touching more than two files, stop it. Use plan mode.
The workflow: describe your goal, ask Claude to break it into steps, review the plan, then approve execution. It feels slower. It is slower — by about 30 seconds. Those 30 seconds save you 10 minutes of undoing wrong assumptions.
Here's why this matters. Claude Code is fast and confident. It will happily refactor three files based on an assumption about your architecture that's slightly wrong. Without a plan, you don't catch the wrong assumption until you're staring at a diff that doesn't make sense.
With plan mode, you catch it before a single line changes.
> I need to add user authentication to the API routes.
> Before writing any code, outline your plan — which files you'll
> touch, what changes you'll make to each, and what assumptions
> you're making about the current auth setup.
Claude responds with a structured plan. You scan it. You spot that it's assuming session-based auth when you use JWTs. You correct it. Now the execution is clean.
This is the real difference between "vibe coding" and structured AI development. Vibe coding is letting the model run and hoping for the best. Structured development is treating the model as a collaborator that needs a brief before it starts working.
The pattern that works: plan by default, execute directly only for isolated, single-file changes where the scope is obvious.
Skills — Reusable Specialized Workers
Skills are Claude Code's mechanism for packaging reusable expertise. Each skill lives in its own folder with a SKILL.md file that contains full instructions, context, and CLI commands for a specific task type.
Think of skills as specialist team members. One skill handles code reviews. Another formats output for your documentation system. A third knows how to summarize data from your analytics pipeline. Each one has its own clean context — no cross-contamination between tasks.
A skill folder might look like:
skills/
code-review/
SKILL.md # Review criteria, severity levels, output format
api-scaffold/
SKILL.md # How to generate new API endpoints
db-migration/
SKILL.md # Migration naming, rollback rules, testing steps
The SKILL.md for a code review skill might specify:
# Code Review Skill
## Focus Areas
- Security: SQL injection, XSS, auth bypass
- Performance: N+1 queries, unnecessary re-renders
- Style: matches project conventions from CLAUDE.md
## Output Format
For each issue:
1. File and line number
2. Severity (critical/warning/nit)
3. What's wrong
4. Suggested fix
## Rules
- Never approve code that skips input validation
- Flag any direct DB queries outside the service layer
- Nits go last, never block on style alone
The community quote that stuck: "I have 30 skills and spend more time writing specs than actual code." That sounds like a joke, but it's the point. The time invested in clear skill definitions pays back every time that task runs. You're building institutional knowledge that doesn't evaporate between sessions.
Skills scale because they're composable. A complex workflow might chain three skills: analyze the codebase, generate a migration, then review the migration against your safety rules. Each step uses its own clean context with its own specialized instructions.
MCP — Tool Integration That Changes Everything
Model Context Protocol (MCP) is how Claude Code connects to external tools. GitHub, Notion, databases, deploy pipelines, local CLI scripts — instead of copy-pasting data between windows, Claude operates across your tools directly from the terminal.
The built-in MCP servers for filesystem and git are useful. But the real power comes from custom integrations tailored to your project.
Imagine this: instead of opening your monitoring dashboard, copying an error, pasting it into the terminal, and asking Claude to debug it — you just say "check the prod logs for errors in the last hour." MCP makes that a single step because Claude can query your logging API directly.
Setting up MCP servers requires some initial work. You configure them in your project's Claude Code settings, pointing to either hosted services or local scripts that expose data through the MCP protocol. The investment pays off fast for any tool you interact with more than twice a day.
Where MCP shines:
- GitHub integration — create PRs, review diffs, manage issues without leaving the terminal
- Database access — query staging data, check schema, validate migrations
- Deploy pipelines — trigger deployments, check status, roll back
- Project-specific APIs — anything your team built that has an API
The filesystem and git MCP servers ship ready to use. For everything else, check the MCP documentation and the growing ecosystem of community-built servers.
One word of caution: don't connect everything at once. Start with the one tool you context-switch to most often. Get that working smoothly. Then add the next one.
Memory Management — The Advanced Play
Claude Code sessions are stateless by default. Each session starts fresh. CLAUDE.md handles project-level memory, but what about session-level discoveries? The bug you just fixed. The workaround you found. The architectural decision you made and why.
Advanced users build memory systems that capture these automatically.
The pattern: split memory into separate files by purpose.
memory/
profile.md # Who you are, how you work
preferences.md # Style choices, tool preferences
decisions.md # Architectural decisions and rationale
sessions/
2025-02-19.md # What happened today
The critical instruction that makes this work: "DO NOT ASK. Just update the files when you learn something."
Without this, Claude will politely ask "Would you like me to save this to memory?" every time it discovers something. That breaks flow. With the instruction, it silently records fixes, workarounds, and discoveries as they happen.
The most sophisticated setups use hooks — scripts that run after Claude completes a task. These hooks scan Claude's output for keywords like "fixed," "workaround," "gotcha," or "discovered" and automatically prompt for a memory update.
## Memory Rules (add to CLAUDE.md)
- When you discover a fix or workaround, update memory/decisions.md
- When you learn something about the codebase, update memory/sessions/today.md
- Never ask permission to update memory files. Just do it.
- At session end, summarize key learnings in the session file
This turns Claude Code from a tool that helps you today into a system that gets smarter over time. Each session's discoveries persist into the next one. The compound effect is real — after a few weeks, your memory files contain a rich knowledge base of project-specific insights that no documentation would ever capture.
The Mindset Shift
Everything above — CLAUDE.md, plan mode, skills, MCP, memory — shares a common thread. You're not writing better prompts. You're designing better systems.
Claude Code works best when you build small, composable infrastructure around it. A CLAUDE.md that sets context. Skills that package expertise. MCP connections that eliminate copy-paste. Memory files that persist learning.
Each piece is simple on its own. Together, they compound. Your tenth session with this infrastructure is dramatically more productive than your first, because every piece makes every future session better.
The shift in thinking: stop treating AI coding tools as chatbots you give instructions to. Start treating them as team members you build workflows around. You wouldn't onboard a new developer by just talking to them — you'd give them documentation, access to tools, coding standards, and a clear process. Claude Code deserves the same investment.
Build the infrastructure once. Reuse it forever. That's the real unlock.
Getting Started — Your First 30 Minutes
If you're new to Claude Code, start here with the official docs. Install it, run it against a project, get a feel for the basics.
Then do this:
- Create a CLAUDE.md in your project root. Start with stack, conventions, and common commands. Five minutes.
- Use plan mode on your next multi-file task. Just add "outline your plan first" to your prompt. Zero setup.
- Create one skill for your most repeated task. Code review is a good first choice. Ten minutes.
- Add memory rules to your CLAUDE.md. The three-line version from the memory section above. Two minutes.
- Explore MCP when you're ready. Start with the tool you context-switch to most.
You don't need all of this on day one. Each piece works independently. Start with CLAUDE.md — it's the highest ROI investment — and layer the rest as your workflow demands it.
The developers getting the most out of Claude Code aren't the ones with the cleverest prompts. They're the ones who spent an afternoon building the scaffolding that makes every future session better.
Build the system. Trust the compound effect.
Inspired by a community discussion on r/ClaudeAI — credit to everyone who shared their workflows and kept it practical.
Compiled by AI. Proofread by caffeine. ☕