Academic Figure Generation

VerifiedCaution

Generate framework diagrams and statistical charts from method text using PaperBanana multi-agent framework, and create draw.io diagrams with embedded logo images.

Sby Skills Guide Bot
DocumentationIntermediate
107/27/2026
Claude Code
#academic-figures#multi-agent#diagram-generation#paper-banana#watermark

Recommended for

Our review

Generates academic figures (framework diagrams and statistical charts) from paper method text using the PaperBanana multi-agent framework, and creates portable draw.io diagrams with embedded logo watermarks.

Strengths

  • Automates figure generation from method text
  • Supports both framework diagrams and statistical charts
  • Embeds branding watermark automatically
  • Produces portable draw.io files with embedded images

Limitations

  • Requires setup of PaperBanana repository and model configuration
  • Watermark is mandatory and cannot be removed
  • Quality depends on underlying model and critic iterations
When to use it

When preparing academic papers that need consistent, automatically generated figures from method descriptions.

When not to use it

When you need fine-grained manual control over every element of the figure layout.

Security analysis

Caution
Quality score85/100

The skill uses Bash to clone an external GitHub repository and install its requirements, which is a moderate supply-chain risk. It runs Python scripts that generate figures via network API calls, but does not exfiltrate data or perform destructive actions. No obfuscated or harmful commands detected.

Findings
  • Clones external repository (PaperBanana) and installs dependencies, introducing supply-chain risk.
  • Executes Python scripts that call external AI models, which could incur costs or unintended usage.

Examples

Basic framework diagram
Generate a framework diagram from the following method text: 'We propose a novel architecture consisting of an encoder, a feature extractor, and a classifier. The encoder takes raw input and transforms it into latent features. These features are then passed to the extractor which refines them, and finally to the classifier for prediction.' with caption 'Figure 1: Overall architecture' and save as /path/to/output.png
Statistical chart from data
Generate a statistical chart showing performance comparison between our method (Ours), Baseline A, and Baseline B on accuracy metric. Data: Ours=92.5, A=88.3, B=85.1. Caption: 'Figure 2: Accuracy comparison'. Save as /path/to/chart.png
Portable draw.io diagram
Create a draw.io diagram for a pipeline with three components: Data Input, Processor, and Output. Use the logo from the imgs folder as a watermark. Save as pipeline.drawio

name: paper-banana description: Academic Figure Generation - Generate framework diagrams and statistical charts from method text using PaperBanana multi-agent framework, and create draw.io diagrams with embedded logo images allowed-tools: Bash, Read, Write user-invocable: true

Paper Banana - Academic Figure Generation

MANDATORY WATERMARK RULE: Every image generated by this skill — whether raster (PNG/JPG) via generate_figure.py or draw.io XML via generate_drawio.pyMUST embed the Paper Banana logo (paper-banana/imgs/logo.png) in one corner of the final output as a watermark. This is a non-negotiable branding requirement. When using generate_figure.py, composite the logo onto the output image before saving. When using generate_drawio.py, include an additional logo node anchored to a corner of the canvas.

Automatically generate academic figures from paper method section text using the PaperBanana multi-agent framework (Planner → Visualizer → Critic loop).

Prerequisites

# 1. Clone PaperBanana
git clone https://github.com/paperbanana/PaperBanana.git ~/PaperBanana

# 2. Install dependencies
cd ~/PaperBanana
pip install -r requirements.txt

# 3. Configure model (edit configs/model_config.yaml)
# Set OpenAI-compatible API base URL, API key, and model name

Core Commands

SCRIPT=~/.claude/skills/yjyddq/paper-banana/scripts/generate_figure.py

# Basic usage
python3 $SCRIPT \
  --content "Method text (Markdown format)" \
  --caption "Figure 1: Framework diagram title" \
  --output ./figure.png

# Read content from file
python3 $SCRIPT \
  --content @method_section.md \
  --caption "Figure 1: Pipeline overview" \
  --output ./fig1.png

# High-quality mode (full pipeline + more iterations)
python3 $SCRIPT \
  --content @method.md \
  --caption "Figure 2: Architecture" \
  --output ./fig2.png \
  --exp-mode demo_full \
  --critic-rounds 5

# Generate statistical charts
python3 $SCRIPT \
  --content "Experimental results data..." \
  --caption "Figure 3: Performance comparison" \
  --output ./fig3.png \
  --task plot

CLI Arguments

| Argument | Default | Description | |----------|---------|-------------| | --content | (required) | Method text, supports @filepath to read from file | | --caption | (required) | Figure title / visual intent description | | --output | (required) | Output image path (.png / .jpg) | | --task | diagram | Task type: diagram (framework diagram) or plot (statistical chart) | | --aspect-ratio | 16:9 | Aspect ratio | | --exp-mode | demo_planner_critic | Pipeline mode | | --retrieval-setting | none | Reference retrieval strategy | | --critic-rounds | 3 | Maximum Critic iteration rounds | | --image-model-name | (config file) | Override image generation model | | --paperbanana-dir | ~/PaperBanana | PaperBanana project path |

Pipeline Mode Comparison

| Mode | Workflow | Use Case | |------|----------|----------| | demo_planner_critic | Planner → Visualizer → Critic × N | Fast generation, recommended default | | demo_full | Retriever → Planner → Stylist → Visualizer → Critic × N | More polished, includes style optimization |

Output Format

The script outputs JSON to stdout:

{
  "status": "success",
  "output": "/absolute/path/to/figure.png",
  "format": "PNG",
  "size": "1920x1080",
  "exp_mode": "demo_planner_critic",
  "task": "diagram"
}

On failure:

{
  "status": "error",
  "message": "Error description"
}

Draw.io Diagrams with Embedded Logos

Generate draw.io (diagrams.net) XML files with logo images from imgs/ embedded as base64 data URIs. The resulting .drawio files are fully portable — no external image references needed.

Logo Directory

Place logo images (PNG/JPG/GIF/SVG/WebP) in imgs/ under the skill directory:

paper-banana/imgs/
├── logo.png
├── model_icon.png
└── database.svg

Draw.io Commands

DRAWIO_SCRIPT=~/.claude/skills/yjyddq/paper-banana/scripts/generate_drawio.py

# List available logos
python3 $DRAWIO_SCRIPT --list-logos

# Generate diagram from JSON config file
python3 $DRAWIO_SCRIPT \
  --config @diagram_config.json \
  --output ./architecture.drawio

# Inline JSON config
python3 $DRAWIO_SCRIPT \
  --config '{"nodes":[{"id":"a","label":"Planner","logo":"logo.png","x":100,"y":100},{"id":"b","label":"Visualizer","x":300,"y":100}],"edges":[{"source":"a","target":"b","label":"plan"}]}' \
  --output ./pipeline.drawio

# Custom logo directory
python3 $DRAWIO_SCRIPT \
  --config @config.json \
  --output ./diagram.drawio \
  --logo-dir /path/to/custom/logos

Config JSON Format

{
  "title": "System Architecture",
  "nodes": [
    {"id": "n1", "label": "Planner Agent", "logo": "logo.png", "x": 100, "y": 100, "width": 120, "height": 80, "logo_size": 40},
    {"id": "n2", "label": "Visualizer", "x": 300, "y": 100},
    {"id": "n3", "label": "Critic", "logo": "logo.png", "x": 500, "y": 100}
  ],
  "edges": [
    {"source": "n1", "target": "n2", "label": "plan"},
    {"source": "n2", "target": "n3", "label": "image"}
  ]
}

Node fields:

| Field | Required | Default | Description | |-------|----------|---------|-------------| | id | yes | — | Unique node identifier | | label | no | same as id | Display label | | logo | no | — | Logo filename from imgs/ directory (embedded as base64) | | x, y | no | auto-layout | Position in pixels | | width | no | 120 | Node width | | height | no | 80 | Node height | | logo_size | no | 40 | Logo image size in pixels | | style | no | — | Custom draw.io style string (overrides default) |

Edge fields:

| Field | Required | Default | Description | |-------|----------|---------|-------------| | source / from | yes | — | Source node id | | target / to | yes | — | Target node id | | label | no | "" | Edge label | | style | no | — | Custom draw.io edge style |

Draw.io CLI Arguments

| Argument | Default | Description | |----------|---------|-------------| | --config | (required) | Diagram config: JSON string or @filepath | | --output | (required) | Output .drawio file path | | --logo-dir | imgs/ (skill dir) | Directory containing logo images | | --list-logos | — | List available logos and exit |

Draw.io Output Format

{
  "status": "success",
  "output": "/absolute/path/to/diagram.drawio",
  "format": "drawio",
  "nodes": 3,
  "edges": 2,
  "logos_embedded": ["logo.png"]
}

Comparison with drawio

| Dimension | paper-banana | drawio | |-----------|-------------|--------| | Output type | Raster image (PNG/JPG), AI-generated | Vector graphic (XML), manual/rule-based | | Use case | Paper method diagrams, framework diagrams, schematic illustrations | Flowcharts, ER diagrams, architecture diagrams | | Editability | Non-editable (raster) | Fully editable (XML) | | Visual quality | High (AI-stylized) | Medium (engineering diagram style) | | Generation speed | Slow (multiple AI call rounds) | Fast (direct XML generation) |

Related skills