trace-flow

trace-flow is a command for coding agents from sigistry/marketplace. It costs 15 tokens per session (637 once invoked), scanned A, original, MIT.

A command that maps a user action through the actual code call graph, from its starting point to the response, and shows the path as a diagram.

In plain words
What is it for?
Tracing HTTP and API requests, GraphQL or RPC calls, events, scheduled jobs, command-line actions, and user-interface actions through handlers, services, data access, and external calls.
Why use it?
It makes unfamiliar request flows easier to understand before changing code or explaining behavior to a teammate.

Command

Part of the codebase-navigator plugin — 2 skills, 4 commands, 3 agents shipped together

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/sigistry/marketplace/trace-flow
Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Or install codebase-navigator, the plugin that ships this one along with the rest of its 2 skills, 4 commands, 3 agents.

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 trace-flow

README.md
[![agentmods](https://agentmods.dev/badge/commands/sigistry/marketplace/trace-flow.svg)](https://agentmods.dev/commands/sigistry/marketplace/trace-flow)
Your own site
<a href="https://agentmods.dev/commands/sigistry/marketplace/trace-flow"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/trace-flow.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 637 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.00015 $0.00637
Opus 5 $0.00008 $0.00318
Sonnet 5 $0.00003 $0.00127
Haiku 4.5 $0.00002 $0.00064

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

Security

Grade A, and why

trace-flow 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 5d 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.

plugins/codebase-navigator/commands/trace-flow.md · 34 lines

How it starts

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

Trace what actually happens when a user action or request runs, from entry point through routing, middleware, handlers, services, and data access, to the response. Use this to understand an unfamiliar path before you change it, or to explain a flow to a teammate. $ARGUMENTS names the action or entry point (e.g. "POST /checkout", "user clicks Export", "the nightly reconciliation job", "GraphQL updateProfile").

Process

Step 1: Find the entry point

Identify how the flow starts and where it is registered, do not assume a framework, detect it:

  • HTTP/API: route tables, decorators/annotations (@app.route, @GetMapping, router.post), OpenAPI specs, framework controllers.
  • GraphQL/RPC: resolver maps, .proto service definitions, schema-to-resolver wiring.
  • Events/jobs: queue subscribers, cron/scheduler registrations, message handlers.
  • CLI/UI: command registration, or the client handler that issues the request.

Step 2: Follow the real call graph

Launch the flow-tracer agent with the entry point. It follows the actual chain, middleware and guards → handler → service/domain logic → data access and external calls → response serialization, resolving each hop through imports and call sites, and noting branches, retries, transactions, and side effects (events published, caches written, emails queued). Every hop is cited at file:line; it never fabricates a step it cannot find in the source.

Step 3: Report

Produce exactly these sections:

  • Entry point: the trigger, its registration file:line, and the input shape (route+method, event name, or command).
  • Step-by-step trace: one numbered step per hop: layer, file:line, function signature, what it does, and any branch/side effect. Mark async/queued hops.
  • Data access & external calls: the reads/writes and third-party calls made along the path, each with file:line.
  • Sequence diagram: a Mermaid sequenceDiagram of the real path (participants = the actual components you traced, not a generic template).

Read the full file on GitHub · 34 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. 5d ago First seen · 34 lines · 15 tokens per session scan A c20045b6e591

Subscribe to this mod's changes

trace-flow is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed yesterday), licensed MIT. It adds 15 tokens to every session and 637 once invoked, about $0.0001 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.