shzhao27208/aut_sci_write/sci-figure
Claude Code and agent skill by shzhao27208/aut_sci_write
- community
Checking that the SKILL.md file is still in the repository.
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".
Install
npx vskill@latest install shzhao27208/aut_sci_write/sci-figureSKILL.md
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:
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):
EXTEND.md Supports: Default DPI | Default output format | Tesseract path
Usage
Options
| Option | Short | Description | Default | |
|---|---|---|---|---|
<input> | PDF file path | Required | ||
--figure | -f | Figure number (1, 2, 3...) | Required (except --list/--all) | |
--subfigure | -s | Sub-figure label (a, b, c...) | None (returns whole figure) | |
--output | -o | Output directory | Current directory | |
--dpi | -d | Output resolution | 600 | |
--list | -l | List all available figure numbers | false | |
--all | Extract all figures | false | ||
--format | Output format (png/jpg) | png | ||
--strategy | Extraction strategy: hybrid/native/cv | hybrid | ||
--ocr | OCR engine: tesseract/easyocr/none | tesseract | ||
--render-page | Render full page with annotations | false | ||
--annotate | Draw bounding boxes on rendered page | false | ||
--bbox | Manual bbox override (x0,y0,x1,y1 in px) | None | ||
--no-trim | Disable whitespace trimming | false | ||
--debug | Enable debug logging | false | ||
--quiet | -q | Suppress info messages | false |
Examples
Output:
Error Handling
| Scenario | Behavior | |
|---|---|---|
| Figure number not found | Error + list all available figure numbers | |
| OCR recognition failed | Return entire figure region | |
| Sub-figure split failed | Return entire figure region | |
| No sub-figure labels found | Return entire figure region |
Tech Stack
| Library | Role | |
|---|---|---|
| pdfplumber | Text + coordinate extraction (caption detection) | |
| PyMuPDF (fitz) | Native image extraction + high-quality page rendering | |
| opencv-python | CV region detection, connected-component analysis, content validation | |
| Pillow | Final cropping, format conversion | |
| pytesseract | OCR for sub-figure label recognition (default) | |
| easyocr | Alternative OCR engine (optional, pip install sci-figure[ocr]) | |
| numpy | Image array operations |
Extraction Engines (v2)
| Engine | Priority | Best For | |
|---|---|---|---|
| Native (PyMuPDF) | 1st | Raster images embedded in PDF | |
| CV (connected-component) | 2nd | Vector graphics, colored plots | |
| Caption-anchored | 3rd | Fallback 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:
| Field | Type | Description | |
|---|---|---|---|
number | int | Figure number | |
page | int | Page index (0-based) | |
bbox_pdf | tuple | Crop region in PDF points (x0, y0, x1, y1) | |
bbox_px | tuple | Crop region in pixels (x0, y0, x1, y1) | |
caption_text | str | Full caption text | |
figure_type | str | One of: figure, scheme, chart, supplementary, extended_data | |
sublabels | list[str] | Sub-figure labels, e.g. ["a","b","c"] | |
image | ndarray | Cropped figure image (numpy array) | |
engine_used | str | Engine 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](../LICENSE) file in the project root.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sci-figure/SKILL.md
Popularity
- Repository stars
- 126
- Repository forks
- 20
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shzhao27208/aut_sci_write/sci-figure)