lingzhi227/figure-generation
Generate publication-quality scientific figures using matplotlib/seaborn with a three-phase pipeline (query expansion, code generation with execution, VLM visual feedback). Handles bar charts, line plots, heatmaps, training curves, ablation plots, and more. Use when the user needs figures, plots, or visualizations for a paper.
npx skills add https://github.com/lingzhi227/agent-research-skills --skill figure-generation
Generate publication-quality figures for research papers.
$0 — Description of the desired figure$1 — (Optional) Path to data file (CSV, JSON, NPY, PKL) or results directorypython ~/.claude/skills/figure-generation/scripts/figure_template.py --type bar --output figure_script.py --name comparison
python ~/.claude/skills/figure-generation/scripts/figure_template.py --list-types
Available types: bar, training-curve, heatmap, ablation, line, scatter, radar, violin, tsne, attention
Expand the user's figure description into step-by-step coding specifications using the prompts in references/figure-prompts.md. Determine: figure type, data mapping (x/y/color/hue), style requirements, paper conventions.
scripts/figure_template.py as a starting pointpython figure_script.py.png produced: add explicit save instruction, retryRead the generated PNG file and visually inspect using the VLM feedback prompts from references/figure-prompts.md:
If improvements needed: generate corrective instructions and re-execute.
~/.claude/skills/figure-generation/references/figure-prompts.md~/.claude/skills/figure-generation/scripts/figure_template.pyBoth PNG (preview, 300 DPI) and PDF (vector, for paper) formats. Plus the LaTeX include code:
\begin{figure}[t]
\centering
\includegraphics[width=\linewidth]{figures/figure_name.pdf}
\caption{Description. Best viewed in color.}
\label{fig:figure_name}
\end{figure}
Take lingzhi227/figure-generation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.