Skip to content
Projects

Azhi-ss/academic-figure-skills

View on GitHub

About

三个 skill 画论文图:fig-analyze 看材料,fig-draw 先看 6 种风格再出图。交付后询问要不要做成可编辑 PPT,同意后 fig-pptx 才做。npx skills add Azhi-ss/academic-figure-skills

Developer Tools

How these counts are measured

Measured star growth

in 24h
+1
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_EN.md

Original

Academic Figure Skills

English | 简体中文

Version License Stars

Academic paper figure skills for Claude Code, Cursor, Codex & Gemini CLI.
An AI-powered workflow for publication-ready architecture and method diagrams: analyze your repo or paper → choose a visual style before the first render → write a validated spec & render → inspect against the generated image. Once you accept the figure, it offers to convert the diagram into an editable PowerPoint (fig-pptx): a clean background, one intact transparent diagram layer, and native editable text boxes — never slicing icons into a grid and pasting them back.

What is it? Three independently installable agent skills:

  • fig-analyze inspects repositories, paper drafts, and reference figures to extract grounded structure without fabricating modules or metrics.
  • fig-draw locks style, builds a schema-validated FigureSpec, renders via native image generation (or compiles/diagnoses/revises prompts), and runs visual inspection (RenderAudit v2).
  • fig-pptx converts an accepted diagram into an editable .pptx with real native text boxes (only after you confirm).

Before the very first render, if you haven't named a style or provided a reference image to follow, fig-draw displays 6 style previews and pauses for your choice. Saying "draw directly" skips prompt preview, not style selection. The three core surface profiles are pastel-airy-ui, classic-technical, and illustrated-modular; reference-led follows your reference image faithfully without defaulting to hand-drawn styling.

3 skills · 3 core style profiles + reference-led · native Codex rendering · editable PPTX export · Install: npx skills add Azhi-ss/academic-figure-skills -g --all


Quick Start (30 Seconds)

# Install all skills globally (recommended)
npx skills add Azhi-ss/academic-figure-skills -g --all

Then prompt your agent:

  1. "Analyze this repo and generate an architecture figure. If no style is specified, show me previews first, then draw directly without showing the prompt."
  2. "Redraw my framework in the visual style of Figure 2 from this paper; keep the style grammar, do not copy its content."

List available skills before installing:

npx skills add Azhi-ss/academic-figure-skills -l

Style Showcase Gallery

All built-in styles compile prompts into structured Compact Prose with zero Markdown leakage. Canvas titles are omitted by default so they don't duplicate paper captions, unless explicitly requested by the user or reference figure:

Modern Technical Vector
Modern Technical Vector (classic-technical)
Benchmark Paper: DeepSeek-V3 (arXiv:2412.19437) Fig 2 MLA & MoE
Key Traits: Color-coded tensor bars (ht, ctKV), multi-layer attention heatmaps, Top-K gating bar charts, crisp orthogonal routing
📄 View FigureSpec & Prompt
Illustrated Modular: Agentic-MatriBO three-zone closed loop
Illustrated Modular (illustrated-modular)
Style Reference: MLEvolve (arXiv:2606.06473) Fig 1–2 (hand-drawn scientific infographic grammar only; content is Agentic-MatriBO)
Key Traits: Cream canvas, deep navy hand-drawn outlines, blue/peach/green semantic zones, solid execution flow, dashed feedback arrows, and coral STOP exception path
📄 View FigureSpec & Prompt
Pastel Airy UI
Pastel Airy UI (pastel-airy-ui)
Benchmark Papers: Brunzema et al. (arXiv:2608.00316) Fig 1 / SWE-agent (ICML 2024) Fig 2
Key Traits: Clean white canvas with generous whitespace, soft apricot math-surrogate cards, misty ice-blue agent hub, high-contrast evaluation anchors, dashed scope containers
📄 View FigureSpec & Prompt
Purple-Green Contrast & Ablation
Purple-Green Contrast & Ablation
Benchmark Papers: KAN (arXiv:2404.19756) Fig 1 / SimPO (arXiv:2405.14734) Fig 1
Key Traits: High-contrast left/right split panels, Baseline fixed weights vs. Ours learnable B-spline edge activations φ(x) with pure node summation Σ
📄 View FigureSpec & Prompt
Paired Semantic Zones
Paired Semantic Zones
Benchmark Papers: DASH (arXiv:2608.00641) Fig 1 / Agentic-MatriBO Fig 1
Key Traits: Peach/mint/lavender paired color tokens, 2px darker tone-matched borders, clear semantic zone binding, closed-loop dataflow
📄 View FigureSpec & Prompt
Dual-Fidelity Loop & Bayesian Optimization
Dual-Fidelity Loop & Bayesian Optimization
Benchmark Paper: LABO (arXiv:2605.22054) Fig 1 Prior-Guided Initialization & Optimization Loop
Key Traits: Stacked macro containers, dual-fidelity color pairing (coral real-experiment/residual vs. slate-blue LLM surrogate), gating decision diamond, 3D GP response surface
📄 View FigureSpec & Prompt

Legacy repository benchmarks covering stable-diffusion / nanoGPT / ESM / AlphaFold / GraphCast / transformers / CycleGAN / NeRF / DETR / Whisper + sparse fixture serve as structural/keyword smoke tests only; they do not measure semantic accuracy, visual quality, style fidelity, or RenderAudit pass rates.

Prompt Construction, Diagnosis & Revision

Invoke fig-draw directly without maintaining a separate prompt compiler:

What you can ask Deliverable
"Build an English image prompt from these mechanisms; do not render yet" Design brief, complete prompt, items to verify
"Diagnose why this prompt renders cluttered, without editing files" Fault locations, impact, and minimal fix suggestions
"Make the colors richer while keeping all nodes, labels, and edges unchanged" Change/preserve checklist and full updated prompt
"Render directly from this prompt without printing the prompt" Validated internal prompt, generated image, and per-version audit

Design order: reader takeaway → evidence-backed structure → locked style or reference → layout, anchors, and exact labels → explicit edge routing → render → inspect against the image. Style is chosen before layout is finalized—never bolted on as an afterthought. Existing style choices carry over across revisions without re-opening the preview menu. Fixing a misrouted arrow edits only the endpoints without collapsing the established layout into a row of equal-sized icons.

See Prompt Design Logic, JSON-to-Prompt Compiler & Templates, and Vector Backends. This design draws inspiration from Nuwa's thematic framework methodology, with zero Nuwa runtime dependencies.

Separating Audit Records from Visual Truth

RenderAudit v2 binds audit records to the actual image/spec SHA-256 hashes and tracks every node and edge as pass / fail / unverified. Use init_render_audit.py --clean-metadata to strip metadata and scaffold a complete node/edge ledger, then inspect the image visually, fill in the ledger, and validate:

python3 fig-draw/scripts/init_render_audit.py \
  --spec figure.spec.json --image figure.png --out figure.audit.json --clean-metadata
python3 fig-draw/scripts/validate_render_audit.py \
  --spec figure.spec.json --image figure.png figure.audit.json

Exit codes: 0 = complete record and all assertions pass; 1 = valid record but failed acceptance; 2 = missing entries, hash mismatch, or contradictory states. Validators cannot see the image—neither FigureSpec validation nor audit validation replaces real visual inspection.

Skills Overview

Skill Purpose Example Triggers
fig-draw Style, palette, prompt construction/diagnosis/revision, FigureSpec, native rendering, visual auditing, and targeted edits; delegates repo/paper/draft/reference analysis to fig-analyze design paper figure, build figure prompt, full academic figure workflow, render with Codex
fig-analyze Inspects codebases, paper drafts, and reference images to emit SemanticArchitecture@1, FigurePlan@1, and ReferenceAnalysis@1; never writes prompts or renders analyze repo for figure, extract paper architecture, analyze reference figure
fig-pptx Converts an accepted diagram into an editable PowerPoint with a clean background, one intact diagram layer, and native text boxes; never slices into icon tiles; never mutates source PNG convert figure to editable PPTX, fig-pptx

fig-pptx works standalone with all references and scripts bundled inside its skill directory, writing outputs to .fig-pptx/<run-id>/. See fig-pptx/references/layers.md for the layer spec and layout.json schema. Script pipeline: probe_palette.py → pick_font.py (pass --cjk for Chinese text) → chroma_key.py (non-solid backgrounds only) → detect_text_boxes.py → layout_guard.py → compose_pptx.py. Dependencies: python-pptx, pillow, numpy.

End-to-End Workflow

Hand over a repo, paper, URL, reference figure, or an already-specified structure. When source evidence needs verification, fig-analyze runs first; when your structure is already clear, fig-draw starts immediately.

Source material or described structure
        ↓
Analyze evidence when needed (fig-analyze)
        ↓
First render gate: show 6 style previews & wait for selection
(skipped if style is named or a reference image is provided)
        ↓
Write & validate FigureSpec → Render image
        ↓
Inspect against image (RenderAudit v2) → up to 2 targeted edits
(never collapses layout into uniform icon strips)
        ↓
Deliver figure & ask whether to export editable PPTX
        ↓
Only after your confirmation → fig-pptx builds editable PPTX

Reference images can be passed to the image model to transfer composition, stroke language, zoning, typography, and emphasis—never copying the reference's labels, topology, or claims.

Native Codex Rendering & Targeted Revision

In Codex, the workflow calls the session's native image_gen.imagegen (or image_gen__imagegen). prompt is an internal tool parameter; when you ask to "draw directly / don't show prompt", it is not echoed back for copy-pasting.

Revisions patch observed defects on the current image rather than redrawing from scratch:

  1. View the current best render at original detail and generate a hash-bound RenderAudit v2;
  2. Pass that image as the first item in referenced_image_paths;
  3. Specify only observed defects, exact fixes, and preserved regions;
  4. Save r0 / r1 / r2 versions and re-audit after each edit;
  5. Cap at 2 semantic revision rounds after the initial render (transient transport retries don't count).

Visible text is written by rendered glyph appearance (e.g., "italic F with subscript θ") rather than raw LaTeX (F_{\theta}) or underscores; CJK labels must match verbatim. If raster text remains unstable after targeted fixes, keep the best raster image, note residual text issues, and—after delivery and confirmation—hand off to fig-pptx to replace text with real PowerPoint text boxes. Deterministic vector backends (HTML/CSS+SVG, Typst) are used only when explicitly authorized for dense equations, tables, or empirical plots.

Core Surface Profiles + Reference-Led Mode

Profile Visual Character Best For
pastel-airy-ui White canvas, soft pastel cards, subtle elevation; color lives on tokens, pills, and curves Recommended default: business/system mechanism diagrams, clean presentation slides, token flows
classic-technical Exact nodes/edges, restrained linework, crisp topology; pairs with Okabe-Ito, blue, or grayscale Tensor dimensions, neural architectures, print-ready top-venue main figures
illustrated-modular Asymmetric semantic zones, dark rounded outlines, open linework inside zones; subcards only for true grouping Explicitly requested hand-drawn or editorial scientific narratives (not default)
reference-led Preserves observed composition, surface, stroke, and emphasis grammar from your reference image Reference-guided figures that presets cannot faithfully summarize

Not sure where to start? Just ask:

  • "Walk me through from repo to paper figure"
  • "Full academic figure workflow"
  • "Which skill should I use first?"

Installation

Option 1: npx skills (Recommended)

This repository is public; npx skills pulls directly from GitHub (main updates distribution immediately without npm publish):

# Install all skills globally (recommended)
npx skills add Azhi-ss/academic-figure-skills -g --all

# List skills without installing
npx skills add Azhi-ss/academic-figure-skills -l

# Install a single skill
npx skills add Azhi-ss/academic-figure-skills -g -s fig-draw -y

# Update to latest main
npx skills update Azhi-ss/academic-figure-skills -g -y

# List installed skills
npx skills list -g

Full URL form:

npx skills add https://github.com/Azhi-ss/academic-figure-skills -g --all

Discovery on skills.sh: search academic-figure-skills or owner azhi-ss.

Option 2: Manual Symlink (Development)

git clone https://github.com/Azhi-ss/academic-figure-skills.git
# Symlink individual skill folders into your agent's skills directory, e.g.:
# ln -s "$PWD/fig-draw" ~/.claude/skills/fig-draw

Using npx skills add is recommended so you don't accidentally copy the entire monorepo into your skills directory.

Upgrading from 3.x

Legacy skills (academic-figure-designer, academic-repo-analyzer, academic-figure-draft-analyzer, academic-figure-architecture-extractor) have been consolidated into fig-draw and fig-analyze. Remove old skills first, then install the current pack:

npx skills remove --global academic-figure-designer academic-repo-analyzer academic-figure-draft-analyzer academic-figure-architecture-extractor
npx skills add Azhi-ss/academic-figure-skills -g --all

Usage Examples

# Case 1: Repository to Figure
You: Analyze this repo and draw the architecture directly without showing the prompt.
AI:  [Reads repo → if no style chosen, shows 6 style previews & pauses
      → writes & validates FigureSpec → renders → runs RenderAudit v2
      → delivers figure & asks whether to export an editable PPTX]
# Case 2: Paper Figure as Style Reference
You: Redraw my framework in the style of Figure 2 from this arXiv paper—style only, not content.
AI:  [Parses paper URL & figure → ReferenceAnalysis v1 → style grammar
      → reference-conditioned generation]
# Case 3: Targeted Revision on an Existing Render
You: Keep the layout; only fix garbled text, transparent background, and the extra node.
AI:  [view_image(original) → RenderAudit v2 → passes current best image first
      → targeted image edit → re-audit; up to 2 rounds]

Style Profiles & Color Palettes

Single source of truth: fig-draw/references/styles/ and fig-draw/references/palettes.md. See docs/styles.md for the style overview.

Profile When to Use Core Visuals Reference Papers
classic-technical
(Modern Technical Vector)
Deep learning architectures, tensor flows, exact technical topologies Color-coded tensor bars, attention heatmaps, gating histograms, orthogonal routing DeepSeek-V3 (2024) Fig 2
DiT (ICCV 2023) Fig 2
Mamba (ICML 2024) Fig 1
illustrated-modular Scientific workflows, AI4Science, multi-agent loops, editorial storytelling Asymmetric semantic zones, open linework, hand-lettered headers; subcards only for real grouping MLEvolve (2026) Fig 1–2 (style ref)
Agentic-MatriBO Fig 1
pastel-airy-ui LLM token flows, agent UI loops, conceptual decision cycles Clean white floating cards, terminal/UI snippets, soft pastel tokens/pills, high whitespace SWE-agent (ICML 2024) Fig 2
ReAct (ICLR 2023) Fig 1
Reflexion (NeurIPS 2023) Fig 1
reference-led User supplies a reference figure whose visual grammar shouldn't be overridden by presets Inherits observed surface/composition faithfully without auto-converting to pastel hand-drawn Any user-provided venue figure

Palette selection follows: User request → Reference style grammar → Print/accessibility constraints → Semantic roles → Safe default (venue names or module counts alone never force a palette). See fig-draw/references/palettes.md for all 12 classic presets (Okabe-Ito, Nature Blue, Blue Monochrome, Warm Earth, Purple-Green, Grayscale, Teal-Coral, ML TopConf Tab10, ML TopConf Colorblind, ML TopConf Deep, Print-Safe Gray, Journal Standard).

Documentation & Resources

Document Description
fig-draw/references/palettes.md 12 classic presets, paired semantic tokens, and palette routing rules
docs/styles.md Style catalog overview (definitions in fig-draw/references/styles/)
fig-draw/references/vector-backends.md Deterministic vector backend rules (HTML/CSS+SVG and Typst)
fig-draw/references/codex-image-workflow.md Native image tool parameters, reference edits, and safe invocation
fig-draw/references/render-audit.md RenderAudit v2: image/spec hash binding, edge-by-edge checks, targeted edits
fig-analyze/references/missing-info-policy.md Unified policy when source evidence has gaps
CHANGELOG.md Version history
CONTRIBUTING.md Contribution guide
docs/academic-references.md Academic references
fig-pptx/SKILL.md Entry point for editable PowerPoint export
fig-pptx/references/layers.md Background, intact diagram frame, native text boxes, and layout.json spec
fig-pptx/scripts/ Palette probing, cross-platform font selection, bbox detection, chroma-key, layout guard, PPTX composer
docs/best-practices.md Reference-driven design, readability, and post-render auditing
examples/ End-to-end handoff examples

FAQ

Q: Are prompts generated in English or Chinese?

A: The JSON FigureSpec and image-model prompts are written in English; user-facing explanations follow your conversation language.

Q: Do I have to run the full pipeline every time?

A: No. You can run fig-analyze alone for evidence extraction, fig-draw alone for prompt design/rendering, or fig-pptx alone on an existing diagram.

Q: Can Codex render directly without showing me the prompt?

A: Yes—say "render directly / don't show prompt" to waive prompt review. However, if you haven't named a style or supplied a reference image on the first render, fig-draw will still show the 6 style previews and pause for your choice before calling the image generator.

Q: What's new in 4.6.0?

A: Streamlined and unified fig-draw/SKILL.md and prompt references (removed redundant rules and fixed LaTeX remnants in built-in .spec.json files); added init_render_audit.py for one-step metadata stripping, SHA-256 binding, and RenderAudit@2 ledger scaffolding; fixed macOS /var//tmp symlink handling and cross-platform font selection in fig-pptx; added solid-background fast path and diff-based detect_text_boxes.py in fig-pptx; added vector-backends.md and the evals/ benchmark & real-render evaluation suite.

Citation

If this skill pack helps your research or workflow, you can cite it as:

@software{academic-figure-skills,
  author = {Azhi-ss},
  title = {Academic Figure Skills: AI-powered academic figure generation skill pack},
  year = {2026},
  url = {https://github.com/Azhi-ss/academic-figure-skills},
  version = {4.6.0}
}

License

MIT License

Acknowledgments

Inspired and supported by the LINUX DO community.

Explore related projects

Loading…