Sci Figure logo

Sci Figure

Community
ShZhao27208
sci-figure

Extracts figures and sub-figures from academic PDF papers. Supports Fig/Figure, Scheme, Chart, Supplementary Figure, Extended Data Figure (Nature), and Chinese equivalents (图/方案/示意图/附图/补充图). Sub-figure label recognition supports (a)/(A)/a)/(i)/(1)/a. formats. High-quality PNG output at configurable DPI. Use when user asks to "extract figure", "截取文献图片", "提取子图", "get figure from paper", "Scheme", "方案图", "补充图", "Supplementary Figure", or "Extended Data".

Overview

PublisherShZhao27208
RepositoryAut_Sci_Write
Skill namesci-figure
Stars
211
Forks
28
Bundled files
27
LicenseAGPL-3.0-or-later
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.

  • 27 bundled files

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

  • Open source

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

Installation

Install the Sci Figure 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/ShZhao27208/Aut_Sci_Write/tree/main/skills/sci-figure
  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/ShZhao27208/Aut_Sci_Write.git /tmp/Aut_Sci_Write
mkdir -p .claude/skills
cp -r /tmp/Aut_Sci_Write/skills/sci-figure .claude/skills/sci-figure
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sci Figure 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 Sci Figure 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 Sci Figure 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.

Sci-Figure — Scientific Figure Extractor

Precisely extract figures and sub-figures from academic PDF papers.

License note: sci-figure is licensed under AGPL-3.0-or-later because it links PyMuPDF (fitz), which is AGPL-licensed.

Installation

Install the package from the skill directory before first use:

bash
cd ${SKILL_DIR}
pip install -e .

This registers the sh-sci-fig CLI command. Requires Tesseract OCR:

  • Windows: winget install UB-Mannheim.TesseractOCR
  • Linux: apt install tesseract-ocr
  • macOS: brew install tesseract

Preferences (EXTEND.md)

Use Bash to check EXTEND.md existence (priority order):

bash
# Check project-level first
test -f .baoyu-skills/sci-figure/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/sci-figure/EXTEND.md" && echo "user"

EXTEND.md Supports: Default DPI | Default output format | Tesseract path

Usage

bash
sh-sci-fig <input.pdf> [options]

Options

OptionShortDescriptionDefault
<input>PDF file pathRequired
--figure-fFigure number (1, 2, 3...)Required (except --list/--all)
--subfigure-sSub-figure label (a, b, c...)None (returns whole figure)
--output-oOutput directoryCurrent directory
--dpi-dOutput resolution600
--list-lList all available figure numbersfalse
--allExtract all figuresfalse
--formatOutput format (png/jpg)png
--strategyExtraction strategy: hybrid/native/cvhybrid
--ocrOCR engine: tesseract/easyocr/nonetesseract
--render-pageRender full page with annotationsfalse
--annotateDraw bounding boxes on rendered pagefalse
--bboxManual bbox override (x0,y0,x1,y1 in px)None
--no-trimDisable whitespace trimmingfalse
--debugEnable debug loggingfalse
--quiet-qSuppress info messagesfalse

Examples

bash
# Extract Figure 2, sub-figure c
sh-sci-fig paper.pdf -f 2 -s c

# Extract entire Figure 3
sh-sci-fig paper.pdf -f 3

# List all available figures in a PDF
sh-sci-fig paper.pdf --list

# Extract all figures
sh-sci-fig paper.pdf --all

# Custom output directory and DPI
sh-sci-fig paper.pdf -f 2 -s c -o ./output/ -d 300

# Use EasyOCR for sub-figure label detection
sh-sci-fig paper.pdf --all --ocr easyocr

# CV-only strategy (skip native extraction)
sh-sci-fig paper.pdf --all --strategy cv

# Render page with annotated bounding boxes (debugging)
sh-sci-fig paper.pdf -f 1 --render-page --annotate

# Manual bbox extraction (multimodal correction)
sh-sci-fig paper.pdf -f 1 --bbox 100,200,800,1200

Output:

Extracted: figure_2c.png (1920x1080, 600 DPI)

Error Handling

ScenarioBehavior
Figure number not foundError + list all available figure numbers
OCR recognition failedReturn entire figure region
Sub-figure split failedReturn entire figure region
No sub-figure labels foundReturn entire figure region

Tech Stack

LibraryRole
pdfplumberText + coordinate extraction (caption detection)
PyMuPDF (fitz)Native image extraction + high-quality page rendering
opencv-pythonCV region detection, connected-component analysis, content validation
PillowFinal cropping, format conversion
pytesseractOCR for sub-figure label recognition (default)
easyocrAlternative OCR engine (optional, pip install sci-figure[ocr])
numpyImage array operations

Extraction Engines (v2)

EnginePriorityBest For
Native (PyMuPDF)1stRaster images embedded in PDF
CV (connected-component)2ndVector graphics, colored plots
Caption-anchored3rdFallback when above engines fail

The hybrid strategy (default) tries all three in order and validates results.

Detected Figure Fields

Each figure returned by FigureExtractor.detect_all() is a dict with these keys:

FieldTypeDescription
numberintFigure number
pageintPage index (0-based)
bbox_pdftupleCrop region in PDF points (x0, y0, x1, y1)
bbox_pxtupleCrop region in pixels (x0, y0, x1, y1)
caption_textstrFull caption text
figure_typestrOne of: figure, scheme, chart, supplementary, extended_data
sublabelslist[str]Sub-figure labels, e.g. ["a","b","c"]
imagendarrayCropped figure image (numpy array)
engine_usedstrEngine that produced the crop: native, cv, or fallback

list_figures() returns the same dicts without the image field.

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.


© License & Copyright

Aut_Sci_Write — Autonomous Scientific Writer

  • Author: Shuo Zhao
  • License: MIT License
  • Copyright: © 2026 Shuo Zhao. All rights reserved.
  • Original Work: This is an original work created by the author. No reproduction, redistribution, or commercial use without explicit permission. Permission is hereby granted, free of charge, to any person obtaining a copy of this software... (See the LICENSE file in the root directory for the full MIT terms.)

This skill is part of the Aut_Sci_Write suite. For full license terms, see the LICENSE file in the project root.

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 Sci Figure AI skill do?

Extracts figures and sub-figures from academic PDF papers. Supports Fig/Figure, Scheme, Chart, Supplementary Figure, Extended Data Figure (Nature), and Chinese equivalents (图/方案/示意图/附图/补充图). Sub-figure label recognition supports (a)/(A)/a)/(i)/(1)/a. formats. High-quality PNG output at configurable DPI. Use when user asks to "extract figure", "截取文献图片", "提取子图", "get figure from paper", "Scheme", "方案图", "补充图", "Supplementary Figure", or "Extended Data".

Why use Sci Figure on TypingMind?

Because you install it once and use it with any model. Sci Figure 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 Sci Figure in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ShZhao27208/Aut_Sci_Write/tree/main/skills/sci-figure. 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 Sci Figure?

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 Sci Figure?

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

Is the Sci Figure AI skill free?

Yes. It is published on GitHub by ShZhao27208 under the AGPL-3.0-or-later 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 👇