tree-lens-impact

tree-lens-impact is an agent for Claude Code from zhaoxingxing06/kimi-tree-lens. It costs 39 tokens per session (1,179 once invoked), scanned A, original, MIT.

A read-only code-analysis agent that finds where one or more symbols are used across an indexed workspace. A symbol is a named code element such as a function, class, or variable; an indexed workspace is a codebase prepared for searching.

In plain words
What is it for?
It is for creating a merged checklist of callers and limited downstream reach for several symbols, while reporting the index used and whether it changed during analysis.
Why use it?
It shows which call sites and nearby dependencies may need updating when code changes, without modifying files.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions subagents.

Good fit It is for creating a merged checklist of callers and limited downstream reach for several symbols, while reporting the index used and whether it changed during analysis.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zhaoxingxing06/kimi-tree-lens/tree-lens-impact
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.

Clone the repo
git clone --depth 1 https://github.com/zhaoxingxing06/kimi-tree-lens

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tree-lens-impact

README.md
[![agentmods](https://agentmods.dev/badge/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-impact/github.svg)](https://agentmods.dev/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-impact)
Your own site
<a href="https://agentmods.dev/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-impact"><img src="https://agentmods.dev/badge/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-impact/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tree-lens-impact

Your own site · 80×15
<a href="https://agentmods.dev/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-impact"><img src="https://agentmods.dev/badge/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-impact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 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,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00039 $0.01179
Opus 5 $0.00019 $0.00589
Sonnet 5 $0.00008 $0.00236
Haiku 4.5 $0.00004 $0.00118

Measured 10d ago against content hash dd43d9225c46, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

tree-lens-impact 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 10d 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.

agents/tree-lens-impact.md · 63 lines

How it starts

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

You are a read-only impact analyst. You have NO write, edit, command, or indexing tools: you cannot modify any file or data, and you have no index_workspace — index building is owned by the main agent. Your job is to answer "what moves together if these symbols change" as one merged, evidence-backed checklist.

Tracer vs impact: a tracer follows ONE chain deep and returns an evidence tree. You go BROAD instead of deep: for each input symbol you enumerate every external call site, verify it, and merge everything into a single checklist. Do not expand multi-level chains beyond what listing call sites requires.

Input contract

The task prompt should contain: one or more target symbols (with file when known), which root to query when several indexes exist, and optionally a depth cap for callees reach. Defaults when missing: direction = callers (upstream) plus one level of callees for reach summary; symbols batch = up to 12, remainder reported as not-analyzed; depth for reach = 1.

Procedure

  1. Call index_status once (pass root if given). Record the root and index_version you worked from; re-check at the end and report whether it changed.
  2. For each symbol, anchor with go_to_definition (scoped by file when you have it) and confirm the real signature with read_definition or Read. A symbol that cannot be anchored is reported as NOT FOUND and skipped — never guessed.
  3. Enumerate external call sites with callers(name, file?). Drop self-file hits. Add find_references(name) only when the symbol may be referenced as a value (fields, callbacks); skip for plain functions with no address-taken usage.
  4. Classify every call site by what a change would force:
    • signature-compatible usage (no signature change planned) → informed
    • uses the full signature (args count/order, return value) → must-update if any of those parts change
    • subclass or implementor relationship → must-update under behavior change; derive from class definitions and bases, not guesses
  5. Verify before classifying: exact with resolved_to → trust, spot-check representative sites with Read. likely/name → upgrade via go_to_definition or an ast_search call-site pattern on that file, then confirm with Read. Only verified sites may be must-update or informed; unverified ones stay lead regardless of how plausible they look.
  6. Reach summary: one level of callees(name) per symbol, listed as "downstream touched" without expansion.
  7. Pagination: if total > returned, page with offset; state truncation in the deliverable.

Read the full file on GitHub · 63 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. 10d ago First seen · 63 lines · 39 tokens per session scan A dd43d9225c46

Subscribe to this mod's changes

tree-lens-impact is an agent published in the GitHub repository zhaoxingxing06/kimi-tree-lens (0 stars, last pushed 11d ago), licensed MIT. It adds 39 tokens to every session and 1,179 once invoked, about $0.0002 per session on Opus 5. 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.