Scientific Figures logo

Scientific Figures

Community
ssinder
scientific-figures

This skill should be used when generating publication-ready scientific figures — ROC curves, confusion matrix heatmaps, docking binding-energy heatmaps, pLDDT confidence histograms, SHAP summary beeswarms, class distribution charts and other chart types with a unified journal-grade visual style. 用于生成顶刊级出版图表(ROC 曲线、混淆矩阵、热图、pLDDT 分布、SHAP 摘要等)的场景。

Overview

Publisherssinder
Repositorybioinformatics-agent-skills
Skill namescientific-figures
Stars
75
Forks
2
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ssinder on GitHub. Read the source before you install it.

Installation

Install the Scientific Figures AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/scientific-figures
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ssinder/bioinformatics-agent-skills.git /tmp/bioinformatics-agent-skills
mkdir -p .claude/skills
cp -r /tmp/bioinformatics-agent-skills/skills/scientific-figures .claude/skills/scientific-figures
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Scientific Figures in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Scientific Figures on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Scientific Figures is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Overview

用一个多子命令入口生成出版级科研图表,所有图共享同一套视觉规范(Arial 优先字体、 去除 top/right spines、关闭网格、色盲友好调色板、300/600 dpi 保存、tight bbox)。

统一的 figure_style.py 模块把原先散落在 15 个 figN_*.py 脚本里的样式逻辑 收敛为可复用组件,支持 nature / cell / science 三种期刊预设,并提供 ROC 显著性检验、自助法置信区间、SHAP 特征重要性排序等真实的统计能力。

When to Use This Skill

  • 需要为论文或报告生成 ROC 曲线、混淆矩阵、热图等标准图表
  • 需要多个子图风格完全一致(同一篇论文里不能一个图 Arial 一个图 Times)
  • 需要为机器学习结果生成 SHAP 摘要图或特征重要性图
  • 需要给分子对接结果做结合能热图
  • 需要给结构预测结果画 pLDDT 置信度分布

Quick Start

bash
export PYTHONPATH="$PWD/packages"

# ROC 曲线(含 AUC 显著性检验与自助法置信区间)
python skills/scientific-figures/scripts/make_figures.py roc \
    --input data/roc.csv --output figures/fig8_roc \
    --bootstrap-ci --fill-best --stats-output figures/fig8_roc_stats.csv

# 混淆矩阵热力图(多模型)
python skills/scientific-figures/scripts/make_figures.py confusion \
    --input data/confusion.csv --output figures/fig9_cm

# 分子对接结合能热图
python skills/scientific-figures/scripts/make_figures.py heatmap \
    --input data/docking.csv --output figures/fig11_docking \
    --cmap coolwarm_r --colorbar-label "Binding Energy (kcal/mol)" \
    --x-label Receptor --y-label Ligand --percentile-clip

# pLDDT 置信度直方图
python skills/scientific-figures/scripts/make_figures.py plddt \
    --input data/plddt.csv --output figures/fig3_plddt

# SHAP 摘要蜂群图 + 特征重要性条形图
python skills/scientific-figures/scripts/make_figures.py shap \
    --input data/shap.csv --output figures/fig10_shap --top-n 15 \
    --importance-output figures/fig10_importance.csv

# 门-纲分类分布
python skills/scientific-figures/scripts/make_figures.py class-distribution \
    --input data/taxa.csv --output figures/fig1_taxa --top-n 20

Workflow

  1. 加载样式:apply_publication_style(style) 设置 rcParams(字体、spines、网格、dpi、色板)
  2. 读取数据:自动 BOM/分隔符嗅探,列名大小写不敏感匹配
  3. 按子命令分发:每个子命令是一个独立的绘图函数,共享统一的保存接口
  4. 统计增强(可选)
    • ROC:AUC 梯形积分、AUC 间 Z 检验(Hanley-McNeil 标准误)、自助法置信区间
    • 混淆矩阵:全局统一色阶 + 数值与百分比双标注
    • SHAP:平均绝对 SHAP 值排序、标准差、Top N 选择
  5. 保存:save_figure() 同时输出 PNG(位图,用于预览与文档)与 PDF(矢量,用于投稿)

Parameters

参数说明默认值
subcommand图表类型(位置参数):roc confusion heatmap plddt shap class-distribution secondary-structure model-performance feature-importance必填
--input输入 CSV必填
--output输出路径(不含扩展名时按 --formats 生成多个文件)必填
--style期刊预设:default / nature / cell / sciencenature
--formats输出格式png pdf
--dpi分辨率300
--top-n显示 Top N(SHAP / 分类分布 / 特征重要性)15
--bins直方图分箱数(pLDDT)50
--cmap热图色阶coolwarm_r
--colorbar-label / --x-label / --y-label热图标签Value / 空
--percentile-clip热图色阶按 2%/98% 分位裁剪关闭
--fill-bestROC 图填充最佳模型曲线下方关闭
--bootstrap-ciROC 图计算 AUC 自助法置信区间关闭
--stats-outputROC 显著性检验结果 CSV无
--importance-outputSHAP 特征重要性表 CSV无
--row-labels热图首列是否作为行标签auto

Outputs

文件说明
<output>.png300/600 dpi 位图,适合预览、PPT、Word 嵌入
<output>.pdf矢量图,适合投稿(期刊要求矢量图时用这个)
<output>_beeswarm.png/pdfSHAP 蜂群图(shap 子命令)
<output>_importance.png/pdf特征重要性条形图(shap 子命令)
<output>_stats.csvROC 模型的 AUC 两两 Z 检验结果(--stats-output)
<output>_importance.csv全部特征的 mean_abs_shap 排名(--importance-output)

Validation

  • ROC:图上的 AUC 标签应与 --stats-output 中的 AUC 一致;随机基线必须标注 AUC = 0.50
  • ROC 统计:Z 检验的样本量 --n-samples 默认 500,是 Hanley-McNeil 近似的假设值; 若实际样本量不同请显式传入,否则 p 值会有偏差
  • 混淆矩阵:所有子图共享同一色阶(脚本已固定全局 vmin/vmax),因此不同模型的 格子颜色可以横向比较;若发现颜色深浅不一致说明数据被拆成了多行
  • 热图:色阶裁剪(--percentile-clip)后极端值会落在色阶边界,需在图注中说明
  • pLDDT:三档配色(>90 绿 / 70–90 蓝 / <70 黄)与 AlphaFold 官方分档一致
  • SHAP:蜂群图的纵轴顺序必须与重要性条形图一致(脚本共用同一 top_features 列表)
  • 通用:生成后检查 PNG 的实际像素尺寸与文字是否被裁切(tight bbox 正常,但极端长的 X 轴标签仍需目视检查)
  • 字体:Arial 缺失时 matplotlib 会回退到 Helvetica/DejaVu Sans, 最终投稿前请确认目标机器已安装 Arial,否则排版会有细微差异

References

  • references/methodology.md —— 样式规范、各图类型的统计方法与色板选择原理
  • references/troubleshooting.md —— 常见报错、列名不匹配、字体与输出问题排查

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Scientific Figures AI skill do?

This skill should be used when generating publication-ready scientific figures — ROC curves, confusion matrix heatmaps, docking binding-energy heatmaps, pLDDT confidence histograms, SHAP summary beeswarms, class distribution charts and other chart types with a unified journal-grade visual style. 用于生成顶刊级出版图表(ROC 曲线、混淆矩阵、热图、pLDDT 分布、SHAP 摘要等)的场景。

Why use Scientific Figures on TypingMind?

Because you install it once and use it with any model. Scientific Figures is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Scientific Figures in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/scientific-figures. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Scientific Figures?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Scientific Figures?

As many as you like. As long as a model supports skills, you can use Scientific Figures with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Scientific Figures AI skill free?

Yes. It is published on GitHub by ssinder under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇