From paper-banana
This skill should be used when the user asks to "generate a scientific diagram", "create an academic illustration", "make a figure for my paper", "generate a plot for my paper", "create a publication-ready diagram", "illustrate my methodology", "visualize my paper's architecture", "draw a pipeline diagram", "visualize my method", or "create a chart for my research". Also triggers when the user mentions "PaperBanana", "paper figure", "NeurIPS diagram", "conference figure", or "academic figure".
npx claudepluginhub varunr89/claude-marketplace --plugin paper-bananaThis skill uses the workspace's default tool permissions.
Generate publication-ready scientific diagrams and statistical plots from paper
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Generate publication-ready scientific diagrams and statistical plots from paper methodology sections and figure captions using a multi-agent pipeline.
PaperBanana adapts the PaperVizAgent framework into a Claude-orchestrated pipeline. Claude handles the text reasoning roles (planning, styling, critiquing) while a Python script calls the Gemini API for native image generation (Nano Banana).
The pipeline follows five stages: Retrieve (optional) -> Plan -> Style -> Visualize -> Critique (iterative).
Ensure the following before starting:
pip install google-genai PillowGOOGLE_API_KEY env var (free from https://aistudio.google.com/apikey, no credit card needed, 500 images/day)python ${CLAUDE_PLUGIN_ROOT}/scripts/paper_banana.py setup to download PaperBananaBench for reference-driven generationCollect two pieces of information from the user:
Also determine:
diagram (architectural/framework figures) or plot (statistical charts)1:1, 3:2, 16:9, or 21:9 (default: 16:9 for diagrams, 1:1 for plots)If the PaperBananaBench dataset is available, retrieve relevant reference examples:
python ${CLAUDE_PLUGIN_ROOT}/scripts/paper_banana.py retrieve \
--task diagram \
--content "methodology text here" \
--intent "Figure 1: caption here" \
--data-dir ./data \
--output refs.json
Read the returned reference images using the Read tool to use as in-context examples for the planning step.
Generate a detailed figure description. This is the most critical step.
For diagrams, produce a description that covers:
Use this system context for planning:
Given the methodology section and figure caption, produce a detailed description of an illustrative diagram. The description must be extremely detailed: semantically describe each element and their connections; formally specify background style, colors, line thickness, icon styles. Vague specifications produce worse figures.
For plots, the description must include:
If reference examples were retrieved, use them as few-shot examples to guide the description style and level of detail.
Refine the planned description using the NeurIPS style guidelines.
Read the appropriate style guide:
${CLAUDE_PLUGIN_ROOT}/skills/paper-banana/references/neurips2025-diagram-style-guide.md${CLAUDE_PLUGIN_ROOT}/skills/paper-banana/references/neurips2025-plot-style-guide.mdApply these styling rules:
Output only the refined description with no commentary.
Save the styled description to a temp file and generate the image:
For diagrams:
python ${CLAUDE_PLUGIN_ROOT}/scripts/paper_banana.py generate \
--description-file /tmp/description.txt \
--output figure.png \
--aspect-ratio 16:9
For plots:
python ${CLAUDE_PLUGIN_ROOT}/scripts/paper_banana.py plot \
--description-file /tmp/description.txt \
--output plot.png
The script calls the Gemini API with response_modalities=["IMAGE"] for native image generation
(diagrams) or generates and executes matplotlib code (plots).
After the image is generated, read it with the Read tool (Claude can view images) and perform a critique.
For diagrams, check:
For plots, check:
Present the critique to the user and ask whether to:
If revising, produce a JSON critique:
{
"critic_suggestions": "specific issues found...",
"revised_description": "the full revised description..."
}
The revised description should primarily modify the original, not rewrite from scratch. Run up to 3 critique rounds maximum.
| Variable | Required | Description |
|---|---|---|
GOOGLE_API_KEY | Yes | Free Gemini API key (https://aistudio.google.com/apikey) |
GEMINI_IMAGE_MODEL | No | Image model (default: nano-banana-pro-preview) |
GEMINI_TEXT_MODEL | No | Text model for plot code (default: nano-banana-pro-preview) |
16:9 for wide pipeline/framework diagrams, 1:1 for square module diagrams, 3:2 for balanced layouts.--timeout 600.For detailed styling guidelines, consult:
${CLAUDE_PLUGIN_ROOT}/skills/paper-banana/references/neurips2025-diagram-style-guide.md: Color palettes, shapes, arrows, typography, domain-specific styles for diagrams${CLAUDE_PLUGIN_ROOT}/skills/paper-banana/references/neurips2025-plot-style-guide.md: Color palettes, axes, typography, chart-type-specific guidelines for plotsThe main script at ${CLAUDE_PLUGIN_ROOT}/scripts/paper_banana.py supports:
generate: Render a diagram via Gemini image generationplot: Generate and execute matplotlib code for plotsretrieve: Search PaperBananaBench for relevant reference examplessetup: Download the PaperBananaBench dataset