Introduction¶
When writing papers, creating figures often takes more time than writing the text: changing an axis or color scheme requires exporting and re-importing files between Excel, GraphPad, and R. Issues like garbled Chinese labels or overlapping text in PDFs are common causes for revisions before submission. If you want an Agent to directly read JSON/CSV/Excel files during a conversation and render submission-ready figures locally—rather than just providing a snippet of matplotlib sample code—the following introduces the Academic Figure Generation (package name @indiv-sorsor/academic-figures) Skill available on SkillHub.
What is this¶
Academic Figure Generation is an Agent Skill based on the universal SKILL.md format. It uses a local python3 script to render structured data into academic charts. The entire process runs locally, and no data is uploaded to the cloud. The current version on the SkillHub page is v5.5.0, and the maintainer is @indiv-sorsor.
It is designed for scenarios where you have “real data” and need to produce “journal-standard figures,” rather than for text polishing, commercial dashboards, or illustrations without data support (which are explicitly listed as unsuitable on the official page).
Core Features¶
The following capabilities are derived from the SkillHub Skill Page and the skill documentation.
Charts and Data Input¶
- Supports reading data from JSON / CSV / Excel to generate charts with a single command.
- The official introduction lists chart types covering common scientific research categories, including but not limited to: Forest plots, KM survival curves (with risk tables), ROC curves, Calibration curves, Decision Curve Analysis (DCA), Nomograms, RCS, Subgroup forest plots, Volcano plots, Raincloud plots, Ridge plots, Dumbbell plots, Swimmer plots, Tumor response waterfall plots, UpSet plots, PRISMA flowcharts, Funnel plots, Bland-Altman plots, PCA, Heatmaps, Box plots, Violin plots, Combo plots, Cox multivariate regression forest plots, etc. (The page describes this as covering 35 chart types).
Color Schemes and Journal Presets¶
- 9 color schemes, including the colorblind-safe Okabe-Ito palette and specific journal palettes.
- 9 journal submission presets (The page lists common standards such as Nature and Lancet; specific widths, font sizes, and DPI are applied via parameters like
--journal). - Supports YAML pipelines to generate a full set of paper figures in batch with a single command.
Export and Quality Gates¶
- Default 600 dpi publication-grade output; the skill documentation supports formats like PNG / SVG / PDF / TIFF / EPS (some scenarios support multi-format export simultaneously).
- PDF Text Overlap Gate: Before export,
--verifycan be used to perform pixel-level overlap detection. If issues are found, the process is blocked with a non-zero exit code to prevent obvious defects from entering the submission package. - The skill documentation also provides
audit_pdf.pyto verify minimum font size (working in conjunction with the min text requirements in journal presets), forming a “overlap + font size” dual-check approach. - Zero-configuration for Chinese: Reduces garbled text through CJK font detection and mechanisms like
--cjk(usually requires running an environment self-check script upon the first run).
Execution Mode¶
- Pure local execution; data does not leave the local machine.
- Can be triggered by keywords in Agent conversations, such as: Academic figures, Scientific plotting, Bar chart, Heatmap, Scatter plot, Forest plot, KM survival curve, ROC, Violin plot, Combo plot, Flowchart, SCI figures, Journal figures, Colorblind-safe, etc. (Subject to the skill’s
description).
Installation and Activation¶
The installation process follows the SkillHub official documentation skillhub.md.
1. Install SkillHub CLI (If not already installed)¶
First, check if the CLI is present:
command -v skillhub && skillhub --version
If not installed, you can execute the full installation (including CLI and default Skills):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
If only the CLI is needed:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
2. Install this Skill to the current Agent’s skills directory¶
⚠️ When installing, you must use --dir to point to the skills directory recognized by your current Agent; otherwise, it defaults to ./skills/ and may not be loaded.
skillhub search academic-figures
skillhub install @indiv-sorsor/academic-figures --dir <your skills directory>
Common path examples (excerpted from official installation docs):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
In Cursor, this can be written equivalently as:
skillhub install @indiv-sorsor/academic-figures --dir ~/.cursor/skills/
You can also ask the Agent in the conversation to install it based on official prompts:
Please install
@indiv-sorsor/academic-figuresaccording to https://skillhub.cn/install/skillhub.md.
3. Local Python Environment (Skill Runtime)¶
After the Skill is installed, it is recommended to run an environment self-check within the skill directory before creating figures for the first time (standard step in the skill documentation):
python3 scripts/setup_env.py
This step handles dependencies, CJK fonts, and self-checks to prevent rendering failures due to missing environment setup later.
Typical Usage¶
The following commands are from the skill’s built-in gen_figure.py documentation and can be executed in the skill’s root directory after installation; the scripts/ in the path is relative to the skill package root.
Wizard and Selection¶
If you are unsure about the chart type, you can let the script recommend one or launch a wizard:
python3 scripts/gen_figure.py --suggest -d data.json
python3 scripts/gen_figure.py --wizard
Bar Chart + Colorblind-safe Theme + PDF Verification¶
Suitable for submission PDFs, running the overlap gate before export:
python3 scripts/gen_figure.py -t bar -d data.json -o fig.pdf --theme okabe-ito --verify
One-click submission package (The --pub-ready in the skill documentation combines verification, themes, and multi-format options; specifics depend on the current version’s help):
python3 scripts/gen_figure.py -t bar -d data.json -o fig --pub-ready
Forest Plot, KM, ROC¶
python3 scripts/gen_figure.py -t forest -d forest.json -o forest.pdf --theme okabe-ito
python3 scripts/gen_figure.py -t km -d survival.json -o km.png --theme okabe-ito
python3 scripts/gen_figure.py -t roc -d roc.json -o roc.png --theme okabe-ito
Journal Presets (Nature Double Column Example)¶
python3 scripts/gen_figure.py -t bar -d data.json -o nat.pdf --journal nature --column double
python3 scripts/audit_pdf.py nat.pdf --min-size 5
Chinese Heatmap¶
python3 scripts/gen_figure.py -t heatmap -d data.json -o heatmap.png --cjk \
--cmap RdBu_r --vmin -20 --vmax 45
When using it within an Agent, you usually only need to describe the data path, chart type, and journal requirements; after reading SKILL.md, the Agent will construct the above commands for you and explain the exit codes (e.g., if --verify detects overlap, the exit code will be 2, indicating you should fix the figure before submission).
Use Cases and Notes¶
Suitable for:
- Converting existing table data into submission-ready figures while writing papers or before submission;
- Batch regenerating multi-format outputs (PNG/PDF/TIFF) for the same dataset;
- Processing sensitive clinical or omics data locally to avoid uploading to third-party plotting services.
Notes:
- A working local Python 3 and skill dependencies are required; if there is no Python environment, SkillHub offers a cloud-based paid version academic-figures-pro (different from the free local version, requires data upload), which is not covered in this article.
- Complex statistical meanings (whether to use KM or Cox, how to set multiple comparisons) still require the researcher’s judgment; the skill provides rendering and common statistical annotation capabilities, not a replacement for paper writing or statistical consulting.
- CSV support is limited for some complex schemas (like structures with
errors, dual axes, forest plot specific fields); the documentation suggests switching to JSON. - When using
--journal, figure width is locked by the journal preset; large matrix images may trigger downsampling or timeouts, requiring adjustments to--timeoutor data scale according to the skill documentation.
Conclusion¶
Academic Figure Generation consolidates “Read Data → Select Chart → Apply Journal Preset → Export Multi-format → PDF Gate” into a local pipeline callable by an Agent. It is suitable for scientific researchers who already have data and want to minimize figure-related revisions within their IDE.
- SkillHub Skill Page: https://skillhub.cn/skills/indiv-sorsor/academic-figures
- Official API Entry (SkillHub User Page): https://api.skillhub.cn/user_481397b5/academic-figures
- Installation Instructions: https://skillhub.cn/install/skillhub.md