scope sketch
<symbol> [--json]
Compressed structural overview. Methods with caller counts, deps, type signatures. ~200 tokens instead of ~4,000.
use before: reading source or editing a class.
scope refs
<symbol> [--kind calls|imports|extends|...]
Every reference grouped by kind — instantiations, imports, type annotations, call sites — with file and line.
use before: changing a function signature.
scope callers
<symbol> [--depth 1-5]
Direct and transitive callers. At depth 1, shows who calls this. At depth 2+, shows the blast radius — which entry points are ultimately affected.
use before: any refactor that changes a public API.
scope find
"<intent>" [--kind function|class|method|...]
Semantic search by what code does, not what it's named. Local embeddings — no API key, works offline.
use when: navigating unfamiliar code by intent.
scope deps
<symbol> [--depth 1-3]
What does this symbol depend on? Direct imports, called functions, extended classes. Transitive with --depth.
use when: understanding what must exist first.
scope trace
<symbol> [--depth 1-3]
Show how requests reach a symbol. Traces the call graph backward from target to entry points. Use for debugging — see how a bug is triggered.
use when: checking if an internal change is safe.
scope flow
<start> <end> [--depth N] [--limit N]
Find call paths between any two symbols. Unlike trace (entry points to target), this traces forward from start to end through the call graph.
use when: understanding how two symbols are connected.
scope map
[--json]
Full repository overview in ~500-1000 tokens. Entry points, core symbols ranked by caller count, architecture layers. Start here for complex tasks.
use when: starting work on an unfamiliar codebase.
scope entrypoints
[--json]
List API controllers, workers, and event handlers. Symbols with zero incoming calls — the starting points for every request flow.
use when: understanding how requests enter the system.
scope index
[--full] [--watch]
Build or refresh the code index. Incremental by default. --full rebuilds from scratch. --watch auto re-indexes on file changes.
use: once on setup. --watch during development.
scope rdeps
<symbol> [--depth 1-3]
What depends on this symbol? Reverse dependency traversal. Know the blast radius before deleting or renaming anything.
use before: deleting or renaming a symbol.
scope diff
[--ref <git-ref>] [--json]
Cross-references git diff with the index. Shows which symbols live in changed files. Perfect for PR triage — know what was affected without reading diffs.
use when: reviewing a PR or checking what changed.
scope source
<symbol> [--json]
Print the full source of a symbol between its start and end lines. When you've found the right symbol via sketch or find and need the actual code.
use when: you need the real code after navigating.
scope similar
<symbol> [--limit N] [--json]
Find structurally similar symbols via FTS5. Seeded from the target's kind, name, and signature. Great for finding parallel implementations or duplicates.
use when: looking for patterns or duplicates.
scope summary
<symbol> [--json]
One-line overview: name, kind, location, signature, callers, deps. ~30 tokens. The fastest way to answer "what is this?" without a full sketch.
use when: quick check before deciding to sketch.
scope setup
[--preload] [--json]
One-command agent integration: init + index + CLAUDE.md + skill install. --preload bakes architecture into CLAUDE.md for 32% agent cost savings.
use: first time setting up scope in a project.
scope status
[--json]
Index health check. Symbol count, file count, last indexed time, stale files. Know if your index is fresh before range-based edits.
use when: checking if the index is stale.