Agent skill

Scientific Figure Generation

by lingzhi227 in lingzhi227/agent-research-skills

Generates publication-quality scientific figures with matplotlib or seaborn through query expansion, a run-and-retry coding loop and a visual check of the rendered PNG.

No licenceAuto-check passedData & Analytics

Install Scientific Figure Generation

skills CLI
$ npx skills add lingzhi227/agent-research-skills --skill figure-generation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lingzhi227/agent-research-skills figure-generation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lingzhi227/agent-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/figure-generation .claude/skills/figure-generation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
figure-generation
GitHub stars
390
Token cost
~809 tokens
SKILL.md length
269 words
Files
3 (incl. scripts, references)
Skills in repo
31
Repo updated
First seen
Licence
None found

At a glance

Generates publication-quality scientific figures with matplotlib or seaborn through query expansion, a run-and-retry coding loop and a visual check of the rendered PNG.

  • Works in 3 steps: Query Expansion → Code Generation with Execution Loop (up… → Visual Refinement
  • Producing bar charts, heatmaps or training curves for a paper
  • SKILL.md covers Input, Scripts, Three-Phase Pipeline (from… and References, plus 3 more sections
  • Runs Python scripts from its folder; calls python

What it does

This skill turns a figure description, and optionally a data file in CSV, JSON, NPY or PKL form or a results folder, into a research-paper figure. It works in three phases borrowed from MatPlotAgent: expand the request into step-by-step coding specs using the prompts in references/figure-prompts.md, generate a self-contained Python script and run it with up to four retries on errors or a missing PNG, then look at the rendered image and correct what is off. A helper, scripts/figure_template.py, offers starter templates for bar, training-curve, heatmap, ablation, line, scatter, radar, violin, tsne and attention figures.

Each run saves a PNG preview at 300 DPI and a vector PDF, together with LaTeX figure-include code. The visual pass checks that the figure type matches the request, that labels, titles and legends are right, that colors are consistent, and that text is readable at print size. The stated quality requirements are at least 300 DPI or vector output, a colorblind-friendly palette, text of at least 8pt, consistent styling across a paper's figures, and captions written in LaTeX instead of matplotlib's default title.

When your agent uses it

  • Producing bar charts, heatmaps or training curves for a paper
  • Making ablation plots with consistent styling across figures
  • Regenerating a figure until labels, legends and scales look right
  • Exporting a vector PDF plus LaTeX include code

Example prompts

  • “Plot the training and validation loss from results/run1.json as a training curve for the paper.”
  • “Make an ablation bar chart from ablation.csv with a colorblind-friendly palette.”
  • “Draw a heatmap of the attention weights saved in attn.npy and give me the LaTeX include snippet.”

Requirements

  • Python with matplotlib or seaborn

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Query Expansion
  2. Code Generation with Execution Loop (up to 4 retries)
  3. Visual Refinement

What it can do on your machine

Read from SKILL.md and the folder at commit 9e6c085. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Scientific Figure Generation loads about 809 tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 269 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~809
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 269 words (~809 tokens).

“Generate publication-quality figures for research papers.”

— opening of SKILL.md by lingzhi227
name
figure-generation
argument-hint
figure-description

Read the full SKILL.md on GitHub

Files

SKILL.md and 2 other files (scripts, references) in skills/figure-generation of lingzhi227/agent-research-skills.

  • SKILL.md
  • references/figure-prompts.md
  • scripts/figure_template.py

Open the folder on GitHubat commit 9e6c085

Compare with similar skills

Scientific Figure Generation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Scientific Figure Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Scientific Figure Generation this skilllingzhi227/agent-research-skills390—~809Automated safety check: PassNone
Ieee Figure TableCloudWave818/ieee-skills359—~1kAutomated safety check: PassMIT
Nature FigureCitrus-bit/Anaxa1202 repos~2.7kAutomated safety check: PassMIT
CJK Font Setup for Plotsxjtulyc/MedgeClaw6171 repos~1.3kAutomated safety check: PassNone
Release Evidence WorkflowAli-Marandi/ClimateDataAnalyzer107—~1.6kAutomated safety check: PassMIT
Scientific VisualizationOleafly/Oleafly212—~3.4kAutomated safety check: NotesMIT

Similar skills

  • Ieee Figure Table

    CloudWave818/ieee-skills

    Audit, redesign, generate, and improve IEEE manuscript figures, tables, captions, result presentation, plotting scripts, visual polish, hybrid Python/R plus vector-editor workflows…

    359 GitHub stars~1k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Nature Figure

    Citrus-bit/Anaxa

    Submission-grade Nature/high-impact journal figure workflow for Python or R.

    120 GitHub starsUsed in 2 repos~2.7k tokens
    Data & AnalyticsAuto-check passed
  • CJK Font Setup for Plots

    xjtulyc/MedgeClaw

    Detects a usable Chinese, Japanese or Korean font and configures matplotlib so chart labels, titles and legends render instead of showing empty boxes.

    617 GitHub starsUsed in 1 repo~1.3k tokens
    Data & AnalyticsAuto-check passed
  • Release Evidence Workflow

    Ali-Marandi/ClimateDataAnalyzer

    Build an auditable release-evidence workflow for a desktop or packaged application.

    107 GitHub stars~1.6k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Create and audit truthful, accessible, publication-ready scientific figures with Matplotlib, Seaborn, or Plotly.

    212 GitHub stars~3.4k tokensUpdated today
    Data & AnalyticsAuto-check: notes
  • Intelligrapher

    MrLee2R/Intelligrapher

    科研绘图智能助手。当用户需要科研绘图、数据可视化、配色建议、期刊风格调整、生成 matplotlib 或 seaborn 绘图代码、或询问某专业领域图表规范时触发。支持多领域与顶刊审美,输出可直接运行的 Python 脚本。

    112 GitHub stars~388 tokensUpdated 4 mo ago
    Data & AnalyticsAuto-check passed

More from lingzhi227/agent-research-skills

All 31 skills in this repo
  • Backward Traceability

    lingzhi227/agent-research-skills

    Makes each number in a LaTeX paper link back to the code line that produced it, using hypertarget and hyperlink tags and compile-time `\num` formulas.

    390 GitHub stars~802 tokensUpdated 7 mo ago
    Auto-check passed
  • Statistical Data Analysis

    lingzhi227/agent-research-skills

    Writes statistical analysis code for experimental data, runs it through a four-round review, and reports effect sizes, p-values and confidence intervals.

    390 GitHub stars~886 tokensUpdated 7 mo ago
    Auto-check passed
  • Excalidraw Canvas Toolkit

    lingzhi227/agent-research-skills

    Draws and refines Excalidraw diagrams on a live canvas through MCP tools or a REST API, with screenshots, file import and export, snapshots and Mermaid conversion.

    390 GitHub stars~3.8k tokensUpdated 7 mo ago
    Auto-check passed
  • Research Experiment Designer

    lingzhi227/agent-research-skills

    Plans research experiments in four progressive stages, from a first working implementation through baseline tuning and creative research to ablation studies.

    390 GitHub stars~752 tokensUpdated 7 mo ago
    Auto-check passed
  • Research Idea Generation

    lingzhi227/agent-research-skills

    Generates and iteratively refines research ideas for a given area, checking each one's novelty against Semantic Scholar and arXiv, and scoring it on interestingness, feasibility and novelty.

    390 GitHub stars~747 tokensUpdated 7 mo ago
    Auto-check passed
  • Academic LaTeX Formatter

    lingzhi227/agent-research-skills

    Sets up conference-specific LaTeX paper templates, checks a draft for formatting and submission issues, and auto-fixes common problems for venues like ICML, ICLR, NeurIPS, AAAI and ACL.

    390 GitHub stars~603 tokensUpdated 7 mo ago
    Auto-check passed

Questions about Scientific Figure Generation

What does Scientific Figure Generation do?

Generates publication-quality scientific figures with matplotlib or seaborn through query expansion, a run-and-retry coding loop and a visual check of the rendered PNG. This skill turns a figure description, and optionally a data file in CSV, JSON, NPY or PKL form or a results folder, into a research-paper figure.md, generate a self-contained Python script and run it with up to four retries on errors or a missing PNG, then look at the rendered image and correct what is off.

When should I use Scientific Figure Generation?

Scientific Figure Generation fits situations like: producing bar charts, heatmaps or training curves for a paper; making ablation plots with consistent styling across figures; regenerating a figure until labels, legends and scales look right; exporting a vector PDF plus LaTeX include code.

How do I install Scientific Figure Generation in Claude Code?

Run `npx skills add lingzhi227/agent-research-skills --skill figure-generation -a claude-code`. Or copy the skill folder (skills/figure-generation in lingzhi227/agent-research-skills) into .claude/skills/figure-generation in your project. Claude Code loads it when a task matches its description.

How do I install Scientific Figure Generation in Codex?

Run `npx skills add lingzhi227/agent-research-skills --skill figure-generation -a codex`. Or copy the skill folder (skills/figure-generation in lingzhi227/agent-research-skills) into .agents/skills/figure-generation in your project. Codex loads it when a task matches its description.

Can I use Scientific Figure Generation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lingzhi227/agent-research-skills --skill figure-generation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/figure-generation, .gemini/skills/figure-generation, .github/skills/figure-generation and .opencode/skills/figure-generation in your project.

What does Scientific Figure Generation need to run?

Going by SKILL.md and its folder, Scientific Figure Generation needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python with matplotlib or seaborn.

Does Scientific Figure Generation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Scientific Figure Generation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Scientific Figure Generation use?

No licence was found for Scientific Figure Generation or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Scientific Figure Generation use?

About 809 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Scientific Figure Generation?

Skills that share tags, products or a category with Scientific Figure Generation: Ieee Figure Table (CloudWave818/ieee-skills, 359 stars), Nature Figure (Citrus-bit/Anaxa, 120 stars), CJK Font Setup for Plots (xjtulyc/MedgeClaw, 617 stars) and Release Evidence Workflow (Ali-Marandi/ClimateDataAnalyzer, 107 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Scientific Figure Generation?

lingzhi227 (a GitHub user) maintains it in lingzhi227/agent-research-skills, which has 390 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on February 27, 2026.

Source: lingzhi227/agent-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.