Ar9av/PaperOrchestra / skills/plotting-agent
plotting-agent
VerifiedStep 2 of the PaperOrchestra pipeline (arXiv:2604.05018). Execute the visualization plan from outline.json — render plots and conceptual diagrams from experimental_log.md and idea.md, optionally refine via VLM critique loop, and produce context-aware captions. Runs in parallel with the literature-review-agent. TRIGGER when the orchestrator delegates Step 2 or when the user asks to "generate the figures for my paper" or "render the plots from this experiment log".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.2 KB |
| references/aspect-ratios.md | markdown | 2.0 KB |
| references/caption-prompt.md | markdown | 2.7 KB |
| references/chart-patterns.md | markdown | 6.6 KB |
| references/diagram-patterns.md | markdown | 3.9 KB |
| references/paperbanana-cookbook.md | markdown | 6.0 KB |
| references/plotting-pipeline.md | markdown | 5.8 KB |
| scripts/figure_lint.py | script | 8.1 KB |
| scripts/paperbanana_render.py | script | 12.7 KB |
| scripts/render_diagram.py | script | 4.1 KB |
| scripts/render_matplotlib.py | script | 7.1 KB |
| scripts/test_figure_lint.py | script | 6.5 KB |
references/plotting-pipeline.md
View on GitHub# Plotting Pipeline (per-figure loop)
Source: arXiv:2604.05018, §4 Step 2 ("Plotting Agent"), App. B (cost: ~20-30
LLM calls including few-shot retrieval, visual planning, image generation,
VLM-guided critique-and-redraw cycles, and context-aware captioning).
The paper outsources visual generation to PaperBanana (Zhu et al., 2026)
internally. We can't redistribute PaperBanana, so this skill expresses the
*loop structure* in terms a host coding agent can execute with its own LLM
and matplotlib.
## The 5-stage per-figure loop
```
┌─────────────────────────────────────┐
│ outline.json → figure spec │
│ { figure_id, plot_type, objective, │
│ aspect_ratio, data_source } │
└─────────────────┬───────────────────┘
│
▼
┌──────────────────────────────────────────────────┐
│ STAGE 1 — Few-shot retrieval │
│ Pick the matching pattern from chart-patterns.md │
│ (plot) or diagram-patterns.md (diagram). Identify│
│ variables you'll need from the data sources. │
└─────────────────┬────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────┐
│ STAGE 2 — Visual planning │
│ Sketch (in your head / in JSON) the chart layout:│
│ axes, series, colors, legend placement, title. │
│ Resolve aspect_ratio → pixel dimensions │
│ via aspect-ratios.md. │
└─────────────────┬────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────┐
│ STAGE 3 — Image generation │
│ Write matplotlib code. Apply the global style │
│ from chart-patterns.md. Save to │
│ workspace/figures/<figure_id>.png at 300 DPI. │
│ Run via your Bash tool, OR call │
│ scripts/render_matplotlib.py with a spec JSON. │
└─────────────────┬────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────┐
│ STAGE 4 — VLM critique loop (skip if no vision) │
│ for iter in 1..3: │
│ load PNG as multimodal input to your LLM │
│ critique against `objective` field │
│ if no issues: break │
│ else: regenerate matplotlib code, re-render │
└─────────────────┬────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────┐
│ STAGE 5 — Caption │
│ Use the verbatim caption-prompt.md. │
│ Save into figures/captions.json. │
└──────────────────────────────────────────────────┘
```
## What to look for in the VLM critique
When you (the host agent) inspect a rendered figure with vision, score it
against this checklist (derived from the paper's plotting failure modes and
the academic-paper skill's review-guide.md):
| Issue | Signal |
|---|---|
| Mislabeled or missing axes | Numeric tick marks with no axis label |
| Illegible text | Font size <6pt; tick labels overlapping |
| Color clash | Two adjacent series indistinguishable in print |
| Missing legend | More than one series, no legend |
| Overlapping legend | Legend covers a data point |
| Misleading scaling | Bar chart Y-axis doesn't start at 0; log scale unannounced |
| Cropped content | Title or labels cut off at edge |
| Missing units | Numeric axes without units in label |
| Decorative noise | Drop shadows, gradients, 3D effects |
| Unsupported claim | The plot shows a trend not present in the source data |
If any of these fire, regenerate the matplotlib script with the fix and
re-render. Cap at 3 iterations.
## Wall-time budget
The paper allocates ~20-30 LLM calls per Plotting Agent invocation. With
~5-10 figures per typical paper, that's ~3 calls per figure: roughly
1 (planning) + 1 (initial generation) + 1 (critique pass) + 0-1 (redraw) +
1 (caption). Stay within this budget by using deterministic helpers for the
mechanical parts (`render_matplotlib.py` does pixel sizing, style, save) and
reserving LLM calls for actual visual judgment.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |