Source profileQuality 90/100Review permissions

wanshuiyin/Auto-claude-code-research-in-sleep/skills/skills-codex/figure-spec/SKILL.md

figure-spec

Use it for design and operations tasks; the detail page covers purpose, installation, and practical steps.

Source repository stars
14,225
Declared platforms
1
Static risk flags
1
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

Generate publication-quality architecture diagrams, workflow pipelines, audit cascades, and system topology figures as editable SVG vector graphics using a deterministic JSON → SVG renderer.

Best for

  • System architecture diagrams (layered, hub-and-spoke, multi-plane)
  • Workflow / pipeline figures
  • Audit cascade / flow-control diagrams

Not for

  • Don't use groups as hierarchy: groups frame peer nodes, not containment
  • Don't nest groups: renderer draws them as background rectangles; nested groups look like Russian dolls

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexDeclaredSource recordInstall path and trigger
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep --skill "skills/skills-codex/figure-spec"
Safe inspection promptEditorial

Inspect the Agent Skill "figure-spec" from https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/a5fcc6970f08d45f6a2100abef4d5d234a1cef25/skills/skills-codex/figure-spec/SKILL.md at commit a5fcc6970f08d45f6a2100abef4d5d234a1cef25. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Layer 0: self-contained at the new canonical location (Phase 3.1).

    FIGURERENDERER="" if [ -z "${ARISREPO:-}" ] && [ -f .aris/installed-skills-codex.txt ]; then ARISREPO=$(awk -F'\t' '$1=="reporoot"{print $2; exit}' .aris/installed-skills-codex.txt 2/dev/null) || true fi [ -n "${ARISREPO:-}" ] && [ -f "$ARISREPO/skills/figure-spec/scripts/figure…

    FIGURERENDERER="" if [ -z "${ARISREPO:-}" ] && [ -f .aris/installed-skills-codex.txt ]; then ARISREPO=$(awk -F'\t' '$1=="reporoot"{print $2; exit}' .aris/installed-skills-codex.txt 2/dev/null) || true fi [ -n "${ARISREP…
  2. 02

    Workflow

    From $ARGUMENTS (description or path to PAPERPLAN.md / NARRATIVEREPORT.md), identify: - Purpose: architecture, workflow, pipeline, audit cascade, topology? - Main entities: what are the boxes? - Relationships: how do they connect? (uses, produces, calls, verifies, chains) - Grou…

    Purpose: architecture, workflow, pipeline, audit cascade, topology?Main entities: what are the boxes?Relationships: how do they connect? (uses, produces, calls, verifies, chains)
  3. 03

    Step 1: Understand the Diagram Goal

    From $ARGUMENTS (description or path to PAPERPLAN.md / NARRATIVEREPORT.md), identify: - Purpose: architecture, workflow, pipeline, audit cascade, topology? - Main entities: what are the boxes? - Relationships: how do they connect? (uses, produces, calls, verifies, chains) - Grou…

    Purpose: architecture, workflow, pipeline, audit cascade, topology?Main entities: what are the boxes?Relationships: how do they connect? (uses, produces, calls, verifies, chains)
  4. 04

    Step 2: Draft the FigureSpec JSON

    Canvas sizing guide: - Single-column figure: 500×350 px - Two-column (full-width): 900×500 px - Tall topology: 700×700 px

    Single-column figure: 500×350 pxTwo-column (full-width): 900×500 pxTall topology: 700×700 px
  5. 05

    Step 3: Render and Validate

    Review the “Step 3: Render and Validate” section in the pinned source before continuing.

    Review and apply the “Step 3: Render and Validate” source section.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 66

The documentation asks the agent to run terminal commands or scripts.

python3 "$FIGURE_RENDERER" render <spec.json> --output <out.svg>

Runs scripts

medium · line 67

The documentation asks the agent to run terminal commands or scripts.

python3 "$FIGURE_RENDERER" validate <spec.json>

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score90/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars14,225SourceRepository attention, not individual Skill quality
Compatibility1 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
wanshuiyin/Auto-claude-code-research-in-sleep
Skill path
skills/skills-codex/figure-spec/SKILL.md
Commit
a5fcc6970f08d45f6a2100abef4d5d234a1cef25
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

FigureSpec: Deterministic JSON → SVG Figure Generation

Generate publication-quality architecture diagrams, workflow pipelines, audit cascades, and system topology figures as editable SVG vector graphics using a deterministic JSON → SVG renderer.

When to Use This Skill

Use figure-spec for:

  • System architecture diagrams (layered, hub-and-spoke, multi-plane)
  • Workflow / pipeline figures
  • Audit cascade / flow-control diagrams
  • Any structured diagram where node positions, connections, and groupings are semantically important
  • Figures that need to be edited/tweaked later (SVG is plain text)
  • Figures where determinism matters (same spec → same SVG)

Do NOT use for:

  • Data plots (bar/line/scatter) — use /paper-figure
  • Natural/qualitative illustrations — use /paper-illustration
  • Quick state-machine / flowchart — use /mermaid-diagram (lighter syntax)

Core Properties

  • Deterministic: identical FigureSpec JSON always produces identical SVG output (for a fixed renderer version + fonts)
  • Editable: SVG output is plain-text, can be post-edited by hand or programmatically
  • Validated: renderer enforces schema, rejects malformed specs with clear error messages
  • Shape-aware: edge clipping works correctly for rect/rounded/circle/ellipse/diamond
  • CJK support: multi-line labels with proper Chinese character width estimation
  • No external API: runs fully local, no network, no API keys

Tool Location

Phase 3.1 (Arch C) move: the canonical implementation now lives at skills/figure-spec/scripts/figure_renderer.py. tools/figure_renderer.py is kept as a backwards-compatible os.execv shim so legacy layers continue to resolve. Codex-side install layouts that previously copied the canonical into ~/.codex/skills/figure-spec/figure_renderer.py must now place it at ~/.codex/skills/figure-spec/scripts/figure_renderer.py to match the new layout (re-run install_aris_codex.sh to pick up the new symlink target).

Resolve $FIGURE_RENDERER via the Codex-side hybrid chain (layer 0 preferred for self-contained owner SKILL; layers 1-4 are legacy shared-runtime compatibility):

# Layer 0: self-contained at the new canonical location (Phase 3.1).
FIGURE_RENDERER=""
if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills-codex.txt ]; then
    ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills-codex.txt 2>/dev/null) || true
fi
[ -n "${ARIS_REPO:-}" ] && [ -f "$ARIS_REPO/skills/figure-spec/scripts/figure_renderer.py" ] && FIGURE_RENDERER="$ARIS_REPO/skills/figure-spec/scripts/figure_renderer.py"

# Layers 1-3: legacy shared-runtime chain via shim at tools/figure_renderer.py.
[ -z "$FIGURE_RENDERER" ] && [ -n "${ARIS_REPO:-}" ] && [ -f "$ARIS_REPO/tools/figure_renderer.py" ] && FIGURE_RENDERER="$ARIS_REPO/tools/figure_renderer.py"
[ -z "$FIGURE_RENDERER" ] && [ -f tools/figure_renderer.py ] && FIGURE_RENDERER="tools/figure_renderer.py"

# Layer 4: Codex-side skill-local install (`install_aris_codex.sh` may place it here).
[ -z "$FIGURE_RENDERER" ] && [ -f ~/.codex/skills/figure-spec/scripts/figure_renderer.py ] && FIGURE_RENDERER="$HOME/.codex/skills/figure-spec/scripts/figure_renderer.py"
[ -z "$FIGURE_RENDERER" ] && [ -f ~/.codex/skills/figure-spec/figure_renderer.py ] && FIGURE_RENDERER="$HOME/.codex/skills/figure-spec/figure_renderer.py"  # pre-Phase-3.1 layout

[ -n "$FIGURE_RENDERER" ] || {
  echo "ERROR: figure_renderer.py not found at any of: \$ARIS_REPO/skills/figure-spec/scripts/, \$ARIS_REPO/tools/, tools/, ~/.codex/skills/figure-spec/scripts/, ~/.codex/skills/figure-spec/. Set ARIS_REPO, rerun install_aris_codex.sh, or copy the canonical \$ARIS_REPO/skills/figure-spec/scripts/figure_renderer.py next to this skill." >&2
  exit 1
}

python3 "$FIGURE_RENDERER" render <spec.json> --output <out.svg>
python3 "$FIGURE_RENDERER" validate <spec.json>
python3 "$FIGURE_RENDERER" schema

Workflow

Step 1: Understand the Diagram Goal

From $ARGUMENTS (description or path to PAPER_PLAN.md / NARRATIVE_REPORT.md), identify:

  • Purpose: architecture, workflow, pipeline, audit cascade, topology?
  • Main entities: what are the boxes?
  • Relationships: how do they connect? (uses, produces, calls, verifies, chains)
  • Grouping: do entities cluster into named regions?
  • Hierarchy vs network: stacked layers, left-to-right flow, or central hub?

Step 2: Draft the FigureSpec JSON

Canvas sizing guide:

  • Single-column figure: ~500×350 px
  • Two-column (full-width): ~900×500 px
  • Tall topology: ~700×700 px

Start from a template based on the diagram type:

Architecture (stacked rows):

{
  "canvas": {"width": 900, "height": 520},
  "nodes": [
    {"id": "layer1_label", "label": "Layer 1", "x": 450, "y": 60, ...},
    {"id": "node_a", "label": "A", "x": 180, "y": 120, ...},
    {"id": "node_b", "label": "B", "x": 350, "y": 120, ...}
  ],
  "edges": [...],
  "groups": [
    {"label": "Layer 1", "node_ids": ["node_a", "node_b"], "fill": "#F0F9FF", "stroke": "#BAE6FD"}
  ]
}

Workflow (left-to-right chain):

{
  "canvas": {"width": 900, "height": 300},
  "nodes": [
    {"id": "step1", "label": "Step 1", "x": 100, "y": 150, "shape": "rounded"},
    {"id": "step2", "label": "Step 2", "x": 280, "y": 150, "shape": "rounded"}
  ],
  "edges": [
    {"from": "step1", "to": "step2", "label": "produces"}
  ]
}

Decision diamond:

{"id": "check", "label": "Passes?", "shape": "diamond", "x": 450, "y": 200}

Step 3: Render and Validate

# Validate first
python3 "$FIGURE_RENDERER" validate /tmp/spec.json

# Render to SVG
python3 "$FIGURE_RENDERER" render /tmp/spec.json --output figures/fig_arch.svg

# Convert to PDF for LaTeX inclusion
rsvg-convert -f pdf figures/fig_arch.svg -o figures/fig_arch.pdf

If validation fails, inspect the error (missing field, duplicate ID, overlap warning, invalid hex color) and fix the JSON.

Step 4: Visual Review

Open the SVG/PDF and check:

  • No overlaps: nodes don't collide with each other or group boundaries
  • Readability: font sizes are consistent, labels aren't clipped
  • Edge clarity: arrows hit nodes at clean angles, labels near edges are legible
  • Group alignment: background rectangles frame their members cleanly
  • Color distinction: categories are visually distinct in both color and grayscale

If issues found, edit the JSON spec (never the generated SVG) and re-render.

Step 5: Iterate with Codex Review (Optional, for High-Stakes Figures)

For paper architecture figures, invoke fresh-agent review (same-family provisional in the base mirror):

spawn_agent:
  model: gpt-5.6-sol
  reasoning_effort: xhigh
  message: |
    Review this SVG figure for a technical paper (architecture / workflow diagram).

    Spec file: /path/to/spec.json
    Rendered: /path/to/fig.svg

    Evaluate:
    1. Clarity (C): can a reader understand the system from this figure alone?
    2. Readability (R): font sizes, label placement, visual hierarchy
    3. Semantic accuracy (S): do relationships match the described system?

    Score each axis 1-10 and list specific issues to fix.

Iterate until all three axes ≥ 7/10. The ARIS tech report figures went through 5 rounds of this loop to reach C:7/R:7/S:8.

Schema Quick Reference

Run python3 "$FIGURE_RENDERER" schema for the authoritative schema.

Nodes

FieldRequiredDefaultNotes
idUnique
label\n for multi-line
x, yCenter coordinates
width, height120, 50
shaperoundedrect / rounded / circle / ellipse / diamond
fill, strokeauto from palette#RRGGBB
text_color#333333
font_size14Override style default

Edges

FieldDefaultNotes
from, torequiredSame = self-loop
labelShort edge label
stylesolidsolid / dashed / dotted
color#555555
curvefalseCurved path

Groups

Rectangular background regions framing a set of nodes:

{"label": "Layer Name", "node_ids": ["a", "b", "c"], "fill": "#EFF6FF", "stroke": "#BFDBFE"}

Design Patterns

Pattern 1: Layered Architecture

Stack rows of related nodes, each row is a group, add inter-layer arrows with semantic labels (uses↓, produces↑, checks↓).

Pattern 2: Hub-and-Spoke

Central node (e.g., Executor), peripheral nodes (skills, tools), solid arrows for primary relations, dashed for feedback.

Pattern 3: Pipeline with Feedback

Left-to-right main flow, feedback arrows curve below with curve: true.

Pattern 4: Audit Cascade

Three-stage horizontal cascade with inputs feeding in from top, outputs exiting right, each stage in its own group.

Anti-Patterns

  • Don't use groups as hierarchy: groups frame peer nodes, not containment
  • Don't nest groups: renderer draws them as background rectangles; nested groups look like Russian dolls
  • Don't cross-draw long diagonals: if an arrow crosses 3+ rows, rethink the layout
  • Don't mix font sizes for same role: keep one size per node category

Output Contract

  • SVG file in figures/ (vector, editable, hand-tweakable)
  • Source FigureSpec JSON saved in figures/specs/ for reproducibility
  • PDF version via rsvg-convert for LaTeX inclusion

Integration with Other Skills

  • /paper-writing (Workflow 3): when illustration: figurespec (default for architecture figures), this skill handles Phase 2b
  • /paper-figure: handles data plots; they complement each other (data + architecture = complete figure set)
  • /paper-illustration: fallback for figures that need natural/qualitative style (method illustrations with photos, qualitative result grids)
  • /mermaid-diagram: lighter alternative for simple flowcharts

Review Tracing

After each reviewer agent call, save the trace following shared-references/review-tracing.md (Policy C — forensic; never silently skip). Use save_trace.sh (resolved per the chain in shared-references/integration-contract.md §2) or write files directly to .aris/traces/<skill>/<date>_run<NN>/. Respect the --- trace: parameter (default: full).

Alternatives

Compare before choosing