# extract-figures

extract-figures pulls figures, charts, diagrams, and images from .docx, converts EMF/WMF assets to PNG, and prepares LaTeX usage notes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 240 repo stars
- Author: franklee16
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/franklee16/academic-research-skills/tree/HEAD/output-tools/extract-figures/SKILL.md
- Updated: 2026-09-18
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/extract-figures

## What it does

This skill exports embedded media from a Word document into a `figures/` folder beside the source `.docx`. EMF, WMF, EMZ, and WMZ files become 300 DPI PNGs; PNG, JPG, GIF, and BMP assets are copied in their existing formats.

The bundled `scripts/extract_figures.py` script opens the DOCX archive, maps relationship IDs to media files, walks the document XML, and looks for nearby captions such as “Figure N”. It writes position-based names like `img_001.png`, a `_manifest.json` mapping, and a draft `_readme_draft.md` file.

The workflow includes checking image content when a figure has multiple panels, then correcting filenames and the manifest if visual order differs from XML order. Python plus `python-docx` and `Pillow` are required before the skill can run.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill extract-figures -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/extract-figures/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/extract-figures/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill extract-figures -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/extract-figures/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill extract-figures -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/extract-figures/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install franklee16/academic-research-skills output-tools/extract-figures/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/extract-figures/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill extract-figures -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/franklee16/academic-research-skills --path output-tools/extract-figures
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/extract-figures/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/franklee16/academic-research-skills/tree/HEAD/output-tools/extract-figures/SKILL.md

## When to use it
- export every image from a `.docx` file
- convert EMF and WMF artwork for LaTeX
- match extracted files with Figure N captions
- check panel order in compound figures
- prepare a README with LaTeX snippets

## Example prompts
- Extract every figure, chart, and image from `paper.docx` into `figures/`.
- Pull the diagrams from `manuscript.docx`, convert vector assets to PNG, and create LaTeX usage notes.
- Check the panel order in figures from `Draft/results.docx` and update the manifest filenames.

## Similar
- [tikz-scientific-figures](https://affpapa.org/en/nevibecode/skills/tikz-scientific-figures.md) — skill · ★ 108 repo stars
- [figure-designer](https://affpapa.org/en/nevibecode/skills/figure-designer.md) — skill · 919 installs
- [nature-paper2word](https://affpapa.org/en/nevibecode/skills/nature-paper2word.md) — skill · 1400 installs
- [bestpaper-writing](https://affpapa.org/en/nevibecode/skills/bestpaper-writing.md) — skill · ★ 424 repo stars
- [paper-figure-guide](https://affpapa.org/en/nevibecode/skills/paper-figure-guide.md) — skill · ★ 88 repo stars
- [paper-figure](https://affpapa.org/en/nevibecode/skills/paper-figure.md) — skill · 687 installs

From the same set: [franklee16/academic-research-skills](https://affpapa.org/en/nevibecode/by/franklee16/academic-research-skills.md) — 98 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
