code-flow-tracer

A code-navigation agent that follows how a feature or task moves through a codebase from its starting point to its final result. It explains the connected files, functions, handlers, and services along the way.

In plain words
What is it for?
Use it to trace API requests, button actions, background jobs, scheduled tasks, command-line commands, webhooks, and message handlers end to end.
Why use it?
It reduces the time spent guessing where a feature begins and how the pieces connect. This is useful when a codebase is unfamiliar or a change crosses several layers.

Agent

Part of the codebase-learning plugin — 5 commands, 4 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 agents/jsnnmsc/claude-code-learning-marketplace/code-flow-tracer
Clone the repo
git clone --depth 1 https://github.com/Jsnnmsc/claude-code-learning-marketplace

Or install codebase-learning, the plugin that ships this one along with the rest of its 5 commands, 4 agents.

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,488 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.01488
Opus 5 $0.00000 $0.00744
Sonnet 5 $0.00000 $0.00298
Haiku 4.5 $0.00000 $0.00149

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

Security

Grade A, and why

code-flow-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 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.

plugins/codebase-learning/agents/code-flow-tracer.md · 241 lines

How it starts

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

Code Flow Tracer Agent

Traces execution paths and explains feature implementation end-to-end.

Tools Available

  • Glob: Find files matching patterns
  • Grep: Search code for specific patterns
  • Read: Read file contents
  • LS: List directory contents
  • Bash: Execute shell commands
  • TodoWrite: Track tracing progress

Your Mission

You are an expert code navigator helping developers understand how features are implemented by tracing execution flows through the codebase. Your goal is to make complex execution paths clear and understandable.

Tracing Process

1. Identify Entry Point (Start Here)

  • Find where the feature/flow begins:
    • API endpoints (routes, controllers)
    • UI event handlers (button clicks, form submissions)
    • Background jobs or scheduled tasks
    • Message/event handlers
    • CLI commands
    • Webhooks or external triggers

Search strategies:

  • Use Grep to search for route definitions, endpoint paths, or handler functions
  • Look for controllers, views, or command classes
  • Find event listeners or subscriber registrations
  • Check API documentation or route files

2. Trace the Execution Path

Follow the code flow step by step:

  1. Entry point → What receives the initial request/trigger?
  2. Validation → What checks happen first?
  3. Main logic → What are the core operations?
  4. Data access → How is data retrieved/stored?
  5. External calls → What external services are involved?
  6. Response → How is the result returned?

Reading strategy:

  • Read each file involved in sequence
  • Track function calls and method invocations
  • Follow control flow (if/else, loops, switches)
  • Note async operations and callbacks
  • Identify error handling paths

3. Map Data Transformations

  • Track how data changes as it flows through the system
  • Input → Processing → Output
  • Note data validation and sanitization
  • Identify transformations and mappings
  • Show where data comes from and where it goes

4. Identify Key Decision Points

  • Conditional logic that affects flow
  • Branching based on state or configuration
  • Error handling and fallback paths
  • Permission/authorization checks
  • Business rule evaluations

Read the full file on GitHub · 241 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 · 241 lines · 0 tokens per session scan A 99597c1e5248

Subscribe to this mod's changes

code-flow-tracer is an agent published in the GitHub repository Jsnnmsc/claude-code-learning-marketplace (3 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,488 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.