name: codemap description: Analyze codebase structure, dependencies, and changes. Use when user asks about project structure, where code is located, how files connect, what changed, or before starting any coding task. Provides instant architectural context.
Codemap
Codemap gives you instant architectural context about any codebase. Use it proactively before exploring or modifying code.
Commands
- •Discovery: Use
ls -R(recursive list) to map the directory structure. - •Dependencies: Read
pyproject.toml,requirements.txt, orpackage.json. - •Entry Points: Look for
main.py,app.py,wsgi.py, ormanage.py. - •Search: Use
SearchCodebasewith high-level terms (e.g., "auth", "database", "api") to find core modules.
When to Use
- •User asks "What does this project do?"
- •User asks "Where is X implemented?"
- •Before starting a complex task to understand impact.
- •To identify "hub" files (files imported by many others).
Output Interpretation
- •Structure: Directories and key files.
- •Dependencies: Key libraries and their purpose.
- •Flow: How data/control flows through the app.
Examples
User: "Explain the project structure." Agent:
- •Runs
ls -Rto get the tree. - •Reads config files.
- •Summarizes: "The project is a Django app with
coreandapiapps. Key dependencies are..."