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.
git clone --depth 1 https://github.com/braininahat/brains-in-a-hatWrote 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.
[](https://agentmods.dev/commands/braininahat/brains-in-a-hat/diagram)<a href="https://agentmods.dev/commands/braininahat/brains-in-a-hat/diagram"><img src="https://agentmods.dev/badge/commands/braininahat/brains-in-a-hat/diagram/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/braininahat/brains-in-a-hat/diagram"><img src="https://agentmods.dev/badge/commands/braininahat/brains-in-a-hat/diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.00413 |
| Opus 5 | $0.00005 | $0.00206 |
| Sonnet 5 | $0.00002 | $0.00083 |
| Haiku 4.5 | $0.00001 | $0.00041 |
Grade A, and why
diagram 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 11d 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.
What it actually says
Create a publication-quality diagram from the user's description.
Steps
-
Parse the user's description to identify:
- What system/architecture is being diagrammed
- Whether it's a flow/pipeline (fletcher) or structural/dimensional (TikZ)
- Output format requested (svg/pdf) and output path
-
Decide diagram system:
- fletcher: data flow, pipeline stages, transformer/encoder/decoder blocks, JEPA, CTC
- TikZ: cell internals, lattice structures, geometric/spatial, keypoint graphs
-
Check for the closest existing example:
- fletcher:
skills/arch-diagram/examples/(ctc-pipeline, encoder-decoder, multimodal-fusion, jepa-architecture, kan-vs-linear) - TikZ:
skills/tikz-render/references/custom-architectures.mdandreferences/library-catalog.md
- fletcher:
-
Create the diagram file in
figures/(or user-specified path):- Read the appropriate SKILL.md for the exact API
- Adapt the closest example rather than writing from scratch
- Annotate tensor shapes, use semantic colors
-
Compile:
- fletcher:
typst compile <file>.typ <file>.svg - TikZ:
skills/tikz-render/scripts/compile.sh <file>.tex <file>.svg
- fletcher:
-
Report the output path. If compilation fails, show the error and fix it.
Usage Examples
/diagram Draw the CTC recognition pipeline: poses → CNN1D → BiGRU → CTC → phonemes
/diagram Create a TikZ figure showing BiGRU cell internals with gate labels
/diagram Visualize the multimodal fusion: pose encoder + audio encoder → cross-attention → CTC
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.
- 11d ago First seen · 42 lines · 10 tokens per session scan A 41eedd78f8de
diagram is a command published in the GitHub repository braininahat/brains-in-a-hat (4 stars, last pushed 2mo ago), licensed MIT. It adds 10 tokens to every session and 413 once invoked, about $0.0001 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.
Other commands, from other repositories
profile
Save, load, inspect, update, reset, or delete diagram-design client profiles.
ui-flow-review
Review menus, HUD, navigation, and player flow from a UX perspective.
responsive-design-specialist
Use when a layout breaks between sizes. Arbitrary breakpoints, type that does not scale, images that blow out the grid, or a desktop design retrofitted onto mobile.
ppt-image2-editable-rebuild
Rebuild image2 or imagegen reference slides as editable PowerPoint decks.
p3-ux-wireframes
Creates wireframes (ASCII art) for the most important screens with interaction descriptions.
team-ui
Orchestrate UI/UX design team.