code-flow-map

A documentation tool that follows how a requested feature moves through a codebase. It creates a Markdown document and an interactive HTML page with diagrams and function reference tables.

In plain words
What is it for?
Use it to document one feature or an entire codebase, with selectable detail, frontend handling, tracing, and output formats. It can also add missing docstrings to source files.
Why use it?
It turns scattered source-code relationships into a readable map. This helps developers understand where a feature starts, what it calls, and how the pieces connect.

Skill for Claude CodeCodex

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 skills/plearaj/code-flow-skill/code-flow-map
Any agent
npx skills add plearaj/code-flow-skill --skill code-flow-map
Clone the repo
git clone --depth 1 https://github.com/plearaj/code-flow-skill

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,623 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.00031 $0.09623
Opus 5 $0.00015 $0.04811
Sonnet 5 $0.00006 $0.01925
Haiku 4.5 $0.00003 $0.00962

Measured yesterday against content hash 76e351805cbc, 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-map 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 yesterday.

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.

templates/shared/code-flow-map/SKILL.md · 676 lines

How it starts

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

Code Flow — Documentation Generator

Analyze the codebase and generate flow documentation for the requested functionality.

Before you write anything

Name the flow you are about to map and wait for the user to confirm it, unless their own request already named it. This skill writes files under Code_Flows/ and adds docstrings to source files that lack them. Some hosts start a skill because a conversation drifted near its description rather than because anyone asked for it, and on those hosts this paragraph is the only thing standing between that drift and an edit to the user's code.

User Input

The user's request says what to map, and may carry five option flags — --whole-code-base, --detail thin|standard|verbose, --output files|bundle|both, --frontend auto|react|vue|angular|svelte|off and --tracer auto|on|off. Step 1 reads them.

Instructions

1. Identify the Target Flow

The user's request says what to document. Read it first for its option flags. They are options, not part of the feature name — strip them out before you derive any filename from what is left.

  • --whole-code-base — map the whole repository instead of one feature. If it is present, skip the rest of this section and everything through step 7, and follow Whole-Codebase Mode at the end of this document instead.
  • --detail thin|standard|verbose — how much evidence each catalogued function carries. Default standard. It only changes anything in whole-codebase mode; if it appears without --whole-code-base, accept it silently rather than erroring. If it appears with a value that is not one of those three, tell the user what you read, use standard, and carry on.
  • --output files|bundle|both chooses which HTML gets written, default files. files writes index.html, one page per flow, and the quality report page, exactly as before. both adds Code_Flows/code-flow.html, a single self-contained page carrying every flow. bundle writes that page and no other HTML. If its value is not one of those three, say what you read, use files, and carry on. --output never suppresses the JSON artifactsindex.json, <functionality_name>.json and inventory.json are written in every mode, because /code-flow-quality reads them and a run that skipped them would break it silently. Unlike --detail, it changes behavior in both modes: in whole-codebase mode it governs the bundle exactly as it does here — see Whole-Codebase Mode's Pass 1 and Pass 2 for where that applies.
  • --frontend auto|react|vue|angular|svelte|off — whether to map UI components as well as functions. Default auto: detect the frameworks this repository actually uses and map their components too. Naming one forces that framework; off maps functions only. Frontend Component Mapping below says what it changes. If its value is not one of those, say what you read, use auto, and carry on.
  • --tracer auto|on|off — whether to run the installed static tracers before tracing anything. Default auto: run each tracer whose language this repository contains and whose interpreter this machine has, and read source yourself where none applies. on means say so and stop when no tracer could run, since a user who asked for a traced map would otherwise get a slower one silently. off never runs one. Automated Tracing below says what they produce and how far to trust it. If its value is not one of those three, say what you read, use auto, and carry on.

Read the full file on GitHub · 676 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 676 lines · 31 tokens per session scan A 76e351805cbc

Subscribe to this mod's changes

code-flow-map is a skill published in the GitHub repository plearaj/code-flow-skill (1 stars, last pushed 4d ago), licensed Apache-2.0. It adds 31 tokens to every session and 9,623 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.