Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Builds and maintains GitDiagram-style Mermaid architecture flowcharts tied to real repo paths, with path validation, full classDef color palette, and Markdown link tables (not diagram click). Use when the user says /flow-diagram or /flow-driagram (typo), asks for an architecture flowchart, system map, lab diagram refresh, gitdiagram-style diagram, Mermaid flowchart update, or keeping the canonical diagram in sync with the codebase.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 82% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 86% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 167% | 0% |
/flow-diagram)%%{init: {'flowchart': {'useMaxWidth': true}, 'themeVariables': {'fontSize': '12px'}}}%%.classDef tones and class assignments from examples.md unless the diagram is trivially small (see examples for when to trim).flowchart TD; stacked subgraphs by concern; row bands (subgraph with direction LR, title [" "]) when there are five or more sibling nodes in a group.click in the canonical file (Cursor preview is unreliable for click). · ; no <br/> / <br> in labels for Cursor-friendly previews.Mirror gitdiagram in spirit only (no hosted pipeline): structure → graph → Mermaid → path validation → fix drift.
Maintain a single canonical flowchart TD per doc. Primary visual reference (house style: compact labels, stacked layout, full colors, tables): LAB_ARCHITECTURE_FLOWCHART.md. EXAMPLE_FLOWCHART.md is a historical gitdiagram export — use it for palette and grouping ideas only; do not copy <br/> multiline labels or rely on click for the canonical doc.
Canonical output file (Lab OS product repo): docs/60-reference/LAB_ARCHITECTURE_FLOWCHART.md. Other repositories: default to docs/architecture/SYSTEM_MAP.md (or a path the user gives). See When this is not the Lab OS product repo below.
Initial multi-diagram product design (broader than this skill): see lab-init.
click for the canonical diagram. Cursor’s Markdown preview (and many other Mermaid embeds) do not expose interactive click targets the way github.com’s full viewer might.https://github.com/<owner>/<repo>/blob|tree/<branch>/...) and Relationship lookup (from → label → to; solid vs dotted).classDef / class) in the chart while making navigation reliable in Cursor and on GitHub.%%{init: {'flowchart': {'useMaxWidth': true}, 'themeVariables': {'fontSize': '12px'}}}%% so the diagram respects preview width and type is slightly smaller.direction TB and define nodes in read order so the renderer tends to grow tall rather than one ultra-wide row.direction LR per row (e.g. 3+2 or 3+3); subgraph title [" "] avoids an extra visible band name.dir/, short roles—full prose only in the Node lookup table. · ; no <br/> / <br> in Cursor-optimized docs.lab/ subtrees, schema moves, docs buckets).docs/architecture/SYSTEM_MAP.md or another path under docs/ the user names. Create parent folders if needed. Use the repo’s doc frontmatter conventions if any.README, package.json, infra roots, etc.). Do not assume lab.yaml, schema/lab.schema.json, or Lab OS scripts/*.mjs unless they exist.owner, repo, and branch from git remote get-url origin and the default branch (often main); use that base for lookup tables.Use this table only when maintaining the Lab OS canonical repository:
| Area | Typical paths | |------|----------------| | Manifest & schema | lab.yaml, schema/lab.schema.json | | Template | template/ | | Lab instance | lab/intent/, lab/reality/, lab/delta/, lab/evidence/, lab/behavior/ | | Tooling | scripts/*.mjs, bin/lab-os.mjs | | Knowledge | docs/ | | Fixtures | examples/ | | Tests | tests/ |
Use package.json scripts and repo tree to decide which scripts deserve their own nodes vs. grouping.
README / structure docs if present.node_* / group_* IDs; edges with clear verb labels; keep classDef / class using the full palette unless the diagram is minimal.blob for files and tree for directories. Resolve owner/repo/branch from git remote get-url origin (and default branch, often main).mermaid block without click lines + Node lookup + Relationship lookup. Optional “What changed” bullets for PRs.Repeat steps 3–5 until there are no broken paths or parse errors.
| Element | Rule | |--------|------| | Init | %%{init: ... useMaxWidth ... fontSize ...}%% first line inside fence | | Layout | flowchart TD; subgraphs for bounded contexts; prefer vertical stacking + row bands for wide lists | | Node IDs | Stable node_*; subgraphs group_* | | Labels | Compact in-diagram (paths / one word); details in lookup table; · only; no <br/> | | Edges | --> primary; -.-> secondary/supporting; |"verb text"| on links | | Styling | Full classDef / class gitdiagram palette by default — see examples.md | | Links | Tables after the diagram, not click inside it (canonical doc) |
created / updated when the repo uses doc frontmatter (see DOC_GOVERNANCE for Lab OS); bump updated on each content change to the diagram or tables.mermaid.click directives in the canonical file.blob/tree correct.docs/60-reference/README.md links the canonical file if newly added./flow-driagram typo).SKILL.md stays the single entrypoint; deeper detail only in linked sibling files.click, portability notes.Other measured skills in the registry, with their headline benchmark lift.