A Claude Code skill for designing publication-quality TikZ figures for academic papers — system architectures, pipelines, multi-panel comparisons, neural-network and block-stack schematics, tensor / mask visualizations, dimension-annotated tensor flow, and cryptographic schematics (block ciphers, Feistel networks, modes of operation, hash constructions, AES-state differential trails).
A self-contained reference + template library that codifies a calm, low-saturation, information-dense TikZ aesthetic targeting top-tier security / ML venues (CCS, S&P, USENIX, NDSS, NeurIPS, ICML, CRYPTO, EUROCRYPT). The skill is domain-neutral — examples use generic structural placeholders (Stage~A, Block, Zone~A, Component~A, etc.), not paper-specific terminology.
SKILL.md Skill entry point — workflow + global style + audit loop
references/
style-guide.md Color palette, font ladder, spacing values, error catalog
pipeline-figures.md Vertical pipeline + residual bypass + ×N brace
system-architecture.md Multi-zone diagrams with trust boundary
comparison-panels.md Multi-panel (a)/(b) layouts
tensor-matrix.md Mask matrices + aligned cell rows
neural-net.md Fully-connected NN with `\foreach`, block-stack recipe
crypto-schematics.md Crypto operators, Feistel, modes, constructions, AES trails
debugging.md Standalone wrapper, common errors, externalization
library-reference.md TikZ libraries cheat sheet
templates/
_preamble.tex Master tikzset block + library loads
pipeline-vertical.tex Block-stack forward-pass (compiles standalone)
architecture-zones.tex 2-zone trust-boundary system (compiles standalone)
comparison-2panel.tex Iterative vs Batched two-panel (compiles standalone)
crypto-primitives.tex Operators + Feistel + Even-Mansour (needs assets/)
crypto-aes-state.tex AES-state differential trail via diffpath (needs assets/)
assets/ Vendored CC0 crypto deps (crypto.symbols, diffpath, arrows.new)
Drop the directory into ~/.claude/skills/:
git clone <this-repo> ~/.claude/skills/tikz-academicThe skill auto-loads when Claude Code detects TikZ-figure context — keywords like 画图 / TikZ / 架构图 / pipeline figure / system diagram / etc.
The .tex files in templates/ compile out of the box:
cd templates
pdflatex pipeline-vertical.tex
pdflatex architecture-zones.tex
pdflatex comparison-2panel.tex
# crypto templates need the vendored deps on TEXINPUTS:
TEXINPUTS=".:../assets:" pdflatex crypto-primitives.tex
TEXINPUTS=".:../assets:" pdflatex crypto-aes-state.texRead SKILL.md first for the workflow, then dip into the relevant references/*.md for the figure archetype you need.
- Hierarchy through saturation, not color count (
color!12–!20fills against black ink). - Stages are nodes; relationships are arrows.
- Annotations are part of the figure, not caption afterthought.
- Symmetric padding wins.
- After every compile, read the rendered PDF as an image and walk the audit checklist — source code that compiles is not the same as source code that looks right.
The skill's "Common silent defects" catalog and the templates' style choices grew out of a real iterative-design session — each entry corresponds to a specific defect caught by visual audit (TikZ unit gotcha, brace-amplitude failure, central-hub overlap, bare \in grammatical fragments, matrix-of-nodes border collapse, etc.). The catalog is therefore a working immune system for silent failures, not a prescriptive checklist written ahead of time.