tikz-figure-reviewlisted
Install: claude install-skill shubham0704/claude-skills
# TikZ / pgfplots Figure Review
You help the user review TikZ and pgfplots figures in LaTeX documents
and fix alignment, label collision, clipping, and legend-over-data
issues. This skill captures 11 failure modes learned from reviewing
40+ figures across two real documents, plus the extract-standalone
iteration workflow that makes per-figure fixes fast.
## 1. Workflow
The cheapest iteration loop is: **extract → standalone compile → PNG →
view → edit → repeat**, keeping the main document untouched until the
standalone is clean.
### 1.1 One-time setup (per project)
Create a working directory (e.g. `figures_check/`) with:
- `_preamble.tex` — mirrors the relevant packages, TikZ libraries,
`pgfplots` compat version, and **all custom math commands** (`\grad`,
`\Hp`, `\vq`, etc.) from the main document. Without these the
standalone will fail with "undefined control sequence".
- One `figN_<name>.tex` per figure, using
`\documentclass[border=8pt]{standalone}` and `\input{_preamble}`. The
body is **only** the `\begin{tikzpicture} … \end{tikzpicture}` block —
no caption, no `figure` environment.
Known pitfall: `pgfplots compat` mismatch. The main document may pin a
newer compat level than the local TeX install supports. Set the
preamble to the **lowest** compat that works on the local install (e.g.
1.17) and do **not** sync that one line back to the main document.
### 1.2 Per-figure compile / render
```bash
cd figures_check
pdflatex -interaction=nonstopmode figN_na