К основному содержанию
скилл CX Codex

tikz-scientific-figures — скилл для Claude Code

Скилл tikz-scientific-figures для Claude Code рисует рисунки для статьи или отчёта на TikZ и PGFPlots и отдаёт SVG с PNG. Один рисунок — один standalone-файл .tex, и он остаётся редактируемым.

Apache-2.0 ★ 108 обновлён 2026-11-17

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add cjh-solver/MathModeling-Skills-Arsenal --skill tikz-scientific-figures -a claude-code
Открыть на GitHub

Что делает tikz-scientific-figures

Скилл превращает запрос на рисунок в один standalone-файл .tex; тот компилируется в PDF, а на выходе получаются SVG и PNG. PDF остаётся промежуточным файлом при сборке. Вместе с картинками отдаётся исходник .tex и файл данных, так что рисунок можно открыть и перерисовать.

Первый запуск начинается с scripts/check_env.sh: скрипт проверяет инструменты и печатает подсказки по установке под macOS, Windows и Linux. Дальше выбирается тип рисунка и читается одна подходящая инструкция из references/ — графики данных, circuitikz, блок-схемы, биология, CS/ML, химия, физика, математика. Шаблон assets/standalone-template.tex вместе с preamble.tex копируется в рабочий каталог, данные графиков уходят в data.csv, сборка идёт через compile.sh, export_svg.sh и preview.sh.

Палитра Okabe–Ito или viridis зашита в preamble.tex, сырые красный с зелёным и colormap jet не используются. Ширина — 89 мм под одну колонку и 183 мм под две, кегль 7–9 pt, у осей единицы, у планок погрешностей SD, SE или CI. Агент включает его, когда просят рисунок для статьи, диссертации или отчёта, график данных, схему или карту плазмиды. Скрипты — bash, на Windows их запускают из Git Bash или WSL; без pdflatex, poppler, dvisvgm и mutool сборка не пойдёт.

Какие задачи решает

  • собрать график с осями в единицах и планками погрешностей
  • нарисовать блок-схему для главы диссертации
  • получить векторный рисунок, который правится в .tex
  • вписать рисунок в ширину одной или двух колонок
  • переделать готовый .tex-рисунок вместо перерисовки с нуля

Примеры запросов агенту

  • Нарисуй в TikZ график из data.csv, ширина 89 мм, у осей единицы.
  • Сделай схему нейронной сети для статьи, палитра viridis.
  • Поправь рисунок в figure.tex: подписи осей с единицами и панели (a)(b)(c).

Как установить tikz-scientific-figures

1Через Skills CLI (Vercel)

npx skills add cjh-solver/MathModeling-Skills-Arsenal --skill tikz-scientific-figures -a claude-code

2Вручную: положить файлы

~/.claude/skills/tikz-scientific-figures/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/tikz-scientific-figures/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о tikz-scientific-figures

Как установить tikz-scientific-figures в Claude Code?

Команда: npx skills add cjh-solver/MathModeling-Skills-Arsenal --skill tikz-scientific-figures -a claude-code. Файл скилла появляется в ~/.claude/skills/tikz-scientific-figures/SKILL.md.

Что делает tikz-scientific-figures?

Собирает научные рисунки и схемы на TikZ и PGFPlots: графики данных, блок-схемы, схемы молекул и нейросетей. Отдаёт SVG, PNG, исходный .tex и файл данных, а PDF служит только промежуточным файлом сборки.

Что нужно для работы tikz-scientific-figures?

LaTeX-движок pdflatex (для lualatex нужен luatex85), poppler, dvisvgm и mutool из mupdf-tools; latexmk не обязателен. Скрипты написаны на bash, на Windows их запускают из Git Bash или WSL.

Исходный текст

SKILL.md · Apache-2.0
---
name: tikz-scientific-figures
description: >-
  Create publication-grade scientific figures and schematic diagrams with
  TikZ/PGFPlots, output as SVG + PNG (PDF only as compile intermediate, not a deliverable). Use when the
  user wants a figure for a paper/thesis/report, a data plot (line, scatter,
  bar, error-bar, heatmap, log axis), a circuit diagram, a flowchart or block
  diagram, a free-body/force or geometry schematic, a biology figure
  (immunofluorescence/tissue, cell, signaling pathway, gene or plasmid map), a
  CS/ML figure (neural network, system architecture, finite-state machine, tree,
  graph), or a molecular structure — especially when they mention TikZ, PGFPlots,
  circuitikz, LaTeX figures, reproducible/vector/publication-quality plots, or
  editing an existing .tex figure. Produces reproducible .tex + data sources the
  user can re-edit.
---

# TikZ Scientific Figures

Generate reproducible, publication-grade figures in TikZ. One figure = one
`standalone` `.tex` file that compiles to PDF (intermediate only), then exports
SVG + PNG as the actual deliverables. Always deliver the `.tex` (+ any data
file) so the figure stays editable. PDF is not a deliverable and must not be
registered in the figure registry.

## Step 0 — check the toolchain (first run only)
```bash
bash scripts/check_env.sh
```
If tools are missing, show the user the printed install hints (OS-aware:
macOS/Windows/Linux) and stop until the toolchain is in place. Need: a LaTeX
engine (pdflatex — the scripts' default; lualatex needs luatex85), poppler
(preview), and for SVG export dvisvgm + mutool (mupdf-tools). latexmk is optional
— the scripts run the engine twice without it.

**Cross-platform note.** The recipes and TikZ code are OS-independent (identical
output on macOS/Windows/Linux). The four `.sh` scripts are portable bash: on
Windows run them from Git Bash or WSL. If no bash is available, run the
underlying commands directly — `compile` ≈ `pdflatex -interaction=nonstopmode
-halt-on-error figure.tex` (run twice), `preview` ≈ `pdftoppm -png -r 200
-singlefile figure.pdf out`, `export_svg` ≈ `dvisvgm --pdf figure.pdf`. On
Windows, MiKTeX auto-installs missing LaTeX packages on first compile, so the
"optional packages" step is usually unnecessary there.

## Workflow
1. **Pick the figure type** and read the matching recipe (only that one):
   - data plot (line/scatter/bar/hist/box/heatmap/contour/3D/log) → `references/pgfplots-recipes.md`
   - circuit → `references/circuitikz-recipes.md`
   - flowchart / block / force / geometry → `references/diagram-recipes.md`
   - biology (IF/tissue, cell, pathway, gene/plasmid map) → `references/biology-recipes.md`
   - CS/ML (neural net, architecture, automaton, tree, graph, UML, ER, Gantt) → `references/cs-recipes.md`
   - chemistry (molecule, reaction, energy profile, lattice) → `references/chemistry-recipes.md`
   - physics (ray optics, Feynman, vector field) → `references/physics-recipes.md`
   - math (commutative diagram, Venn, number line) → `references/math-recipes.md`
2b. **Composing a paper figure?** Multi-panel (a)(b)(c), insets, significance
   markers, fit+CI bands, or labelling a real microscopy/photo image →
   `references/figure-composition.md`.
2. **Start from the template.** Copy `assets/standalone-template.tex` and
   `assets/preamble.tex` into the working dir. Keep the `TUNABLES` block at the
   top — it is what lets non-experts hand-edit later.
3. **Put data in an external file** (`data.csv`) for data plots, so "editing the
   plot" means editing the CSV, not the TikZ.
4. **Compile, export SVG+PNG, then self-check visually** (do not skip the look):
   ```bash
   bash scripts/compile.sh figure.tex      # -> figure.pdf (intermediate only)
   bash scripts/export_svg.sh figure.pdf   # -> figure.svg (primary vector deliverable)
   bash scripts/preview.sh figure.pdf      # -> figure.png (raster deliverable)
   ```
   On errors, match `figure.log` against `references/common-errors.md`.
5. **Deliver** SVG + PNG + `.tex` + data file together. PDF is an intermediate
   compile artifact only — do not deliver it, do not register it in the figure
   registry. State the figure's edit state (see Editing below).

## Contest-Orchestrator Adapter

When this skill is invoked from `contest-orchestrator`, read [contest-adapter.md](references/contest-adapter.md). In that context this skill is reserved for evidence-grounded mechanism, principle, force, geometry, coordinate, vector, curve, angle and formula schematics.

- Do not use this route for data result plots; those use `ModelViz` followed by `scipilot-figure-skill` quality checks.
- Do not use this route for problem-analysis flowcharts or technical-roadmap diagrams; those use `tech-route-maker`.
- Read the project's `model_contract.yaml`, `symbol_table.md`, derivation registry and relevant result/source files before writing TikZ.
- Every visible variable, label, relation and geometric object must have a source locator. Do not invent formulas, variables, units or mechanisms.
- Keep `.tex` as the authoritative editable source and deliver SVG + PNG; PDF is only a local compilation intermediate and must not enter artifacts, registry or delivery package.
- Run preview rendering, visual inspection and AI visual QA by default for every generated figure. Check clipping, overlap, alignment, legibility, whitespace, color/gray-scale readability and clean composition in addition to compilation, source, structure and provenance checks; the user may perform a final visual inspection as an additional check.
- Register the output as `kind=schematic`, `generator=tikz-scientific-figures`.
- Return the shared node handoff fields: `status`, `active_mode`, `task_card`, `artifacts`, `evidence`, `checks`, `blockers`, and `next_node`; keep source and reports under the project workspace.
- Treat the TikZ source and compiled figure as artifacts, not proof. Every symbol and relation must be defined in the paper or model contract; captions and labels must not contain agent discussion, debugging, failed attempts, old versions or other negative echo.

## Publication-grade rules (non-negotiable defaults)
- Vector output (SVG) + raster preview (PNG); PDF is compile-only intermediate, never delivered.
- Colour-blind-safe palette (Okabe–Ito / viridis) — wired into `preamble.tex`.
  Never hard-code raw red/green or use the `jet` colormap.
- Size to the target: 89 mm single-column / 183 mm double-column; body font 7–9 pt.
- Every axis labelled **with units**; error bars state SD/SE/CI; multi-panel
  figures numbered (a)(b)(c).
- Render math labels in LaTeX (`$\alpha$`, `siunitx`), so they match the paper.
- Ship the source: deliver `.tex` + data, not just an image.

If the user names a target venue (IEEE, a thesis template, etc.), adjust width,
font, and `compat` in `preamble.tex` accordingly before drawing.

## Editing an existing figure
Read `references/editing-guide.md`. Summary of the rule that must not be broken:
- Default: edit the `.tex`/`.csv` in place and recompile (model-driven or via the
  `TUNABLES` block). Never redraw from scratch when a source file exists.
- For free-form visual polish, `bash scripts/export_svg.sh figure.tex` exports an
  SVG for Inkscape/TikZiT. **This forks the figure to the SVG branch** (a
  `figure.svg.frozen` marker is written): from then on the SVG is authoritative
  and the `.tex` is a frozen archive — do NOT recompile the `.tex` over the
  user's SVG edits. Always tell the user which branch a figure is on.
- After exporting, launch a local visual editor that loads the SVG and saves
  back in place:
  ```bash
  bash scripts/edit_svg.sh figure.svg   # no arg => newest *.svg in the dir
  ```
  This starts a local server (127.0.0.1, ephemeral port), opens **Method Draw**
  in the browser with the SVG pre-loaded, and **Ctrl/Cmd+S writes the edits back
  to the same `figure.svg`** (the browser's download export stays as a fallback).
  Ctrl+C in the terminal stops the server. The SVG remains the authoritative
  source (`.tex` stays frozen). Needs `python3`; on Windows run from Git Bash or
  call `python3 scripts/edit_server.py figure.svg` directly.

© cjh-solver · Apache-2.0 · cjh-solver/MathModeling-Skills-Arsenal

Похожие скиллы

Все скиллы по теме «Наука и исследования» →
extract-tikz pedrohcgs Скилл extract-tikz для Claude Code выдёргивает TikZ-диаграммы из Beamer-исходника, компилирует в PDF и конвертирует в SVG с нумерацией с нуля. Синхронизирует слайды с Quarto. CX Codex +1 ★ 1 729звёзд репо hf-architecture-tikz yzlnew Скилл hf-architecture-tikz генерирует вертикальные схемы архитектуры декодерных LLM из HuggingFace в формате TikZ с точными формулами и числом параметров. CX Codex +1 ★ 158звёзд репо extract-figures franklee16 Скилл extract-figures извлекает изображения, графики и диаграммы из .docx, переводит EMF/WMF в PNG и готовит README со вставкой для LaTeX. CX Codex +1 ★ 240звёзд репо tikz-flowchart yzlnew Скилл tikz-flowchart помогает генерировать блок-схемы и архитектурные диаграммы на LaTeX TikZ с готовыми темами оформления. CX Codex +1 ★ 158звёзд репо latex-posters K-Dense-AI Скилл latex-posters собирает научные постеры через три LaTeX-пакета, компилирует PDF и проверяет шрифты перед отправкой в типографию. CX Codex +1 2 300установок latex-document-skill ndpvt-web Скилл latex-document-skill верстает резюме, научные статьи, презентации и формы в LaTeX, собирает их в PDF через скрипты и отдаёт превью страниц в PNG. CX Codex +1 608установок

Из того же набора10

Весь набор →
code_repair Промпт code_repair для Claude Code исправляет проблемы из технических и визуальных отчётов. Он сохраняет текущий подход к построению графиков и зависимости. GP ChatGPT ★ 108звёзд репо visual_quality_check Промпт visual_quality_check для Claude Code сверяет сгенерированный график с требованиями задачи, выбранным шаблоном и отчётом. Фиксирует только дефекты с самого изображения или из отчётов. GP ChatGPT ★ 108звёзд репо template_adaptation Промпт template_adaptation для Claude Code переносит реальные данные в выбранный шаблон. Он сохраняет исходное оформление и структуру там, где это возможно. GP ChatGPT ★ 108звёзд репо markitdown-skill Скилл markitdown-skill для Claude Code переводит документы и веб-страницы в Markdown через CLI markitdown. Выполняет OCR изображений, транскрибирует аудио и пакетно обрабатывает папки. CX Codex +1 ★ 108звёзд репо bzd-review-paper Скилл bzd-review-paper для Claude Code оценивает статью по математическому моделированию и проверяет её соответствие условиям конкурса. Для разбора нужны полный текст задачи и статья команды. CX Codex +1 ★ 108звёзд репо modelviz-skill Скилл modelviz-skill для Claude Code строит научные графики по таблицам и запросу на естественном языке. Он выбирает шаблон, подгоняет его под данные и проверяет результат. CX Codex +1 ★ 108звёзд репо tech-route-maker Скилл tech-route-maker для Claude Code строит редактируемые схемы технических маршрутов и исследовательских пайплайнов по исходным материалам. Включается по запросу диаграммы или команде $tech-route-maker. CX Codex +1 ★ 108звёзд репо fireworks-tech-graph Скилл fireworks-tech-graph для Claude Code строит технические диаграммы и экспортирует их в SVG, PNG или интерактивный HTML. Запускается по просьбе визуализировать систему или инженерную идею; запрос на GIF включает анимацию. CX Codex +1 ★ 108звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой