generate-diagrams
Skill1 starsChanged 11 days agoCC0-1.0View on GitHub
Add or change the deck's WebP diagrams in media/generate_diagrams.py (matplotlib + Caveat font): legibility and sizing rules, box and label helpers, colour constants, font-glyph limits, and the pre-commit checklist. Use before adding, editing or regenerating any diagram.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- .well-known/llms-full.txtllms.txt
- .well-known/llms.txtllms.txt
- check-accessibilitySkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
All diagrams use matplotlib and the Caveat font at DPI=160.
- Very specific: line 27
Boxes: Use box(ax, x, y, w, h, col, label, sub=...): accent border, dark tinted fill, accent label, and an optional TXT sub-label.
- Distinctive: line 38
Always use these constants.
≈ “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
Generate diagrams
All diagrams use matplotlib and the Caveat font at DPI=160. save() renders
each figure, crops it to the drawn content plus a small margin, and writes the
WebP that index.qmd references. Regenerate with
uv run python media/generate_diagrams.py.
Legibility rules
- No in-image titles. The slide heading is the title. Empty bands are cropped away, so any reserved space would only shrink the diagram.
- Design for the slide's width, not its height. Slide CSS caps images at
480px tall and the slide's content width. Aim for width:height of roughly
2.3:1 or wider (
w=11,habout 3.4–4.7) so the diagram is width-bound and its text renders at about 20px or more. Tall layouts shrink every label. - Font sizes. Box labels 19–24 pt, sub-labels and annotations 17–19 pt. Nothing smaller.
- Boxes. Use
box(ax, x, y, w, h, col, label, sub=...): accent border, dark tinted fill, accent label, and an optionalTXTsub-label. Do not use white borders. Leave at least 0.3 units between boxes joined by an arrow, or the arrowhead disappears. - Labels own their space. Section headers, bracket labels, and edge
annotations (
heading(),bracket(),lbl()) each sit in their own horizontal band, never on top of an arrow or box. Put column headers above background panels, not inside them.
Colours
Always use these constants; never hard-code hex values in diagrams:
BG=#0d1117 GRN=#22c55e BLU=#38bdf8 AMB=#f59e0b PUR=#a78bfa RED=#f87171
TXT=#e6edf3 MUT=#a8b3c1 CARD=#1c2128Box fills come from tint(accent), which blends 16% of the accent into BG.
These dark fills keep accent-coloured text above WCAG AA contrast; do not
brighten them.
Font glyphs
Caveat.ttf has no Unicode check marks (✓ U+2713) or other special symbols,
and no bold weight. Use plain ASCII alternatives: +, -, >, x, ok.
Checklist before committing a diagram
- No text overlaps a box edge, arrow, or other text
- Every arrowhead is visible
- Printed size is width-bound (see the aspect rule above)
- The WebP is visually inspected (convert with
dwebpif needed), and so is the rendered slide - The slide's
fig-alttext describes the new content
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.

