paper-illustration
Generate publication-quality AI illustrations for academic papers using Gemini image generation. Creates architecture diagrams, method illustrations with Claude-supervised iterative refinement loop. Use when user says "生成图表", "画架构图", "AI绘图", "paper illustration", "generate diagram", or needs visual
By wanshuiyin · 422 installs
npx skills add wanshuiyin/auto-claude-code-research-in-sleep --skill paper-illustration
Source repository · Upstream listing
Paper Illustration: Multi Stage Claude Supervised Figure Generation
Generate publication quality illustrations using a multi stage workflow with Claude as the STRICT supervisor/reviewer .
Core Design Philosophy
Constants
IMAGE MODEL = gemini 3 pro image preview — Paperbanana (Nano Banana Pro) for image rendering
REASONING MODEL = gemini 3 pro preview — Gemini for layout optimization and style checking
MAX ITERATIONS = 5 — Maximum refinement rounds
TARGET SCORE = 9 — Minimum acceptable score (1 10) — RAISED FOR QUALITY
OUTPUT DIR = figures/ai generated/ — Output directory
API KEY ENV = GEMINI API KEY — Environment variable
Optional: Style reference ( — style ref: <source , opt in)
Lets the user steer structural figure conventions (caption length, panel count distribution, figure to table ratio in the parent paper) toward a reference paper. Default OFF — when the user does not pass — style ref , do nothing differently from before.
Only when — style ref: <source appears in $ARGUMENTS , run the helper FIRST, before generating prompts:
Sources accepted: local TeX dir / file, local PDF, arXiv id, http(s) URL. Overleaf URLs/IDs are rejected — clone via /overleaf sync setup <id first and pass the local clone path.
Strict rules (full contract in tools/extract paper style.py docstring):
Use style profile.md to align caption length and figure density with the reference paper. The CVPR/ICLR/NeurIPS visual standards above still take precedence — style ref only refines length and density tendencies, never image content.
Never copy figure content, color palettes, or specific design elements from anything reachable through the cache. The visual design comes from the user's prompt, not the reference.
Never pass — style ref (or the cache contents) to the Claude vision checker / Gemini reasoning checker sub agents when they score the generated image — the image must be judged on its own merits.
CVPR/ICLR/NeurIPS Top Tier Conference Style Guide
What "CVPR Style" Actually Means:
Visual Standards
Clean white background — No decorative patterns or gradients (unless subtle)
Sans serif fonts — Arial, Helvetica, or Computer Modern; minimum 14pt
Subtle color palette — Not rainbow colors; use 3 5 coordinated colors
Print friendly — Must be readable in grayscale (many reviewers print papers)
Professional borders — Thin (2 3px), solid colors, not flashy
Layout Standards
Horizontal flow — Left to right is the standard for pipelines
Clear grouping — Use subtle background boxes to group related modules
Consistent sizing — Similar components should have similar sizes
Balanced whitespace — Not cramped, not sparse
Arrow Standards (MOST CRITICAL)
Thick strokes — 4 6px minimum (thin arrows disappear when printed)
Clear arrowheads — Large, filled triangular heads
Dark colors — Black or dark gray ( 333333); avoid colored arrows
Labeled — Every arrow should indicate what data flows through it
No crossings — Reorganize layout to avoid arrow crossings
CORRECT DIRECTION — Arrows must point to the RIGHT target!
Visual Appeal (科研风格 Professional Academic Style)
目标:既不保守也不花哨,找到平衡点
✅ 应该有的视觉元素:
Subtle gradient fills — 淡雅的渐变填充(同色系从浅到深),不是炫彩
Rounded corners — 圆角矩形(6 10px radius),现代感但不夸张
Clear visual hierarchy — 通过大小、颜色深浅区分层次
Consistent color coding — 统一的配色方案(3 4种主色)
Internal structure — 大模块内部显示子组件(如Encoder内部的layer结构)
Professional typography — 清晰的标签,适当的字号层次
✅ 配色建议(学术专业):
Inputs : 柔和的绿色系 ( 10B981 / 34D399)
Encoders : 专业的蓝色系 ( 2563EB / 3B82F6)
Fusion : 优雅的紫色系 ( 7C3AED / 8B5CF6)
Outputs : 温暖的橙色系 ( EA580C / F97316)
Arrows : 黑色或深灰 ( 333333 / 1F2937)
Background : 纯白 ( FFFFFF),不要花纹
❌ 要避免的过度装饰:
❌ Rainbow color schemes (彩虹配色)
❌ Heavy drop shadows (重阴影效果)
❌ 3D effects / perspective (3D透视)
❌ Excessive gradients (夸张的多色渐变)
❌ Clip art / cartoon icons (卡通图标)
❌ Decorative patterns in background (背景花纹)
❌ Glowing effects (发光效果)
❌ Too many small icons (过多小图标)
✓ 理想的视觉效果:
一眼看上去 专业、清晰
有 适度的视觉吸引力 ,但不抢眼
符合 CVPR/NeurIPS论文 的审美标准
打印友好 (灰度模式下也能清晰辨认)
像 精心设计 的学术图表,而不是PPT模板
What to AVOID (CRITICAL)
❌ Rainbow color schemes (too many colors)
❌ Thin, hairline arrows (arrows must be THICK)
❌ Unlabeled connections
❌ Plain boring rectangles (add some visual interest)
❌ Over decorated with shadows/glows/icons (too flashy)
❌ Small text that's unreadable when printed
❌ WRONG arrow directions — This is UNACCEPTABLE!
Scope
Figure Type Quality Examples
Architecture diagrams Excellent Model architecture, pipeline, encoder decoder
Method illustrations Excellent Conceptual diagrams, algorithm flowcharts
Conceptual figures Good Comparison diagrams, taxonomy trees
Not for: Statistical plots (use /paper figure ), photo realistic images
Workflow: MUST EXECUTE ALL STEPS
Step 0: Pre flight Check
Step 1: Claude Plans the Figure (YOU ARE HERE)
CRITICAL: Claude must first analyze the user's request and create a detailed prompt.
Parse the input: $ARGUMENTS
Claude's task:
1. Understand what figure the user wants
2. Identify all components, connections, data flow
3. Create a detailed, structured prompt for Gemini
4. Include style requirements AND visual appeal requirements
Prompt Template for Claude to generate:
Step 2: Gemini Layout Optimization (gemini 3 pro)
Claude sends the initial prompt to Gemini (gemini 3 pro) for layout optimization.
Step 3: Gemini Style Verification (gemini 3 pro)
Claude sends the optimized layout to Gemini for CVPR/NeurIPS style verification.
Step 4: Paperbanana Image Rendering (gemini 3 pro image preview)
Claude sends the optimized, style verified specification to Paperbanana for rendering.
Step 5: Claude STRICT Visual Review & Scoring (MANDATORY)
Claude MUST read the generated image and perform a STRICT review:
1. Visual Analysis : What does the image show in detail?
2. Strengths : What's good about it?
3. STRICT Verification : Check EVERY item below
4. Score : Rate 1 10 (10 = perfect) — BE STRICT!
STRICT Review Template:
Step 6: Decision Point
Step 7: Generate Improvement Prompt (for refinement)
Claude generates TARGETED improvement prompt with EXACT issues:
Step 8: Final Output
When figure is accepted (score ≥ 9):
Key Rules (MUST FOLLOW STRICT)
1. NEVER skip the review step — Always read and STRICTLY score the image
2. NEVER accept score < 9 — Keep refining until excellence
3. VERIFY EVERY ARROW DIRECTION — Wrong direction = automatic fail (score ≤ 6)
4. VERIFY EVERY BLOCK CONTENT — Wrong content = automatic fail (score ≤ 7)
5. BE SPECIFIC in feedback — "Arrow from A to B points to wrong target C" not "arrow is wrong"
6. SAVE all iterations — Keep version history for comparison
7. Claude is the STRICT boss — Accept only excellence, not "good enough"
8. ARROW CORRECTNESS IS NON NEGOTIABLE — Any wrong arrow direction = reject
9. VISUAL APPEAL MATTERS — Plain boring figures = score ≤ 8
10. Target score is 9 — Not 8, not "good enough"
11. USE MULTI STAGE WORKFLOW — Claude → Gemini Layout → Gemini Style → Paperbanana → Claude Review
12. USE CORRECT MODELS — gemini 3 pro for reasoning, gemini 3 pro image preview for rendering
Output Structure
Model Summary
Stage Model Purpose
Step 1 Claude Parse request, create initial prompt
Step 2 gemini 3 pro Layout optimization (positioning, spacing, grouping)
Step 3 gemini 3 pro CVPR/NeurIPS style verification
Step 4 gemini 3 pro image preview (Paperbanana) High quality image rendering
Step 5 Claude STRICT visual review and scoring