fig

A publication-figure workflow for creating and organising diagrams and data plots for research papers. It uses draw.io for diagrams by default and can use Figma when requested or when an existing Figma design is involved.

In plain words
What is it for?
Use it to make framework or architecture diagrams, create data plots with code, revise diagrams from feedback, export them, and assemble figures for a paper.
Why use it?
It gives research figures a defined creation and revision process rather than leaving diagrams and plots as untracked one-off files.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cliffren/swf/fig
Any agent
npx skills add cliffren/swf --skill fig
Clone the repo
git clone --depth 1 https://github.com/cliffren/swf

Made for: Claude Code, Codex.

Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,945 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.01945
Opus 5 $0.00013 $0.00972
Sonnet 5 $0.00005 $0.00389
Haiku 4.5 $0.00003 $0.00194

Measured 2d ago against content hash 84d4ca881bc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fig scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/fig/SKILL.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Figure Management

Create, iterate, and organize publication-quality figures for papers.

Sub-commands

$ARGUMENTS[0] determines the action. If omitted, show help.


/swf:fig framework <description>

Create a framework/architecture diagram (typically Fig.1 of a paper).

  1. Choose tool based on need:

    • draw.io MCP — default choice. Best for flowcharts, pipelines, architecture diagrams. Claude has full control: create, edit, export.
    • Figma MCP — use when the user asks, or when working with existing Figma designs. Best for polished visual design and FigJam collaboration.
  2. Ask the user: "用 draw.io 还是 Figma 画?"

    • If user has no preference, default to draw.io (Claude has more control)
  3. draw.io workflow:

    • Call start_session to open browser preview
    • Ask the user to describe what the diagram should show
    • Call create_new_diagram with well-structured XML:
      • Use large shapes (width >= 200, height >= 60)
      • Center layout on canvas
      • Use thick lines (strokeWidth >= 2)
      • Use a consistent color palette
      • Add proper spacing (150-200px between shapes)
    • Iterate: user says what to change → call edit_diagram
    • When satisfied, call export_diagram to save:
      • .drawio → for further editing in draw.io desktop
      • .svg → for paper inclusion (vector, scalable)
      • .png → for quick preview
    • Save to docs/paper/figures/
  4. Figma workflow:

    • Use generate_diagram to create in FigJam
    • Or use create_new_file + use_figma for Figma design files
    • Use get_screenshot to preview
    • Export from Figma UI
  5. Record in experiment log:

    • Note which figure this is for (e.g., Fig.1 — Method Overview)
    • Record the source file path

/swf:fig plot <description>

Generate a data visualization figure from experiment results.

  1. Read experiment data:
    • Check results/ for metrics files
    • Check docs/experiments/ for relevant experiment records
    • Identify what data to plot

Read the full file on GitHub · 216 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 216 lines · 25 tokens per session scan A 84d4ca881bc4

Subscribe to this mod's changes

fig is a skill published in the GitHub repository cliffren/swf (5 stars, last pushed 3mo ago), licensed MIT. It adds 25 tokens to every session and 1,945 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

html-ppt-zhangzara-cartesian

An economics senior thesis on the employment effects of local minimum-wage increases — identification strategy, evidence, and limitations. Built as a decision-grade coursework defense deck for thesis committee.

nexu-io/open-design · 46 tokens

html-ppt-zhangzara-monochrome

A grant proposal on CRISPR base-editing for sickle-cell disease — the hypothesis, the approach, the milestones, and the risk. Built as a decision-grade academic research deck for grant review committee.

nexu-io/open-design · 54 tokens

html-ppt-zhangzara-pin-and-paper

A field-biology capstone on urban pollinator decline — the survey design, the data, the contribution, and the caveats. Built as a decision-grade coursework defense deck for faculty reviewers.

nexu-io/open-design · 51 tokens

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 figures for papers.

wanshuiyin/Auto-claude-code-research-in-sleep · 67 tokens

paper-illustration-image2

Generate publication-quality academic illustrations through a local Codex app-server bridge that uses Codex native image generation. This is a separate experimental alternative to paper-illustration, intended for Claude Code users who want a GPT-image-style renderer without modifying the original skill.

wanshuiyin/Auto-claude-code-research-in-sleep · 59 tokens

paper-poster-html

DEFAULT poster pipeline — build an academic conference poster (ICML/NeurIPS/ICLR/CVPR/...) as a single HTML/CSS file with measurement-driven hard gates, real paper figures, a two-hue design-token system, and print-ready PDF via headless Chromium. Use when the user says "做海报", "poster", "conference poster", "paper…

wanshuiyin/Auto-claude-code-research-in-sleep · 107 tokens