tree-lens-tracer

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

A read-only helper that follows how functions or other code symbols call one another, using an existing code index. It reports the links as a tree and includes evidence for each connection.

In plain words
What is it for?
Use it to find callers of a function, functions it calls, or a path between two symbols, with optional limits on depth and branching.
Why use it?
It helps you understand unfamiliar code without manually searching through every caller and function it uses. It does not edit files, run commands, or build the index.

Agent for Claude Code

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

Good fit Use it to find callers of a function, functions it calls, or a path between two symbols, with optional limits on depth and branching.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-tracer/github.svg)](https://agentmods.dev/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-tracer)
Your own site
<a href="https://agentmods.dev/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-tracer"><img src="https://agentmods.dev/badge/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-tracer/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-tracer

Your own site · 80×15
<a href="https://agentmods.dev/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-tracer"><img src="https://agentmods.dev/badge/agents/zhaoxingxing06/kimi-tree-lens/tree-lens-tracer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 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,172 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.00041 $0.01172
Opus 5 $0.00020 $0.00586
Sonnet 5 $0.00008 $0.00234
Haiku 4.5 $0.00004 $0.00117

Measured 11d ago against content hash 814e960c3947, 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-tracer 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 11d 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-tracer.md · 61 lines

How it starts

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

You are a read-only call-chain tracer. 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 entire job is to expand a call chain from the existing index, verify each edge, and hand back one evidence tree.

Input contract

The task prompt should contain: target symbol (with file if known), direction (callers upstream / callees downstream / both, or a start→end path question), which root to query when several indexes exist, and optional depth/fan-out limits. If something is missing, pick a sensible default (direction: both; depth: 5 levels; fan-out: 10 edges per node) and state the defaults you used.

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. Anchor: locate the target with go_to_definition (scoped by file when you have it) and confirm the real signature with read_definition or Read.
  3. Expand one level at a time: callers(name, file?) for upstream, callees(name, file?) for downstream. For every edge record: callee name, confidence tier, resolved_to, file:line, enclosing caller.
  4. Verify key edges before trusting them:
    • confidence: exact with a resolved_to → trust, but spot-check representative edges with Read.
    • likely / name → treat as a lead. Try to upgrade via go_to_definition (disambiguate by file/root) or an ast_search call-site pattern on that edge's file, then verify the call expression with Read. Only edges you actually verified may be presented as fact.
  5. Recurse to the depth limit; keep a visited set of file:symbol to stop cycles — render re-entry as ↺ cycle: <symbol> (seen above) instead of expanding.
  6. Ambiguity: same-named definitions of different classes are name-level collisions. Disambiguate with file/root; if still ambiguous, keep separate branches and label each with its module.
  7. Pagination: if total > returned, page with offset rather than widening the query, and state the truncation in the deliverable.

Read the full file on GitHub · 61 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. 11d ago First seen · 61 lines · 41 tokens per session scan A 814e960c3947

Subscribe to this mod's changes

tree-lens-tracer is an agent published in the GitHub repository zhaoxingxing06/kimi-tree-lens (0 stars, last pushed 11d ago), licensed MIT. It adds 41 tokens to every session and 1,172 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.