An Automated AI Agent Tool for Plotting Your Data in Any Paper's Figure Style.
$ npx -y skills add VILA-Lab/FigMirror --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
What's inside
FigMirror uses a reference figure as the style target, then renders your data through an iterative Drawer / Reviewer loop until the output looks like it belongs in the same paper family.
Already inside Claude Code or Codex? Paste this and let the agent do the setup:
Install FigMirror for me: https://github.com/VILA-Lab/FigMirror
Use this when you want upload, preview, iteration history, and refinement in a browser.
If uv is missing: python3 -m pip install uv.
git clone https://github.com/VILA-Lab/FigMirror.git && cd FigMirror
bash scripts/install.sh
uv run python scripts/figcopy_serve.py --workspace .artifacts/figmirror-workspace --backend codex
Open http://127.0.0.1:8765/.
The installer auto-detects Claude Code and Codex. For Codex, it installs the
figmirror skill plus the figmirror-drawer and figmirror-reviewer custom
agents used by the current role-separated algorithm.
Use this when you want FigMirror inside your agent, no web UI.
curl -fsSL https://raw.githubusercontent.com/VILA-Lab/FigMirror/main/scripts/install.sh | bash
Target one runtime explicitly:
curl -fsSL https://raw.githubusercontent.com/VILA-Lab/FigMirror/main/scripts/install.sh | bash -s -- --codex
curl -fsSL https://raw.githubusercontent.com/VILA-Lab/FigMirror/main/scripts/install.sh | bash -s -- --claude
curl -fsSL https://raw.githubusercontent.com/VILA-Lab/FigMirror/main/scripts/install.sh | bash -s -- --all
Then attach a paper-figure screenshot, paste your data, and ask:
Use FigMirror to mirror this figure's style with my data.
Need manual target selection, Claude backend, or troubleshooting? See Detailed Install.
Illustration of FigMirror. The left panel shows the core agentic loop; the right panel introduces Grounded Measurement.
FigMirror uses an agentic Drawer-Reviewer loop. In the current Codex path, a top-level Orchestrator delegates drawing to a named Drawer agent and visual audit to a named Reviewer agent. The Reviewer sees a far-view composite plus full-resolution source and candidate views, returns structured feedback with bounding boxes, and the Orchestrator turns that feedback into an annotated image and notes for the next Drawer pass.
The Drawer renders a candidate figure with Grounded Measurement. The Reviewer compares it with the reference image, then returns a visual review, a revision checklist, and a preserve list. The preserve list accumulates across iterations as an anchor against style drift. The Aesthetic Lib provides fallback principles, style rules, and figure properties when the agents disagree or the Drawer has low confidence.
For 3D figures, FigMirror adds geometry-aware prompting for camera, scale, surfaces, lighting, and repair checks, helping the loop preserve the 3D composition of the reference figure while producing editable matplotlib code.
Grounded Measurement builds on two properties of computer-use-trained foundation models: Measurement with Axis, which lets the model return x/y coordinates for visual targets; and Resonate with Code, which turns those coordinates into executable checks, such as cropping a line segment and reading its color from pixels.
For the detailed algorithm, architecture, product envelope, and spec map, read docs/method.md. For the web UI, see scripts/README_figcopy_serve.md.
FigMirror welcomes contributions!
Open an issue for bugs, broken installs, or figure cases FigMirror should learn from; open a PR for showcase examples, prompt improvements, UI polish, or small regression tests.
Start with docs/contributing.md. Good first PRs include adding a showcase example, improving a web UI interaction, tightening install docs, or adding a small regression test around runner behavior.
.claude/
agents/
figure-critic.md
figure-illustrator.md
figure-preprocessor.md
commands/
opsx/
apply.md
archive.md
explore.md
propose.md
skills/
figmirror/
references/
aesthetic-library.md
iter-loop-spec.md
three-d/
three-d-prompting.md
candidate-selection.md
core.md
extrema-fold-network.md
fractured-surfaces.md
marks-and-panels.md
material-lighting.md
patch-composition.md
repair-feedback.md
reviewer-scorecard.md
scale-occupancy.md
strict-reproduction.md
style-transfer.md
surfaces.md
volumetric-surfaces.md
scripts/
score_3d_candidates.py
SKILL.md
openspec-apply-change/
SKILL.md
openspec-archive-change/
SKILL.md
openspec-explore/
SKILL.md
openspec-propose/
SKILL.md
.codex/
agents/
AGENTS.md
figmirror-drawer.toml
figmirror-reviewer.toml
skills/
figmirror/
agents/
openai.yaml
references/
aesthetic-library.md
drawer.md
orchestrator-codex.md
preprocessor.md
reviewer.md
three-d/
three-d-prompting.md
candidate-selection.md
core.md
extrema-fold-network.md
fractured-surfaces.md
marks-and-panels.md
material-lighting.md
patch-composition.md
repair-feedback.md
reviewer-scorecard.md
scale-occupancy.md
strict-reproduction.md
style-transfer.md
surfaces.md
volumetric-surfaces.md
scripts/
figannot.py
score_3d_candidates.py
SKILL.md
.gitignore
docs/
assets/
_gen_figures.py
algorithm.png
architecture.png
badges/
codex.svg
figmirror_annotated_catwalk_v1.mp4
figmirror-wordmark.svg
icons/
agent.svg
contributing.svg
how-it-works.svg
LICENSE-lucide.txt
quick-start.svg
roadmap.svg
showcase.svg
skill.svg
star-history.svg
web-ui.svg
pipe.png
reference_claude_code_architecture.png
show.png
showcase/
complex-3d-generated.png
coreset-bars-generated.png
hexbin-joint-generated.png
hexbin-joint-reference.png
julia-baby-m-generated.png
poly-roots-ring-generated.png
primary-generated.jpg
primary-reference.jpg
waterfall-3d-generated.png
waterfall-3d-reference.png
target.png
contributing.md
install.md
method.md
openspec/
changes/
archive/
.gitkeep
phase0-style-transfer-loop/
.openspec.yaml
design.md
proposal.md
tasks.md
phase2-webui-workpanel/
design.md
proposal.md
specs/
figcopy-webui-workpanel/
spec.md
tasks.md
phase3-real-runners-multi-turn-refine/
.openspec.yaml
design.md
proposal.md
specs/
figcopy-real-runner-backend/
spec.md
figcopy-webui-workpanel/
spec.md
tasks.md
sessions/
phase0-spike-and-product-principles.md
specs/
.gitkeep
pyproject.toml
README.md
README.zh-CN.md
resources/
prompts/
figure-style-copier-codex.md
figure-style-copier.md
scripts/
figcopy_run.py
figcopy_runner/
__init__.py
_lifecycle.py
adjustments_to_prose.py
chat_log.py
claude.py
codex.py
event_bus.py
events.py
interface.py
mock.py
refine_completion.py
refine_prompt.py
figcopy_serve_demo.py
figcopy_serve.py
figcopy_static/
__init__.py
highlight.py
mock_iters/
_build.py
iter0/
audit.json
code.py
img.png
notes.md
iter1/
audit.json
code.py
img.png
notes.md
iter2/
audit.json
code.py
img.png
notes.md
iter3/
audit.json
code.py
img.png
notes.md
iter4/
audit.json
code.py
img.png
notes.md
README.md
style.css
trajectory.js
workspace.js
install_claude_skill.py
install_codex_skill.py
install.sh
README_figcopy_serve.md
spike-results/
prompts/
v10_design_notes.md
v10_drawer.md
v10_orchestrator.md
v10_reviewer.md
v11_aesthetic_library.md
v11_drawer.md
v11_orchestrator.md
v11_reviewer.md
v5_prompt.md
v9_drawer.md
v9_findings.md
v9_orchestrator.md
v9_reviewer.md
tests/
__init__.py
conftest.py
figcopy_runner/
__init__.py
test_adjustments_to_prose.py
test_chat_log.py
test_claude_helpers.py
test_codex_helpers.py
test_compute_set_id.py
test_datagen_pass.py
test_event_bus.py
test_mock_refine_integration.py
test_refine_completion.py
test_refine_prompt.py
test_serve_state.py
test_score_3d_candidates.py
uv.lockFAQ
figmirror is a Claude Code plugin with 5 hand-picked skills for data work, indexed on Flowy. Install it with the command on its page. It includes figmirror, openspec-apply-change, openspec-archive-change. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.