# Codebase Navigation

> Use this skill when exploring an unfamiliar codebase, tracing code paths, or answering questions about how the system works. Read before writing, and build a mental model of the architecture before making changes.

- Skill: `gabrielmoreira/codebase-navigation` (Agent Skill)
- Install (CLI): `npx skillmds@latest add gabrielmoreira/codebase-navigation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/gabrielmoreira/codebase-navigation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: gabrielmoreira (https://skillmd.com/u/gabrielmoreira)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/gabrielmoreira/codebase-navigation

---


# Codebase Navigation

Before modifying unfamiliar code, build a mental model.

**Exploration strategy:**
1. Start with entry points: `main.py`, `__init__.py`, `index.ts`, `App.tsx`.
2. Follow imports to understand dependency structure.
3. Find the data model first — it shapes everything else.
4. Read tests: they document expected behavior better than comments.
5. Check git log: recent commits explain *why* things are the way they are.

**Efficient search:**
- Use file pattern search (glob) to find files by name/extension.
- Use content search (grep) to find where a function/class is defined vs. called.
- Search for the error message text to find the source location directly.

**Anti-patterns:**
- Modifying code without reading it first.
- Assuming file structure from another codebase.
- Grepping without a clear hypothesis of what you are looking for.

