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.
npx skills add braininahat/brains-in-a-hat --skill arch-diagramgit 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/skills/braininahat/brains-in-a-hat/arch-diagram)<a href="https://agentmods.dev/skills/braininahat/brains-in-a-hat/arch-diagram"><img src="https://agentmods.dev/badge/skills/braininahat/brains-in-a-hat/arch-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/skills/braininahat/brains-in-a-hat/arch-diagram"><img src="https://agentmods.dev/badge/skills/braininahat/brains-in-a-hat/arch-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.00093 | $0.01451 |
| Opus 5 | $0.00046 | $0.00726 |
| Sonnet 5 | $0.00019 | $0.00290 |
| Haiku 4.5 | $0.00009 | $0.00145 |
Grade A, and why
arch-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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Publication-Quality ML Architecture Diagrams
Generate vector architecture diagrams in Typst using the fletcher package (built on cetz). Follows the visual principles of Petar Velickovic and Janosh Riebesell: mathematical precision, semantic color, minimalist clarity.
Quick Start
Import the component library as a local Typst package. All colors, node types, edge helpers, and ml-diagram are available:
#import "@local/diagrams:0.1.0": *
For inline use in a full report (adds page/text settings):
#import "@local/diagrams:0.1.0": *
#set text(font: "New Computer Modern", size: 10pt)
// Inside the report body:
#figure(
ml-diagram(
data-in((0,0), [Poses\ #dim[(T, 22)]]),
edge("-|>"),
encoder((1,0), [BiGRU\ #dim[(T, 256)]]),
edge("-|>"),
ctc-head((2,0), [CTC\ #dim[46 classes]]),
edge("-|>"),
data-out((3,0), [Phonemes]),
),
caption: [CTC pipeline],
)
For standalone diagram files (auto-sized page):
#import "@local/diagrams:0.1.0": *
#set page(width: auto, height: auto, margin: 5mm, fill: white)
#set text(font: "New Computer Modern", size: 10pt)
#ml-diagram(/* nodes and edges */)
Compile with: typst compile diagram.typ diagram.pdf
The package is installed at ~/.local/share/typst/packages/local/diagrams/0.1.0/ and symlinked to the skill's lib.typ so edits propagate automatically.
Component System
Read references/component-library.md for the full catalog of reusable ML components. Key components:
| Component | Tint | Shape | When to Use |
|---|---|---|---|
data-in |
red | house | Raw input data |
encoder |
blue | rect | Feature extraction layers |
decoder |
teal | rect | Generation/reconstruction |
attention |
orange | hexagon | Attention, gating, selection |
norm |
yellow | hexagon | Normalization, regularization |
ctc-head |
green | rect | CTC/classification output |
embedding |
purple | rect | Latent spaces, projections |
loss |
red | diamond | Loss computation |
mask |
gray | rect (dashed) | Dropout, masking, optional |
What ships with it
25 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/ctc-pipeline.pdf 15 KB
- examples/ctc-pipeline.typ 1.6 KB
- examples/encoder-decoder.pdf 15 KB
- examples/encoder-decoder.typ 2.3 KB
- examples/jepa-architecture.pdf 17 KB
- examples/jepa-architecture.typ 2.1 KB
- examples/kan-vs-linear.pdf 22 KB
- examples/kan-vs-linear.typ 1.6 KB
- examples/mixed-report.pdf 65 KB
- examples/mixed-report.typ 2.5 KB
- examples/multimodal-fusion.pdf 21 KB
- examples/multimodal-fusion.typ 2.2 KB
- examples/tensor-shapes.pdf 19 KB
- examples/tensor-shapes.svg 93 KB
- examples/tensor-shapes.tex 2.4 KB
- examples/tensor-shapes.typ 1.6 KB
- lib.typ 6.7 KB
- references/color-system.md 2.1 KB
- references/component-library.md 5.1 KB
- references/dimensional-diagrams.md 3.2 KB
- references/fletcher-api.md 3.3 KB
- references/petarv-janosh-principles.md 3.4 KB
- references/system-design-components.md 2.1 KB
- scripts/compile-diagram.sh 757 B runs code
- scripts/render-tikz-for-typst.sh 916 B runs code
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.
- 12d ago First seen · 147 lines · 93 tokens per session scan A 31bb9ae33121
arch-diagram is a skill published in the GitHub repository braininahat/brains-in-a-hat (4 stars, last pushed 2mo ago), licensed MIT. It adds 93 tokens to every session and 1,451 once invoked, about $0.0005 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 skills, from other repositories
scientific-schematics
Create publication-quality scientific diagrams using Nano Banana 2 AI with smart iterative refinement. Uses Gemini 3.6 Flash for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways, and…
paper-poster-html
A workflow for building an academic conference poster as one HTML/CSS file and printing it to a PDF at an exact page size. It uses the paper’s real figures and checks layout details before review.
paperFig
Design, implement, revise, and validate publication-quality scientific figures from references, existing plotting code, and real project data. Trace every figure to source code and inputs; deconstruct reference figures; plan the scientific story and multi-panel structure; build complex model architecture and…
latex-posters
Use when creating or revising LaTeX research posters with beamerposter, tikzposter, or baposter, including poster layout, typography, color, print sizing, figure placement, QR codes, compilation, and print-ready PDF checks.
figure-composer
Compose a publication-grade multi-panel scientific figure from a claim, dataset, or draft result. Use when the task needs panel planning, consistent figure layout, figure review, or final figure assembly.
ccf-visual-composer
A visual design assistant for research papers, presentations, posters, and README graphics. It can lay out figures, tables, diagrams, icons, colors, and other visual elements, including editable SVG, PDF, and PPTX outputs.