$ recombobulate _
home / tips / ask-claude-to-map-out-an-unfamiliar-codebase
1

Ask Claude to Map Out an Unfamiliar Codebase

bagwaa @bagwaa · Mar 25, 2026 · Prompting
ask-claude-to-map-out-an-unfamiliar-codebase

Start by pointing Claude at your project directory with a structured request:

@src/ Explore this directory and give me:
1. A summary of what this application does
2. The main entry points and how requests flow through the system
3. Which directories contain business logic vs infrastructure vs config
4. Any architectural patterns in use (e.g. CQRS, repositories, services)

Claude will scan the structure, read key files, and give you a mental model of the codebase in seconds. You can then ask targeted follow-up questions like "where would I add a new API endpoint?" or "which class handles authentication?"

This is especially useful when inheriting legacy projects where the original author has long since left. Once you have the map, ask Claude to highlight anything that looks fragile, inconsistent, or undocumented — you'll know where to tread carefully before you touch a thing.

For large monorepos, start with a single package or service directory rather than the entire repo to keep Claude's context focused.

Before you change a single line, let Claude build you the map.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Ask Claude to Scaffold New Features Using Your Existing Code Conventions

Before asking Claude to scaffold a new feature, point it at your existing code first — it will match your naming, structure, error handling, and test patterns exactly rather than defaulting to framework boilerplate.

bagwaa @bagwaa · 2 hours ago
0
Describe the Entire Feature in Plain English Before Claude Starts Building

Give Claude the full picture upfront before it writes any code, so it builds the right thing the first time with fewer correction rounds.

bagwaa @bagwaa · 3 hours ago
0
Pass Multiline Prompts to Claude Code with Shell HEREDOCs

Complex prompts are unreadable as escaped single-liners. Use shell HEREDOCs to write clean, structured prompts directly in your scripts.

bagwaa @bagwaa · 6 hours ago