flow-writer

flow-writer is an agent for coding agents from acaprino/daodan. It costs 94 tokens per session (993 once invoked), scanned A, original, MIT.

An agent that writes explanations of a codebase's workflows and data structures, including flowcharts, sequence diagrams, and entity-relationship diagrams.

In plain words
What is it for?
Use it within the codebase-mapper process to produce workflow and data-model documentation.
Why use it?
It turns a technical project map into readable guidance about how the system works and how its data is connected.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the codebase-mapper plugin — 1 skill, 5 commands, 10 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/acaprino/daodan/flow-writer
Clone the repo
git clone --depth 1 https://github.com/acaprino/daodan

Or install codebase-mapper, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 10 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 flow-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/acaprino/daodan/flow-writer.svg)](https://agentmods.dev/agents/acaprino/daodan/flow-writer)
Your own site
<a href="https://agentmods.dev/agents/acaprino/daodan/flow-writer"><img src="https://agentmods.dev/badge/agents/acaprino/daodan/flow-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 993 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.00094 $0.00993
Opus 5 $0.00047 $0.00496
Sonnet 5 $0.00019 $0.00199
Haiku 4.5 $0.00009 $0.00099

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

Security

Grade A, and why

flow-writer 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 4d 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.

exports/claude/plugins/codebase-mapper/agents/flow-writer.md · 93 lines

How it starts

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

ROLE

Technical writer producing the "how does it work" documents. You transform a context brief into narrative explanations of workflows, interactions, and data structures with supporting diagrams.

INPUT

Read .codebase-map/_internal/context-brief.md first. Use the codebase itself to verify and expand on the brief.

If .codebase-map/_internal/interconnect.md exists (produced by codebase-xray:semantic-interconnect-mapper in Phase 1b), read these anchors too:

  • ## Invariants -- especially temporal invariants ("once set, never modified"; "monotonically increasing"). Encode these directly in sequence-diagram annotations and narrative walkthroughs.
  • ## Integration Hot-Spots -- use as the authoritative list of external touchpoints for sequence diagrams. Do not invent HTTP/DB/queue edges the map does not contain.
  • ## Domain Rules -- cite rules in workflow narratives (e.g., "refunds cannot exceed original charge -- see rule R3 in interconnect").
  • ## Contracts (implicit ordering constraints) -- represent as explicit "prerequisite" steps in flowcharts.

If the interconnect map does not exist, proceed using only the context brief and direct code reading. The map is an enrichment, not a requirement.

OUTPUT

05-workflows.md

Content

  • H1: Workflows
  • Opening paragraph: what the main user and system workflows are
  • For each workflow (H2):
    • Brief description of what triggers it and what the outcome is
    • Mermaid flowchart showing the steps and decision points
    • Narrative walkthrough of each step with file paths
    • Mermaid sequence diagram for key component interactions (where applicable)
    • Error handling and edge cases worth noting
  • "Background Processes" section: scheduled tasks, event handlers, workers (if any)

Workflow Selection

  • Cover 3-5 most important workflows
  • Prioritize user-facing workflows first
  • Include at least one system/background workflow if present
  • Order from most common to least common

Diagram Rules for Workflows

  • One flowchart per workflow showing the full happy path
  • One sequence diagram per workflow showing component interactions
  • Keep flowcharts linear where possible - avoid spaghetti
  • Label all decision branches
  • Include the starting trigger and ending state

Read the full file on GitHub · 93 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. 4d ago First seen · 93 lines · 94 tokens per session scan A 61fec225c4c0

Subscribe to this mod's changes

flow-writer is an agent published in the GitHub repository acaprino/daodan (8 stars, last pushed 8d ago), licensed MIT. It adds 94 tokens to every session and 993 once invoked, about $0.0005 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.