/open-academic-paper-machine:figure-enginefrom open-academic-paper-machine
Generates, refines, and evaluates academic figures, diagrams, and statistical plots using PaperBanana API with matplotlib/seaborn fallback. Useful for creating publication-quality illustrations for papers.
Ships in open-academic-paper-machine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Orchestration Log: When this skill is activated, append a log entry to
outputs/orchestration_log.md:### Skill Activation: Figure Engine **Timestamp:** [current date/time] **Actor:** AI Agent (figure-engine) **Input:** [brief description of the figure request] **Output:** [brief description of what was produced — e.g., "Generated methodology diagram (fig03_methodology.png), 3 iterations"]
Academic papers need professional figures. This skill eliminates manual design work by using PaperBanana to generate publication-quality diagrams and plots from text descriptions or data files. Claude should produce ACTUAL FIGURES, not describe what to draw.
Based on: Zhu, D., Meng, R., Song, Y., Wei, X., Li, S., Pfister, T., & Yoon, J. (2026). PaperBanana: Automating Academic Illustration for AI Scientists. arXiv:2601.23265. The pipeline uses a 5-agent, 2-phase architecture: Retriever → Planner → Stylist (Phase 1: planning), then Visualizer ↔ Critic iterative refinement (Phase 2: generation) with VLM-as-Judge evaluation. Official research repo:
dwzhu-pku/PaperBanana.
PaperBanana must be installed: pip install paperbanana[mcp,google]
A GOOGLE_API_KEY must be available via one of:
GOOGLE_API_KEY.env file in project root~/.paperbanana.envGet a free key at https://aistudio.google.com/apikey
Note: The PaperBanana MCP server is NOT used. The MCP stdio transport is unreliable (timeouts, hangs, silent failures). Always use the direct Python API.
The plugin ships a helper script scripts/paperbanana_direct.py that calls the
PaperBanana Python API directly via asyncio.run(), completely bypassing the
MCP stdio transport. It outputs JSON to stdout.
The script is at scripts/paperbanana_direct.py inside the plugin directory.
To find it reliably across any installation:
PB_SCRIPT="$(find ~/.claude/plugins -name paperbanana_direct.py -path '*/open-academic-paper-machine/*' 2>/dev/null | head -1)"
For short source contexts (< 1000 chars), pass inline:
PB_SCRIPT="$(find ~/.claude/plugins -name paperbanana_direct.py -path '*/open-academic-paper-machine/*' 2>/dev/null | head -1)" && \
python3 "$PB_SCRIPT" diagram \
--source-context "The research follows a three-stage SLR methodology..." \
--caption "Figure 1: Systematic Literature Review Process" \
--output-dir figures/ \
--filename "fig_method_slr_process.png" \
--iterations 3
For long source contexts, write to a temp file first to avoid shell escaping issues:
# Step 1: Write source context to temp file
cat > /tmp/pb_source_context.txt <<'CTXEOF'
[FULL METHODOLOGY TEXT / FRAMEWORK DESCRIPTION HERE — can be multiple paragraphs,
include all relevant details about components, relationships, and visual structure]
CTXEOF
# Step 2: Generate the figure
PB_SCRIPT="$(find ~/.claude/plugins -name paperbanana_direct.py -path '*/open-academic-paper-machine/*' 2>/dev/null | head -1)" && \
python3 "$PB_SCRIPT" diagram \
--source-context "$(cat /tmp/pb_source_context.txt)" \
--caption "Figure N: Descriptive Caption" \
--output-dir figures/ \
--filename "fig_section_description.png" \
--iterations 3
PB_SCRIPT="$(find ~/.claude/plugins -name paperbanana_direct.py -path '*/open-academic-paper-machine/*' 2>/dev/null | head -1)" && \
python3 "$PB_SCRIPT" plot \
--data '{"categories": ["2020","2021","2022","2023","2024"], "values": [12,25,48,89,156]}' \
--caption "Bar chart showing exponential growth in AI adoption across financial services" \
--output-dir figures/ \
--filename "fig_results_adoption_growth.png" \
--iterations 3
PB_SCRIPT="$(find ~/.claude/plugins -name paperbanana_direct.py -path '*/open-academic-paper-machine/*' 2>/dev/null | head -1)" && \
python3 "$PB_SCRIPT" evaluate \
--generated figures/fig_generated.png \
--reference figures/fig_reference.png \
--context "Original methodology text" \
--caption "Figure caption"
The script prints JSON to stdout:
{"status":"ok","image_path":"figures/fig_name.png","iterations":3,"metadata":{...}}{"status":"error","message":"..."}On success, show the figure to the user using the Read tool on the PNG path.
PaperBanana generation takes 30-180 seconds (3 refinement iterations). Set a generous Bash timeout of 300 seconds (5 minutes) when calling the script.
If PaperBanana is not installed at all, generate figures with Python directly:
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use('Agg')
import seaborn as sns
plt.style.use('seaborn-v0_8-whitegrid')
plt.rcParams.update({
'font.family': 'serif',
'font.size': 11,
'axes.titlesize': 13,
'axes.labelsize': 12,
'figure.figsize': (10, 6),
'figure.dpi': 300,
'savefig.dpi': 300,
'savefig.bbox_inches': 'tight',
})
For methodology diagrams without PaperBanana, use networkx or graphviz:
import networkx as nx
# Build a directed graph and render with matplotlib
Good source context for PaperBanana includes:
The communicative_intent (caption) should describe WHAT the figure communicates, not just what it contains. Good: "Three-pillar model showing how education, process redesign, and encoded judgment sequentially build sovereign AI mastery." Bad: "Figure 1."
Always provide the complete figure environment:
\begin{figure}[htbp]
\centering
\includegraphics[width=\linewidth]{figures/FILENAME.png}
\caption{DESCRIPTIVE CAPTION}
\label{fig:SHORT_LABEL}
\end{figure}
For side-by-side figures:
\begin{figure}[htbp]
\centering
\begin{minipage}{0.48\textwidth}
\centering
\includegraphics[width=\linewidth]{figures/LEFT.png}
\caption{Left caption}
\label{fig:left}
\end{minipage}
\hfill
\begin{minipage}{0.48\textwidth}
\centering
\includegraphics[width=\linewidth]{figures/RIGHT.png}
\caption{Right caption}
\label{fig:right}
\end{minipage}
\end{figure}
fig_SECTION_DESCRIPTION.png
fig_method_prisma_flow.pngfig_results_adoption_by_year.pngfig_framework_sociotechnical.pngWhen used inside the /write-paper pipeline (Phase 4: Production), the figure-engine
should be called automatically for sections that need visual support:
| Section | Typical Figures |
|---|---|
| Methodology | Research design overview, PRISMA flow, sampling diagram |
| Results | Distribution plots, frequency charts, concept maps |
| Discussion | Framework diagram, comparison matrix, implications model |
The writing-engine should reference generated figures with \ref{fig:label} in the text.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tobiasblask/open-paper-machine --plugin open-academic-paper-machine17 skills in this plugin
/audit-engineActivate when the user wants to audit a paper's empirical or technical claims against a linked code repository — checking whether experiments, datasets, models, metrics, and hyperparameters described in the paper actually exist and match the code. Produces a structured audit report classifying each claim as CONFIRMED, PARTIAL, MISSING, or MISMATCH, with file/line evidence. Useful for reproducibility checks, reviewer due diligence, and pre-submission self-audits of ML/CS/empirical papers that ship code.
/coauthor-engineActivate when the user needs to manage multi-author collaboration on a paper. Tracks author contributions using the CRediT taxonomy, manages responsibility assignments, documents the human-AI division of labor, and produces an author contribution statement ready for submission.
/idea-engineActivate when the user needs to evaluate whether a research idea is worth pursuing, brainstorm new research directions, or stress-test a paper concept before committing. This is Phase 0 of the paper machine — the gate that decides whether the full 8-phase pipeline should run. Also activates standalone via /evaluate-idea.
Integrates Carlini's research philosophy (conclusion-first test, taste for problems, kill conditions, unreasonable effort) with structured evaluation (7 dimensions, RS1-RS8 principles, 3 specialist agents).
/latex-engineActivate when the user wants to export a completed paper draft to production-ready LaTeX (.tex) and PDF. Converts draft.md + references.bib + figures/ into a complete arxiv-style LaTeX project with properly resolved \citep/\citet citations, booktabs tables, figure environments, and compiled PDF output.
/literature-engineALWAYS activate when the user needs to find, organize, review, or synthesize academic literature. Uses academic APIs (Semantic Scholar, OpenAlex, CrossRef, arXiv) via scripts/academic_search.py. Handles search strategy, snowballing, screening, concept matrices, narrative synthesis, and literature monitoring (detecting new publications since last search). NEVER use web scraping for paper discovery — APIs first, web search only for verification.
/method-engineActivate when the user needs to select, justify, describe, or execute a research methodology. Provides method selection guidance, complete method section templates, quality criteria, and tool recommendations. Covers SLR, qualitative (case study, Gioia, Mayring, Grounded Theory), quantitative (SEM, regression, survey, experiment), DSR, mixed methods, action research, ethnography, Delphi study, and simulation. Also includes Research Data Management (RDM) guidance for FAIR-compliant data handling.
Other plugins' skills for the same job