Guides which code-search tools to use and in what order when finding definitions, understanding feature implementations, or exploring unfamiliar repositories.
Ships in sourcerer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
If you don't know which repo or ref (branch, tag, or version) to search, use your repo-discovery or ref-resolution skills first.
code.search - BM25 keyword/concept searchUse when you know what you're looking for but not where:
Returns the top-N highest-scoring lines. Default n=10; increase to 25-50 for broader coverage. Results are ranked by relevance, not by file or line order.
code.grep - regex searchUse when you know the exact identifier or pattern:
public.*interface.*Service, @Override)Returns all matching lines up to n. Default n=100; lower for focused lookups, raise if you expect many matches. Results are in file/line order.
files.ls and files.tree - file and directory listingsUse to orient yourself or confirm a path before reading:
src/main/java/org/elasticsearch/*/)Supports * (one path segment) and ** (recursive) glob patterns. A bare * lists the top level.
files.cat - full file contentsUse for small, complete files where you need all the context:
file_path insteadReturns the entire file; no line limit.
files.head - first N lines of a fileUse when the top of the file is sufficient:
Default n=10; increase for longer preambles.
files.tail - last N lines of a fileUse when the bottom of the file is what matters:
Default n=10.
files.wc - count lines in file(s)Use to verify file sizes before deciding how to read files:
files.cat on large files. Prefer files.head, files.tail, or files.read_lines to save tokens.Pattern 1 - concept → file → definition:
code.search on the concept to identify candidate filesfiles.ls on a promising directory to confirm the layoutcode.grep with a specific symbol pattern (e.g. .*class CircuitBreaker.*) to find the definitionfiles.cat or files.head for surrounding contextPattern 2 - known symbol → definition:
code.grep with an anchored regex scoped to ** or a known subdirectoryfiles.cat the file or widen the grep patternPattern 3 - explore unfamiliar repo:
files.ls at * to see the top-level structurefiles.ls into the relevant subdirectoryfiles.head on key files (entry points, primary config)code.search or code.grep to locate the specific featurefile_pathAll content tools accept a file_path glob. Narrowing it cuts noise and speeds results:
**/*.java - all Java filessrc/main/** - source tree only, excluding testssrc/main/java/org/elasticsearch/index/** - one subsystemconfig/elasticsearch.yml - a specific file (exact match)A bare * matches a single path segment, so it lists only top-level files (no / in the path). Use ** to recurse.
When you read to cite a specific line or range, follow each tool's own citation guidance in its description, and see the code-citations skill for the full rules:
code.grep / code.search return one row per line, each with an authoritative line.number - cite single lines and never merge separate rows into a range.files.cat / files.head / files.tail / files.read_lines prefix each returned line with its 1-indexed number by default (grep -n style, <line>:<content>) - read the number off the first and last lines to cite a range. Pass show_line_numbers=false when you want raw, unprefixed text.When two searches are independent, issue them in the same turn. For example, grep for a class definition and search for its concept simultaneously, then synthesize the results.
What SKILL.md sets; muted values are Claude Code's defaults
/sourcerer:code-searchfrom sourcerer
npx claudepluginhub elastic/sourcerer --plugin sourcerer5 skills in this plugin
/code-citationsUse whenever an answer names a code symbol, class, function, config key, endpoint, file, directory, or file extension - or makes any checkable claim about repository behavior (a default value, a version, a recall/latency figure, a behavioral guarantee). This is nearly every substantive answer this agent produces, so treat it as the default path, not an edge case reserved for explicit "cite your sources" requests./subagent-orchestrationUse when a request decomposes into multiple independent subtasks that can be worked on separately and combined afterward./ref-resolutionUse any time a branch, tag, or version in the user's question is ambiguous or unspecified - whether at the start of a question or mid-conversation (e.g. when comparing behavior across versions).Other plugins' skills for the same job