visual-docs
Skill1 starsChanged 5 months agoApache-2.0View on GitHub
Use when documenting anything visually and didactically — explaining a system, a flow, a protocol, or code so a reader learns it. Covers flow/sequence/state diagrams, ASCII packet & byte walks, and annotated code explanation, plus a deterministic compile-to-validate step so diagrams actually render. Triggers: "diagram this", "add an architecture diagram", "make a visual explainer", "explain this code visually", "walk me through the request/flow", "packet walk", "step-by-step diagram", "teach / onboard with docs". (For data charts/plots use the `dataviz` skill instead.)
1 other project uses a version of this.
Adopted by
Most recently taken up by
- andrewsoonqn/skillstheir own version, first seen Aug 30, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- andrewsoonqn/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- apigee-x-proxy-developmentSkill
- architecture-research-blueprintSkill
- aws-lambda-fleet-to-cloud-runSkill
- aws-lambda-to-cloud-run-migrationSkill
- preso-builderSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 40
One concept per diagram: If a diagram needs two paragraphs to excuse its complexity, split it.
- Distinctive: line 42
Always narrate: Every diagram is paired with prose that says *what to look at and why it matters* — the diagram shows structure, the words …
- Distinctive: line 87
Compile every diagram before committing: Run the co-located validator:
- Very specific: line 129
Keep component names canonical across diagrams.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Visual documentation that teaches — and actually renders
Goal: visual docs that make a reader understand, not just diagrams that exist. Two properties, always together:
- Didactic — every diagram is chosen to teach one idea, narrated in prose, and built for progressive understanding (big picture → detail).
- Correct — diagram-as-code is deterministic, so it's validated by compiling, not by eyeballing. A diagram that doesn't parse is a bug.
This skill covers: teaching-oriented flow, sequence, and state diagrams; ASCII packet/byte/memory walks; annotated code explanation (call graphs, execution traces); choosing the right diagram type for a concept; the Mermaid + ASCII authoring rules; and the deterministic validation loop. It also covers architecture diagrams (C4).
This skill does NOT cover: data charts/plots (bar/line/scatter/dashboards) → use
the dataviz skill. Auto-generating a whole codebase's architecture doc end to
end → use the visual-explainer agent (it reuses this skill for the mechanics).
1. Didactic strategy — the spine
Pick and shape every diagram to teach. Core principles (full playbook and worked
recipes in references/didactic-strategy.md):
- Progressive disclosure. Lead with the smallest big-picture view; add detail in later, zoomed-in diagrams. Never open with the 40-node diagram.
- One concept per diagram. If a diagram needs two paragraphs to excuse its complexity, split it.
- Always narrate. Every diagram is paired with prose that says what to look at and why it matters — the diagram shows structure, the words carry the lesson.
- Give a legend/key. Define shapes, colors, arrow meanings, and actors once.
- Number the steps. Ordered flows and walks get explicit
1,2,3…so the reader can follow the sequence and you can reference steps in the prose. - Calibrate to the audience. New hire vs. reviewer vs. on-caller need different altitudes; state the intended reader.
2. Pick the diagram type by the concept you're teaching
Match the concept to the form before you pick the tool. Snippets (validated Mermaid +
ASCII equivalent) for each are in
references/diagram-type-guide.md.
| You're explaining… | Use | Notes |
| Control flow, decisions, branching logic | Flowchart (flowchart) | Diamonds = decisions; label every branch |
| Interaction over time, request/response, handshakes | Sequence (sequenceDiagram) | Best for "who calls whom, in what order" |
| A lifecycle / status machine | State (stateDiagram-v2) | Nodes = states, edges = transitions/events |
| A wire format, packet, byte/bit or memory layout | ASCII packet walk | See references/packet-walks.md |
| Data shape & relationships | ER diagram (erDiagram) | Entities + cardinality |
| System/architecture layers | C4 | See references/architecture-c4.md |
| How a piece of code executes | Annotated code + call graph/trace | See references/code-explanation.md |
3. Pick the format & author cleanly
| Need | Use | Why |
| Default, GitHub-native | Mermaid | Renders inline on GitHub; no build step |
| Wire formats, bytes, memory, terminal/diff-friendly | ASCII | Renders everywhere, diffs cleanly, teaches layout |
| Nicer layout/aesthetics | D2 (d2lang.com) | Deterministic compile (build step) |
| Multi-view architecture that must not drift | C4 / Structurizr | One model → many views |
Always keep an ASCII fallback alongside complex diagrams for plain-text/terminal readability — and prefer ASCII outright for packets/bytes/memory (it teaches the layout better than a box-and-arrow diagram).
Mermaid gotchas (GitHub-targeted). In sequenceDiagram, message text must be
plain ASCII — no backticks, no --, no <br/>, no unicode arrows — and no ()
in participant ... as aliases. Each breaks GitHub rendering. Flowchart labels are
more permissive; quote labels with special chars. (Also: never leave a bare ~ before
a value in prose — a pair becomes strikethrough. Use ≈.)
4. Validate deterministically (the important part)
Compile every diagram before committing. Run the co-located validator:
# from the repo root; validates all Mermaid blocks, exit!=0 on any failure
skills/visual-docs/scripts/validate-diagrams.sh skills/visual-docs/examples/ skills/visual-docs/references/Backends (auto-detected, in order): local mmdc → npx mmdc → Kroki HTTP
(curl, zero-install; set KROKI_URL to self-host for private content). On a FAIL,
read the compiler error, fix the source, re-run until failed: 0.
Caveats (verified): source→syntax is deterministic but pixel output varies by
renderer — validate structure, not byte-identical images. And "compiles" ≠ "GitHub
will render it": Kroki/some mmdc versions accept diagrams GitHub rejects, so the §3
token rules are the GitHub-targeted guard and the compile step catches broader
structural errors — use both. ASCII diagrams need no compiler; keep them in fenced
code blocks so spacing is preserved.
5. Available Resources
references/didactic-strategy.md— load when planning how to explain something: progressive disclosure, narration patterns, legends, audience calibration, "explain-this" recipes.references/diagram-type-guide.md— load to pick a diagram type; has a copy-paste Mermaid + ASCII snippet for each.references/packet-walks.md— load for wire formats/protocols: RFC-style header boxes, offset rulers, byte/bit layouts, step-by-step walks.references/code-explanation.md— load to explain code: annotated blocks, call graphs, execution traces, data pipelines.references/architecture-c4.md— load for multi-view architecture with guaranteed consistency (Structurizr/C4, MCP).examples/— four validated, narrated worked examples (request flow, auth sequence, TCP packet walk, code explainer). Readexamples/README.mdfirst.
6. Workflow
- State the reader and the one thing each diagram should teach (§1).
- Map concept → diagram type (§2), then → format (§3).
- Author it: narration + legend + numbered steps + an ASCII fallback for complex Mermaid (or ASCII outright for packets/bytes).
- Validate (§4); fix on failure; re-run until clean.
- Keep component names canonical across diagrams; for multi-view architecture,
drive it from a C4 model (§
architecture-c4.md) so views can't drift.
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.

