flow-mapping
Skill3 starsChanged 59 days agoMITView on GitHub
Turn current-state data-flow evidence into Mermaid diagrams that compile and state payload, cadence and reliability, gated by a validation script, at .gener8v/flows/ with an explicit Unknowns list. Use for data-flow, system-map or integration-map deliverables, or to check existing diagrams before they are published, such as 'map how claims data moves between systems' or 'draw the integration map'. Current state only: not for future-state architecture proposals (technical-design).
In this repository19 other files it gives its agents.
- architecture-reviewSkill
- auditSkill
- brownfieldSkill
- code-reviewSkill
- constraintsSkill
- defect-sweepSkill
- deliverySkill
- dependenciesSkill
- orchestrateSkill
- owasp-llm-top10-reviewSkill
- owasp-top10-reviewSkill
- planningSkill
- quality-reviewSkill
- rot-watchSkill
- security-reviewSkill
- setupSkill
- specificationSkill
- technical-designSkill
- ticket-breakdownSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Use this skill when:
- Distinctive: line 29
Do not use it for future-state architecture proposals — this skill asserts what *is*, evidenced.
- Very specific: line 90
Reliability is part of the model, not a footnote: Use the four classes — reliable, fragile, broken, isolated.
- Distinctive: line 99
Contradiction is signal: When IT and field staff describe the same flow differently, draw both and mark the conflict.
- Distinctive: line 101
Regex first, model second: Do not spend an LLM call on what a lint decides.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flow Mapping Skill
Purpose
Turn current-state data-flow findings into Mermaid diagrams that compile, read clearly, and state their own maturity — then iterate on them until they do. A flow map is not decoration: it is the artifact stakeholders argue with. A diagram that renders but hides its cadence, its reliability, or its evidence is worse than no diagram, because it looks authoritative while asserting nothing.
The skill pairs a deterministic validator (compilation + structural lints) with an LLM review pass (judgement). The split matters: regex settles what is decidable, so the model's attention is spent only on what needs a reader's judgement.
When to Use
Use this skill when:
- A data-flow / system-map / integration-map deliverable needs diagrams
- Existing diagrams need to be checked before publication (they may not even compile)
- Current-state flows must be shown per domain (Sales, Policy, Underwriting, Claims, ...)
- Prose describes flows that nobody has drawn, so contradictions stay invisible
- A pipeline emits flows as
{source, target, transformation}triples and needs them rendered
Do not use it for future-state architecture proposals — this skill asserts what is, evidenced.
Input
Source: flow findings in any of these shapes
data-flow/system-map/integration-mapdeliverables (.jsonor.md) produced outside this pipeline — by a discovery engagement, an integration inventory, or an interview-analysis tool- flow triples:
[{name, source, target, transformation}, ...] - interview evidence describing how data moves
- from inside the pipeline:
.gener8v/context.md(external integrations, Brownfield Phase 2) and.gener8v/brownfield/reconnaissance.md(side effects per file)
Expects: at minimum a source, a target, and what moves between them. Cadence, mechanism, and reliability are what the skill exists to force into the open — their absence is a finding, not a blocker.
Output
Writes to: .gener8v/flows/[domain-slug].md (one file per domain), each containing:
- a short prose statement of the domain's current-state flow
- one or more Mermaid diagrams
- an explicit Unknowns list — what could not be evidenced
Gate: ${CLAUDE_SKILL_DIR}/scripts/validate-flows.sh must exit 0 before the artifact is considered done. The path is absolute under both the plugin and a copied install, so run it exactly as written; the session's working directory is the user's project, so a relative scripts/… never resolves.
Output Format
# [Domain] — Current-State Data Flow
## How data moves today
[Prose: the flow in plain language, naming systems and the humans in the loop.]
```mermaid
graph TD
classDef reliable fill:#d4edda,stroke:#28a745,color:#000
classDef fragile fill:#fff3cd,stroke:#ffc107,color:#000
classDef broken fill:#f8d7da,stroke:#dc3545,color:#000
classDef isolated fill:#e2e3e5,stroke:#6c757d,color:#000,stroke-dasharray: 5 5
CRM["CRM"]
PolicyAdmin["Policy Admin"]
class CRM fragile
class PolicyAdmin fragile
CRM -. "member number, name, address | batch | nightly" .-> PolicyAdmin
```
## Reliability
| Node/Flow | Class | Why |
|---|---|---|
| CRM → Policy Admin | fragile | Nightly batch; date of birth silently dropped |
## Unknowns
- [What the evidence does not establish — named, not smoothed over.]Principles
- Compilation is non-negotiable. A diagram that does not render is not a deliverable. Gate it
mechanically (
mmdcexits 1 on a parse error); never eyeball it. - Every edge states its payload.
A --> Basserts nothing. Say what moves, how, and how often:-. "member number | batch | nightly" .->. - Reliability is part of the model, not a footnote. Use the four classes —
reliable,fragile,broken,isolated. An unclassed node is an unasked question. isolatedmeans deliberately unconnected. An isolated store with no edges is the finding (nothing reads or writes it). Do not "fix" it by inventing an edge, and do not lint it as an orphan.- Evidence or unknown — never plausible. A flow nobody described does not go in the diagram because it would be tidy. It goes in Unknowns.
- One domain per diagram. Past ~18 nodes a graph stops being read and starts being admired. Split by domain and link.
- Contradiction is signal. When IT and field staff describe the same flow differently, draw both and mark the conflict. Averaging them destroys the finding.
- Regex first, model second. Do not spend an LLM call on what a lint decides.
Process
- Collect flows from the source deliverable/evidence. Group by domain.
- Draft one diagram per domain in the Output Format above.
- Validate (mechanical):
Fix every${CLAUDE_SKILL_DIR}/scripts/validate-flows.sh .gener8v/flows/*.mdERROR(compilation, no nodes). Treat eachWARNas a question to answer, not noise to silence — an unlabelled edge usually means the evidence never said what moves. - Review (judgement) — the LLM pass, on what the lint cannot decide:
- Clarity: would a stakeholder who was not in the interviews read this the way we mean? Are labels domain language, or our shorthand? Is direction consistent?
- Maturity: is each class assignment defensible from evidence? Is cadence real or assumed? Are the humans in the loop drawn, or silently abstracted into a system box?
- Fidelity: does the diagram claim anything the evidence does not support? Anything in the prose that is missing from the diagram (or vice versa)?
- Iterate 3–4 until validation is clean and review raises nothing new. Record what changed.
- Report unresolved conflicts and Unknowns — they are output, not failure.
Example
Input triple
{"name": "member sync", "source": "CRM", "target": "PolicyAdmin",
"transformation": "nightly batch; date of birth dropped"}Draft (fails)
graph TD
CRM --> PolicyAdminvalidate-flows.sh → WARN 1/1 edge(s) unlabelled, WARN no classDef, WARN no cadence.
It compiles, so it looks finished — and asserts nothing.
After iteration
graph TD
classDef fragile fill:#fff3cd,stroke:#ffc107,color:#000
CRM["CRM"]
PolicyAdmin["Policy Admin"]
class CRM fragile
class PolicyAdmin fragile
CRM -. "member number, name, address | batch | nightly" .-> PolicyAdminNow it says: this is a batch flow, it runs nightly, it is fragile, and here is exactly what crosses. The date-of-birth loss surfaces in Reliability and drives a finding.
Troubleshooting
validate-flows.sh needs npx (Node), exit 2. Nothing was validated — exit 2 is a usage problem, not a compile failure. Install Node and rerun; the artifact is not done until the gate exits 0.- Every diagram reports
does not compilewith an npm or network error. The first run fetches@mermaid-js/mermaid-cli@11throughnpx; without network access the fetch fails and each diagram is reported as a compileERROR. The quoted error names npm, not a Mermaid token. Allow network for that first run and rerun. - A compile
ERRORshows six lines and… more line(s). The part naming the offending token is usually further down. Save that block as a.mmdfile and runnpx --yes @mermaid-js/mermaid-cli@11 -i block.mmd -o /tmp/block.svgto read the whole message. WARN … has N nodes (>18) — split by domain. Split the diagram by domain and link the parts (Principle 6).MAX_NODES=24raises the threshold for a domain that genuinely cannot be split.WARN … node 'X' is declared but never flows anywhere. Either the evidence never said what reaches it — the flow belongs in Unknowns, not in an invented edge — or it is deliberately unconnected, andclass X isolatedsays so.- Running the validator asks for permission. Expected: the skill pre-approves nothing, because a skill with
allowed-toolsmust itself be approved each time Claude invokes it — which would stop a flow map Claude starts on its own. Approve the command once, or addBash(${CLAUDE_SKILL_DIR}/scripts/validate-flows.sh *)with the absolute path to the project's permission allow rules. Run it exactly as written: abashprefix, acd … &&or a relative path is a different command and will not match a rule.
Integration with Other Skills
- Upstream: discovery deliverables from outside the pipeline; inside it, Brownfield's
context.mdandbrownfield/reconnaissance.md. - Technical Design: reads
.gener8v/flows/*.mdas the current-state baseline any target-state design must move from. - Brownfield: flow maps are evidence for capability boundaries (Phase 3).
- Specification: Unknowns become open questions.
- Orchestrate: lists flow maps under
cross_cutting.flows; Audit checks them (compilation, Unknowns present, every edge labelled).
Revisions
- Re-run when new evidence arrives (an interview, a discovered integration) or when a flow's cadence, mechanism or reliability changes; a diagram is current-state and dates quickly — record the evidence date in the prose.
- Re-validate after any edit: the gate is cheap and a diagram that stops compiling is worse than none.
- Flow maps are standalone artifacts: they are not invalidated by PRD or specification changes.
Notes
- The validator needs
npx(Node). It fetches@mermaid-js/mermaid-cli@11on first run (network access, ~30 s); whennpxis absent it says so and exits 2 rather than reporting a compile failure. MAX_NODES(default 18) tunes the split threshold:MAX_NODES=24 validate-flows.sh ....- The four
classDefcolors are the house convention; keep them stable so diagrams read the same across projects. - Exit codes:
0all diagrams compile and no ERROR lints;1otherwise;2bad usage.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

