context

A code-navigation command that returns a small, token-limited map of relevant symbols, files, callers, and modules from a code graph.

In plain words
What is it for?
Use it to explore a keyword or file location and retrieve a bounded subgraph in text or JSON form.
Why use it?
It helps an agent understand where code fits without repeatedly reading whole files, while still leaving the actual code reading to you or the agent.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/vyuh-labs/dxkit/context
Clone the repo
git clone --depth 1 https://github.com/vyuh-labs/dxkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,281 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01281
Opus 5 $0.00000 $0.00641
Sonnet 5 $0.00000 $0.00256
Haiku 4.5 $0.00000 $0.00128

Measured 2d ago against content hash bef0a694a36e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/context.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

vyuh-dxkit context

Run as: vyuh-dxkit <cmd> after npm install -g @vyuhlabs/dxkit, or npx @vyuhlabs/dxkit <cmd> for one-shot use. Examples on this page use the short form.

Hand a coding agent (or yourself) a slim, token-budgeted structural slice for a query — the relevant symbols, where they live, what calls them, and the module they belong to — read from the code graph at .dxkit/reports/graph.json. The point is to navigate by graph instead of repeated whole-file reads: the same orientation at a fraction of the tokens. It's a navigation aid, not a substitute for reading the code you're about to change.

Usage

vyuh-dxkit context <query>      [--budget N] [--depth N] [--substring] [--json]
vyuh-dxkit context <file:line>  [--budget N] [--json]

vyuh-dxkit context … is a top-level alias for vyuh-dxkit explore context …. The argument shape selects the mode: a path:line resolves to the location surface (below); anything else is a keyword query.

What it returns

A budget-bounded subgraph, breadth-first from the symbols matching the query:

  • Anchor — the highest-in-degree match ("if you read one thing, read this").
  • Selection — relevant symbols, seeds first, then their callers / callees, grouped by module. The walk stops once the running token estimate fills the budget, so the most relevant symbols survive truncation (reported honestly as "+N more").
  • Blast radius — how many distinct callers / caller files a change to the matched symbols would touch.

On no match it returns "did you mean" suggestions instead of an empty result.

Locating by file:line

vyuh-dxkit context src/payments/checkout.ts:142

Given a location, context returns the focused source chunk around that line — roughly the enclosing symbol rather than the whole file — plus its structural neighborhood:

  • Enclosing symbol — the declaration nearest at-or-above the line, with its in/out call counts. A heuristic: graph nodes carry only a declaration line (no end line), so the symbol boundary is declaration-to-next-declaration — confirm it before editing.
  • Source chunk — the actual lines, read from disk and line-numbered, carved to --budget and centered on the requested line (so the line you asked about is always shown, even when the symbol is larger than the budget). A Showing lines X–Y of the N-line span note appears when the budget truncated the window.
  • Module + blast radius — the community the file belongs to and how many caller files a change would touch (suppressed as n/a for languages whose call graph can't be resolved — never read a blank as "0 callers").
  • Callers / callees — the symbols that reach this one and the ones it calls out to.

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 119 lines · 0 tokens per session scan A bef0a694a36e

Subscribe to this mod's changes

context is a command published in the GitHub repository vyuh-labs/dxkit (10 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,281 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.