Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/wanshuiyin-paper-illustration-image2/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -19% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 227% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 288% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 138% | 0% |
Generate publication-quality paper figures using Claude as the planner/reviewer and a local Codex app-server MCP bridge as the raster renderer.
text┌──────────────────────────────────────────────────────────────────────────┐ │ MULTI-STAGE ITERATIVE WORKFLOW │ ├──────────────────────────────────────────────────────────────────────────┤ │ │ │ User Request │ │ │ │ │ ▼ │ │ ┌─────────────┐ │ │ │ Claude │ ◄─── Step 1: Parse request, create initial prompt │ │ │ (Planner) │ - Extract components, labels, and data flow │ │ │ │ - Write a paper-ready figure brief │ │ └──────┬──────┘ │ │ │ │ │ ▼ │ │ ┌─────────────┐ │ │ │Claude/Codex │ ◄─── Step 2: Optimize layout description │ │ │ Layout │ - Refine component positioning │ │ │ Review │ - Optimize spacing and grouping │ │ └──────┬──────┘ │ │ │ │ │ ▼ │ │ ┌─────────────┐ │ │ │Claude/Codex │ ◄─── Step 3: CVPR/NeurIPS style verification │ │ │ Style │ - Check palette, arrows, and label standards │ │ │ Check │ - Tighten the prompt before rendering │ │ └──────┬──────┘ │ │ │ │ │ ▼ │ │ ┌─────────────┐ │ │ │ codex-image2│ ◄─── Step 4: Native image generation via bridge │ │ │ MCP bridge │ - Call generate_start / generate_status │ │ │ + app-server│ - Accept only native imageGeneration output │ │ └──────┬──────┘ │ │ │ │ │ ▼ │ │ ┌─────────────┐ │ │ │ Claude │ ◄─── Step 5: STRICT visual review + SCORE (1-10) │ │ │ (Reviewer) │ - Verify logic, labels, arrows, and aesthetics │ │ │ STRICT! │ - Reject unclear or non-paper-ready figures │ │ └──────┬──────┘ │ │ │ │ │ ▼ │ │ Score ≥ 9? ──YES──► Accept & Output │ │ │ │ │ NO │ │ │ │ │ ▼ │ │ Generate SPECIFIC improvement feedback ──► Loop back to Step 2 │ │ │ └──────────────────────────────────────────────────────────────────────────┘
codex-image2 — Native image generation bridge exposed through local Codex app-serverspawn_agent — Optional text-only second opinion for layout/style checksfigures/ai_generated/ — Output directoryEnglish — Default figure text language unless the user requests otherwisestrict — Accept only native imageGeneration output; reject shell/Python fallbackspaper_illustration_image2.py, resolvedper shared-references/integration-contract.md §2 (Policy A — skill-local gate). Phase 3.2 (Arch C) moved the canonical implementation into skills/paper-illustration-image2/scripts/; tools/paper_illustration_image2.py remains as an os.execv shim so legacy resolver layers keep working without a re-install. Resolve via the Codex-side chain:
bash IMAGE2_HELPER="" cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1 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 [ -f ".agents/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" ] && IMAGE2_HELPER=".agents/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && [ -n "${ARIS_REPO:-}" ] && [ -f "$ARIS_REPO/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" ] && IMAGE2_HELPER="$ARIS_REPO/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && [ -n "${ARIS_REPO:-}" ] && [ -f "$ARIS_REPO/tools/paper_illustration_image2.py" ] && IMAGE2_HELPER="$ARIS_REPO/tools/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && [ -f tools/paper_illustration_image2.py ] && IMAGE2_HELPER="tools/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && [ -f ~/.codex/skills/paper-illustration-image2/scripts/paper_illustration_image2.py ] && IMAGE2_HELPER="$HOME/.codex/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && { echo "ERROR: paper_illustration_image2.py not resolved at .agents/skills/, \$ARIS_REPO/skills/, \$ARIS_REPO/tools/, tools/, or ~/.codex/skills/." >&2 echo " /paper-illustration-image2 cannot proceed. Fix: rerun install_aris_codex.sh, export ARIS_REPO, or copy the canonical skill into ~/.codex/skills/." >&2 exit 1 }
All invocations below use python3 "$IMAGE2_HELPER" <subcommand>.
What "CVPR Style" Actually Means:
目标:既不保守也不花哨,找到平衡点
| Figure Type | Quality | Examples | |-------------|---------|----------| | Architecture diagrams | Excellent | Model architecture, pipeline, encoder-decoder | | Method illustrations | Excellent | Conceptual diagrams, algorithm flowcharts | | Conceptual figures | Good | Comparison diagrams, taxonomy trees |
Not for: Statistical plots (use /paper-figure), deterministic vector topology figures (prefer /figure-spec), photo-realistic scenes
Render this checklist explicitly before starting:
text📋 paper-illustration-image2 integration checklist: [ ] 1. python3 "$IMAGE2_HELPER" preflight --workspace <cwd> --json-out figures/ai_generated/preflight.json [ ] 2. Confirm preflight JSON says ok=true before rendering [ ] 3. Render via mcp__codex-image2__generate_start + generate_status [ ] 4. Finalize via python3 "$IMAGE2_HELPER" finalize --workspace <cwd> --best-image <best_png> [ ] 5. Verify artifacts via python3 "$IMAGE2_HELPER" verify --workspace <cwd> --json-out figures/ai_generated/verify.json
figures/ai_generated/ if it does not exist.bashpython3 "$IMAGE2_HELPER" preflight \ --workspace <cwd> \ --json-out figures/ai_generated/preflight.json
ok=true, stop and say so clearly.Turn the user request into a fully specified image prompt. Include:
When the input is a method note or a paper section, summarize it first into a clean figure brief before writing the final image prompt.
This step is required. Before rendering, refine the prompt into a concrete layout plan:
If spawn_agent is available, you may ask it for a short second-opinion layout critique here, but Claude should still complete this step even without Codex.
Use Codex layout critique for:
This step is also required. Check the prompt against the intended paper style before rendering:
If spawn_agent is available, you may ask it for a short text-only style audit, but do not block on it.
Call mcp__codex-image2__generate_start with:
prompt: the final image promptcwd: current project root or paper workspaceoutputPath: figures/ai_generated/figure_v1.pngsystem: a short instruction like Academic paper figure. Prefer crisp English labels.timeoutSeconds: a bounded render timeout such as 180Then call mcp__codex-image2__generate_status with bounded waits until:
done=true and status=completed, ordone=true and status=failedIf generation fails, report the bridge error directly instead of hiding it.
Review the generated image with a strict checklist:
Score it from 1-10.
If score < 9, write a targeted refinement prompt:
figure_v2.png, figure_v3.png, etc.Keep refinement feedback concrete:
Increase spacing between genome scan and scoring modulesMake the off-target branch thinner and secondaryUse cleaner English labels: "Candidate sgRNA library", not "sgRNA library 23 bp"When accepted:
figure_final.pnglatex_include.texreview_log.jsonbashpython3 "$IMAGE2_HELPER" finalize \ --workspace <cwd> \ --best-image figures/ai_generated/figure_vN.png \ --score 9 \ --review-summary "Accepted after strict review; labels and arrows are paper-ready." python3 "$IMAGE2_HELPER" verify \ --workspace <cwd> \ --json-out figures/ai_generated/verify.json
Suggested LaTeX:
latex\begin{figure*}[t] \centering \includegraphics[width=0.95\textwidth]{figures/ai_generated/figure_final.png} \caption{[Replace with a paper-ready caption].} \label{fig:[replace-me]} \end{figure*}
codex-image2 bridge only for native image generation.tools/paper_illustration_image2.py finalize to emit the final artifacts.tools/paper_illustration_image2.py verify before claiming success.If rendering succeeded but final artifacts were skipped, repair the integration explicitly:
bashpython3 "$IMAGE2_HELPER" finalize \ --workspace <cwd> \ --best-image figures/ai_generated/figure_vN.png python3 "$IMAGE2_HELPER" verify \ --workspace <cwd> \ --json-out figures/ai_generated/verify.json
textfigures/ai_generated/ ├── preflight.json # Helper preflight receipt ├── figure_v1.png # Iteration 1 ├── figure_v2.png # Iteration 2 ├── figure_v3.png # Iteration 3 ├── figure_final.png # Accepted version (copy of best, score ≥ 9) ├── latex_include.tex # LaTeX snippet ├── review_log.json # Review notes and refinement history └── verify.json # Helper verification diagnostic
| Stage | Agent / Tool | Purpose | |-------|--------------|---------| | Step 0 | python3 "$IMAGE2_HELPER" preflight | Observable activation predicate and preflight receipt | | Step 1 | Claude | Parse request and create the initial figure prompt | | Step 2 | Claude (+ optional Codex critique) | Refine layout, grouping, spacing, and arrow routing | | Step 3 | Claude (+ optional Codex critique) | Verify academic visual style before rendering | | Step 4 | mcp__codex-image2__generate_start + generate_status | Native raster image generation through Codex app-server | | Step 5 | Claude | Strict visual review and scoring | | Step 7 | python3 "$IMAGE2_HELPER" finalize + verify | Emit canonical artifacts and external verification receipt |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 6,712 | 6,578 | -2% | 1 | 1 | 0% | 1,190 | 5,242 | +341% | 0 | 0 | — |
case-02 | fail→fail | 27,765 | 11,667 | -58% | 1 | 1 | 0% | 6,227 | 4,876 | -22% | 0 | 0 | — |
case-03 | fail→fail | 23,988 | 20,184 | -16% | 1 | 1 | 0% | 4,700 | 7,615 | +62% | 0 | 0 | — |
case-04 | fail→pass | 16,565 | 8,717 | -47% | 1 | 1 | 0% | 3,887 | 5,807 | +49% | 0 | 0 | — |
case-05 | fail→pass | 25,257 | 13,098 | -48% | 1 | 1 | 0% | 6,186 | 5,036 | -19% | 0 | 0 | — |
case-06 | pass→pass | 6,329 | 5,138 | -19% | 1 | 1 | 0% | 962 | 4,961 | +416% | 0 | 0 | — |
case-07 | fail→pass | 8,812 | 2,976 | -66% | 1 | 1 | 0% | 1,449 | 4,743 | +227% | 0 | 0 | — |
case-08 | fail→pass | 19,220 | 1,865 | -90% | 1 | 1 | 0% | 1,143 | 4,436 | +288% | 0 | 0 | — |
case-09 | fail→pass | 15,734 | 13,011 | -17% | 1 | 1 | 0% | 2,665 | 6,334 | +138% | 0 | 0 | — |
case-10 | pass→pass | 11,647 | 10,260 | -12% | 1 | 1 | 0% | 1,971 | 5,858 | +197% | 0 | 0 | — |
case-11 | fail→pass | 11,767 | 3,939 | -67% | 1 | 1 | 0% | 2,080 | 4,891 | +135% | 0 | 0 | — |
case-12 | fail→pass | 22,025 | 3,623 | -84% | 1 | 1 | 0% | 1,929 | 4,758 | +147% | 0 | 0 | — |
case-13 | pass→pass | 8,434 | 3,880 | -54% | 1 | 1 | 0% | 1,309 | 4,719 | +261% | 0 | 0 | — |
case-14 | fail→pass | 10,341 | 5,145 | -50% | 1 | 1 | 0% | 1,620 | 5,043 | +211% | 0 | 0 | — |
case-15 | pass→pass | 9,480 | 4,136 | -56% | 1 | 1 | 0% | 1,563 | 4,859 | +211% | 0 | 0 | — |
case-16 | fail→pass | 20,378 | 2,276 | -89% | 1 | 1 | 0% | 1,700 | 4,582 | +170% | 0 | 0 | — |
case-17 | fail→pass | 3,700 | 3,973 | +7% | 1 | 1 | 0% | 575 | 4,746 | +725% | 0 | 0 | — |
case-18 | pass→pass | 9,345 | 3,471 | -63% | 1 | 1 | 0% | 1,501 | 4,734 | +215% | 0 | 0 | — |
case-19 | fail→pass | 7,990 | 5,020 | -37% | 1 | 1 | 0% | 1,592 | 5,170 | +225% | 0 | 0 | — |
case-20 | pass→pass | 10,124 | 9,236 | -9% | 1 | 1 | 0% | 1,762 | 5,616 | +219% | 0 | 0 | — |
case-21 | fail→pass | 6,838 | 2,305 | -66% | 1 | 1 | 0% | 1,264 | 4,561 | +261% | 0 | 0 | — |
case-22 | fail→pass | 7,432 | 4,430 | -40% | 1 | 1 | 0% | 1,621 | 5,117 | +216% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +59 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.