
What Claude Code provides for multi-file projects
Claude Code can:- Inspect the current working directory and list files and folders.
- Produce a project-level summary (entry points, route structure, DB layer, where business logic lives).
- Identify which files need changing for a cross-file task (for example, migrating a database driver).
- Execute or propose targeted refactors while respecting file-level constraints.
- Verify that intended changes were applied to the correct files.
Launching Claude Code from a project directory
Example of starting Claude Code in a local repo:Show the file structure
Ask Claude Code to show the repository layout. Example output:Project-level summary (condensed)
Claude Code can turn a file listing into an actionable summary. The following table captures the information from the example project:
High-level architecture:
- Route-controller pattern: server.js mounts auth routes at /api/auth; auth router contains inline controllers (no separate controller layer).
- Database: PostgreSQL with the pg client, connection pooling, bcrypt for password hashing, and JWT for tokens.
- How are routes connected to controllers?
- What database driver and pooling strategy are in use?
Example workflow: migrating PostgreSQL → MariaDB
When planning a migration (for example PostgreSQL → MariaDB), Claude Code lists affected files and the exact types of changes required. Files likely to need direct modification:
Schema-level adjustments to review:
- SERIAL PRIMARY KEY → AUTO_INCREMENT PRIMARY KEY
- Remove or replace
\cdatabase commands (useUSE dbnameor omit) - Review timestamp defaults, UUID usage, and any Postgres-specific data types
- .env: change default port (MariaDB usually 3306 vs Postgres 5432) and driver-specific connection variables.
Existing PostgreSQL connection pool (example)
Here is the typical pattern you might find in config/database.js when using Postgres. This is the code you would replace when migrating to MariaDB:Parameterized queries separate values from SQL, improving safety. Placeholder syntax differs between drivers — Postgres uses 2, …; many MySQL/MariaDB clients use
? or named placeholders. Update your query placeholders and any client-specific methods when switching drivers.File-level instructions and safety controls
Claude Code accepts precise file-level instructions:- Tell it exactly which files it may modify (e.g., only auth-related files).
- Or explicitly list files that must not be changed; Claude will warn if a requested modification would require touching those files.
- Provide contextual information about how files relate (for example: “server.js mounts the routers; auth logic lives in routes/auth.js”).
- Limit the list of files you paste — Claude Code already knows the repository layout and can focus on the relevant files.
Verifying refactors
After a refactor, ask Claude Code to:- Confirm which files were modified.
- Show diffs or summarize the applied changes.
- Run static checks (lint/test) or provide commands to run tests locally.
Do’s and don’ts
Summary
Claude Code helps you navigate multi-file projects by:- Mapping file structure and relationships,
- Summarizing architecture and responsibilities,
- Proposing and implementing targeted cross-file refactors (like DB migrations),
- Respecting file-level constraints, and
- Verifying the results.