searching-code
Installation
SKILL.md
Searching code
Find the files and line ranges that answer the brief's question and hand them back as links the caller can open. The caller reads the code itself; your deliverable is the map, not an essay.
The brief asks one of two things:
- Locate: where is X implemented, where is Y configured, every place Z is called. Return ranked locations.
- Trace: how does X work, what happens when Y. Return the flow step by step, each step with its location.
When the brief does not say which, locate.
Find every occurrence when the brief asks for all of them; otherwise stop at the first location that clearly answers. If the brief asks whether the code is correct, return the locations and say that a review needs the full files; searching does not read enough to judge.
Search
Use shell_command for all reading and searching, and always set workdir. Search within the workspace root unless the brief names another location.