Community影像github.com

figure-studio

Unified publication-grade diagram and illustration studio with progressive four-mode routing. Mode 1 (primary default) authors pure editable vector SVG + 2x PNG figures with grounded 3-step dual crisp palettes (Crisp Sapphire & Journal Bright), 28 diverse spatial archetypes, genuine official brand marks, micro-visuals, and strict XML + headless Chromium DOM geometry auditing for academic papers, open-source READMEs, and engineering RFCs. Mode 2 handles generative-image hybrid composites (vector skeleton + transparent AI-generated focal illustrations) and multi-stage conceptual raster illustrations. Mode 3 produces publication-ready statistical charts from real data via Python Matplotlib. Mode 4 extracts ground-truth topologies from source code, SQL, Kubernetes YAML, Docker Compose, OpenAPI, Mermaid, or legacy .drawio files to redraw as publication SVG or optionally emit editable .drawio files.

figure-studio 是什麼?

figure-studio is a Claude Code agent skill that unified publication-grade diagram and illustration studio with progressive four-mode routing. Mode 1 (primary default) authors pure editable vector SVG + 2x PNG figures with grounded 3-step dual crisp palettes (Crisp Sapphire & Journal Bright), 28 diverse spatial archetypes, genuine official brand marks, micro-visuals, and strict XML + headless Chromium DOM geometry auditing for academic papers, open-source READMEs, and engineering RFCs. Mode 2 handles generative-image hybrid composites (vector skeleton + transparent AI-generated focal illustrations) and multi-stage conceptual raster illustrations. Mode 3 produces publication-ready statistical charts from real data via Python Matplotlib. Mode 4 extracts ground-truth topologies from source code, SQL, Kubernetes YAML, Docker Compose, OpenAPI, Mermaid, or legacy .drawio files to redraw as publication SVG or optionally emit editable .drawio files.

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/milkfrogdev/figure-studio/tree/HEAD

Installed? Explore more 影像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Figure Studio

Unified four-mode visual engineering skill. Mode 1 (Pure Vector SVG) is the primary default engine covering ~75% of all technical and academic diagram needs. Load only the single mode manual matched by the router below so context stays focused and rules never collide.

Resolve this skill root as <SKILL> (typically ~/.agents/skills/figure-studio or your host's installed skills directory).


1. Mode Router (Pick Exactly One Primary Mode)

Evaluate the user's request top-to-bottom and commit to one mode before reading its manual:

PriorityUser Intent / SignalModeManual to Read (Load ONLY This One)
Default (Primary)System/software architecture, open-source README hero diagram, company technical RFC, algorithm pipeline, multi-agent framework, conceptual comparison, capability taxonomy, sequence/state/ERD/layer/flow diagrams where text accuracy and crisp layout matterMode 1: Publication Vector SVGreferences/mode-vector-svg.md
Conditional AFigure explicitly requires photorealistic/3D/organic/physical subjects SVG cannot draw well (robots, 3D point clouds, molecules, hardware scenes, physical environments) OR user explicitly requests an AI image-model conceptual poster / artistic hero teaserMode 2: Generative Hybrid & Conceptreferences/mode-hybrid-image.md
Conditional BQuantitative data plots driven by real datasets or experimental tables (multi-series line/ablation curves, heatmaps, box/violin/scatter plots, load-test latency percentiles, multi-panel experimental plots)Mode 3: Publication Data Plotsreferences/mode-data-plots.md
Conditional CUser supplies a local codebase, SQL schema, Docker Compose, Kubernetes YAML, OpenAPI spec, Mermaid block, or legacy .drawio file to map/redraw OR explicitly asks for an editable .drawio deliverable for teammates to drag-editMode 4: Source Extract & Draw.io Bridgereferences/mode-source-drawio.md

Routing Reinforcement Rules

  • When in doubt between Mode 1 and Mode 2: Default to Mode 1. Never route text-heavy architectures, Chinese engineering RFCs, or exact protocol topologies to full raster image generation. If a technical figure needs 1–3 concrete 3D/physical visuals alongside crisp text and arrows, choose Mode 2 (Hybrid Composite: vector skeleton + cutout assets) rather than Full Concept raster generation.
  • When Mode 4 extracts a topology: Default output is still a Mode 1 publication SVG + 2x PNG (clean redraw, never ugly auto-layout pass-through). Emit .drawio only when the user explicitly asks for .drawio.
  • Architecture + compact result inset: When architecture or methodology is the primary subject and the figure includes only a compact quantitative inset (e.g., a small summary bar or threshold curve from user-supplied points), stay in Mode 1 and draw the inset inline in SVG. Route to Mode 3 when plotting quantitative data is the main subject.

2. Universal Non-Negotiable Guardrails (All Modes)

  1. Sans-Serif Typography Only: Use 'Inter', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif across all diagrams and plots. Never use serif faces (Times, Georgia, SimSun, Songti, Computer Modern, generic serif).
  2. Grounded 3-Step Dual Crisp Palettes (Rich Depth, Zero Red-Brick Slop): Pure #FFFFFF canvas with crisp 3-step tonal contrast (white card interiors + clean light zone tints + grounded medium-dark structural borders & selective solid focal anchors in cool/warm hues) using one official palette per figure:
    • Crisp Sapphire (engineering architectures, open-source READMEs, technical RFCs): Neutral Slate #52657D (#F5F7FA), Primary Sapphire #1E5AA8 (#F0F6FE / #D8E8FC), Secondary Pine Emerald #177A5A (#EFFAF5 / #CEEFE0), Accent Warm Amber #C27018 (#FEF7EC / #FBE7C6), Restrained Signal Rose Garnet #C2383B (#FEF2F2 outline/arrow only), Optional Indigo #5E43B3 (#F5F2FD).
    • Journal Bright (academic Figure 1s, conceptual comparisons, data plots, slides): Light Slate #566578 (#F7F8FA), Primary Cerulean #1864A8 (#F3F8FD / #D9ECFA), Secondary Botanical Green #16825B (#F2FBF7 / #D1F0E3), Accent Marigold #CC7712 (#FFF9EE / #FDEAC7), Restrained Signal Soft Coral #CA3E34 (#FFF3F2 outline/arrow only), Optional Orchid #6C46B8 (#F7F3FD).
    • Surgical Restraint Law: Keep outer zones to Neutral Slate + 1 primary hue + at most 1–2 functional hues (never 4–5 rainbow columns or cross-hue nested cards); keep solid fills earned (<= 4 focal mechanism headers in Sapphire/Emerald + rich solid bars inside micro-visuals); never use wide solid alarm-red/orange bricks, heavy pink/peach panels, electric UI blues (#2563EB/#1D4ED8/#0000FF), or washed-out low-contrast pastel outlines.
  3. Zero Fabrication & Zero Leakage: Every component, metric, formula, and connection must faithfully represent the user's specification or parsed source files. Never invent experimental numbers, never add placeholder filler prose, and never leak skill metadata (palette names, mode labels, debug coordinates) or raw ASCII arrows (->) onto the canvas.
  4. Typography, Copy Budget & Structural Cleanliness: No Chinese full stop 。 on big titles, no middle-dot · concatenation in prose/labels (SI compound units like Ω·cm² are exempt), zero descriptive filler prose or stacked grey subtext inside cards (module name + at most 1 concise role phrase; never repeat links/env vars already shown on arrows), max 2 levels of container nesting, and minimum legible text size >= 11.5px (>= 12px for READMEs, >= 13px for single-column papers/slides).
  5. Mandatory Dual Verification & Refinement Discipline: Never deliver an unaudited file. Every mode enforces both a deterministic script audit and 1:1 multimodal visual inspection of the rendered image:
    • Vector & Code Modes (Mode 1, Mode 2 Hybrid Composite SVG, Mode 3, Mode 4): Execute at least 2 targeted polish rounds driven by 1:1 visual inspection (re-running the strict audit script each round). Hard defects (errorCount > 0, invalid XML, typos, wrong arrow directions, disconnected islands, missing source nodes) have zero tolerance — keep refining up to 6 rounds; only if hard defects persist after 6 rounds should you restructure the layout or report a blocker.
    • Full Raster Concept Generation (Mode 2 Full Concept): Do not re-roll a genuinely clean, defect-free image; if spelling errors, meta-label leaks, or structural flaws appear, refine up to 3 attempts, then fall back to Hybrid Composite (zero-text artwork + crisp SVG labels) if text garbling persists.

3. Quick Script Index (Invoked Inside Mode Workflows)

ScriptModePurpose
scripts/select_archetype.py1, 2Offline lookup across 28 diverse spatial archetypes (hub-loop, top-down planes, layered stack, split-track, zoom, pipeline)
scripts/brand_icons.py1, 4Fetch genuine official brand & cloud SVG marks (auto viewBox normalization, non-destructive manifest merge, --inject, --no-global-cache)
scripts/audit_vector.mjs1, 2, 4Strict XML parser + isolated headless Chrome 2x PNG render + real DOM geometry, overlap, connector, typography & visual-restraint audit
scripts/prepare_asset.py2Border flood-fill cutout (preserving inner highlights), tight-crop, edge halo scoring & fail-fast --inject
scripts/audit_raster.py2Check raster image dimensions, aspect ratio, border margin safety, and luminance contrast
scripts/plot_kit.py & scripts/audit_plot.py3Shared Crisp Sapphire / Journal Bright sans-serif Matplotlib styling (`lang="en"
scripts/extract_topology.py4Parse SQL, Kubernetes YAML, Docker Compose, OpenAPI JSON/YAML, Mermaid (.mmd/.md), or legacy .drawio into normalized topology.json
scripts/emit_drawio.py & scripts/audit_drawio.py4Group-aware .drawio XML compiler + structural, container-overlap, node-occlusion & shared-port verification + blocking PNG export

4. Standard Deliverable Contract

Report concisely at completion:

  • Primary deliverable paths (e.g., <name>.svg + <name>.png, or <name>.drawio when explicitly requested)
  • Mode and palette (Crisp Sapphire or Journal Bright) chosen (1 line)
  • Verification summary: automated audit result (0 errors, warning count) + polish rounds completed and concrete visual fixes applied
  • For Mode 3/4: explicit data provenance or source-to-diagram fidelity ledger noting any intentional simplifications

相關技能