codebase-navigation
Codebase Navigation
Before modifying unfamiliar code, build a mental model.
Exploration strategy:
- Start with entry points:
main.py,__init__.py,index.ts,App.tsx. - Follow imports to understand dependency structure.
- Find the data model first — it shapes everything else.
- Read tests: they document expected behavior better than comments.
- 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.
More from aiming-lab/metaclaw
structured-step-by-step-reasoning
Use this skill for any problem that involves multiple steps, tradeoffs, or non-trivial logic. Think out loud before answering to improve accuracy and transparency. Apply whenever the answer is not immediately obvious.
12graceful-error-recovery
Use this skill when a tool call, command, or API request fails. Diagnose the root cause systematically before retrying or changing approach. Do not retry the same failing call without first understanding why it failed.
11uncertainty-acknowledgment
Use this skill when you are not sure about a fact, have outdated knowledge, or the question is contested. Explicitly communicate the level of confidence instead of asserting uncertain things as fact.
11avoid-hallucinating-specifics
Common mistake — stating specific facts (API endpoints, library versions, config options, function signatures) with false confidence when uncertain. Always flag uncertainty rather than guessing specifics.
11secure-code-review
Use this skill when reviewing or writing code that handles user input, authentication, file I/O, network requests, or database queries. Always check for common security vulnerabilities before considering the code complete.
10plan-before-multi-step-execution
Use this skill before executing a sequence of 3 or more steps, especially when steps are irreversible or depend on each other. Write out the plan and verify it before starting execution.
9