@move-hoon/search-ladder
AOffload code search to deterministic tools instead of hand-grepping or reading whole files (P1). Climb the ladder lexical → structural → semantic, stopping at the first rung that answers. Use whenever locating symbols, call sites, definitions, or concepts in a repo.
Install
agr install @move-hoon/search-ladder --target claudeWrites 1 file into .claude/skills/, pinned to git-6b1fb1c8.
- .claude/skills/search-ladder/SKILL.md
Document
name: search-ladder description: Offload code search to deterministic tools instead of hand-grepping or reading whole files (P1). Climb the ladder lexical → structural → semantic, stopping at the first rung that answers. Use whenever locating symbols, call sites, definitions, or concepts in a repo.
Search Ladder Skill (P1)
Purpose
Never hand-grep, never read a whole file to "look around." Each search is one offloaded call whose result is file:line + ~2 lines (P0/P8). Climb only as far as needed.
The ladder (stop at first rung that answers)
- Lexical —
ripgrep(default). Exact strings, identifiers, regex.rg -n "createSession" --type ts | head -50 rg -n "TODO|FIXME" -g '!*.test.*' | head -50 - Structural — Probe (when code structure matters more than exact text).
probe search "auth middleware" ./src - Semantic —
mgrep— concept queries only, last resort (cost + noise).mgrep "where is rate limiting enforced" src/
Rules
- Pipe high-frequency searches to
| head— bounded output (P0). - Prefer structural search over regex when text is too brittle.
- Drop to semantic only when you cannot name the token — never as rung 1.
- Optional tools may be absent; fall back down the ladder (
probemissing →rg).
Need concrete recipes for a rung (regex flags, Probe queries, mgrep phrasing)? Read references/ladder.md.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-6b1fb1c82c802026-07-31