Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Locate Code?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/aliaksie-locate-code)
---
name: locate-code
description: Find scoped repository evidence with batched deterministic search and optional authorized extraction.
---
# Locate evidence efficiently
State the question and likely paths first. Search multiple related literal names in one bounded
pass rather than repeatedly loading files into the strongest model's context. With a shell,
run Craft's lookup before a plain text search. `<package-root>`: `../..` is the package root, relative to this skill's directory (`support\craft.cmd` on Windows).
```text
<package-root>/support/craft locate --root <project> --path src --term Dispatch --term receipt
```
A routing hint's `lookup.run` is this command ready to run; add the question. A hint's `answer` holds verified rows with complete coverage for its question: answer from them, and search only beyond that question. From the source checkout, use `npm run locate -- ...`.
For a structural question, ask it instead of a term: `--declaration <name>`, `--callers <name>`,
`--imports <target>`, `--section <heading>`, `--outline <document>`, `--mentions <name-or-path>`
(documents that link to a file or name it in code), `--decisions <title-word>` (decision records
with their status; `*` lists all) or `--key <dotted.key>` (where a JSON, TOML or YAML key is set),
with `--path` scopes as usual. When the project enables evidence, Craft answers from verified evidence and searches the
sources it does not cover literally; otherwise it searches literally. The first output line names
the route and any gaps. Treat "absent within this coverage" as absence; any other empty answer is
not. Names are matched exactly as spelled; a qualified name (`Type.method`, `module::fn`) matches
its last segment on any receiver. Text inside bodies or prose stays a `--term` search.
With a task already bound by `task-start`, pass the verified `--session` id to reuse
current packets; no per-lookup task JSON is needed. Without a binding, use explicit session
and task identities when known, or perform a bounded fresh lookup and report reuse unavailable.
Do not fabricate session identity or create a new task for each search.
Configure file, match and byte budgets for the
question. Inspect truncation, skipped files and searched scope before treating no match as absence.
Files listed after the match bound contain a term too; narrow `--path` or raise `--max-matches`
only when their lines matter.
Literal evidence does not by itself identify the authoritative implementation.
Follow the most relevant definition to its caller, boundary test or configuration as needed.
Reuse current repository maps and earlier cited results. An economical worker may classify bounded
matches when delegation is supported and authorized; give it the question, source revision and
small evidence set. Return locations, concise relevant excerpts, coverage and ambiguity. Keep
architecture, correctness and product decisions with the main reasoner; do not copy the full parent
conversation into a lookup task. Escalate only when evidence or interpretation requires it.
Keep lookup workers read-only: they do not need a worktree merely to search. Do not switch
branches, stage files or edit the shared checkout as part of retrieval. If implementation is
needed, return that finding to the task owner for a separately scoped writing assignment;
parallel writers use deliberate workspace isolation.
Apply the same approach to ADRs and architecture notes. Find the consumer's decision index
and locations first, batch-search identifiers and domain terms, then read relevant records.
For an idea with unfamiliar terminology, let an authorized economical worker rank a bounded
candidate set with citations and uncertainty. The main task reads the candidates, checks status
and supersession, and decides applicability. Neither a literal miss nor a model ranking proves
that no decision exists; preserve coverage limits in the handoff.