paper-agent: Skill for Claude Code

.claude/skills/image-gen/SKILL.md

image-gen is a skill for Claude Code from Guo-Chenxu/paper-agent. It costs 48 tokens per session (597 once invoked), scanned A, original, Apache-2.0.

An image-generation guide for creating figures such as diagrams, flowcharts, architecture illustrations, and method graphics for academic papers or reports.

In plain words
What is it for?
Use it to generate paper figures, revise them from feedback, and save matching image and PDF files for LaTeX or similar documents.
Why use it?
It helps produce visual explanations when text or measured-data plots are not enough.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths.

This is Guo-Chenxu/paper-agent's own configuration. It tells Claude Code how to work on paper-agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything paper-agent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Guo-Chenxu/paper-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Guo-Chenxu/paper-agent/main/.claude/skills/image-gen/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Guo-Chenxu/paper-agent

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for image-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/guo-chenxu/paper-agent/image-gen/github.svg)](https://agentmods.dev/skills/guo-chenxu/paper-agent/image-gen)
Your own site
<a href="https://agentmods.dev/skills/guo-chenxu/paper-agent/image-gen"><img src="https://agentmods.dev/badge/skills/guo-chenxu/paper-agent/image-gen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for image-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/guo-chenxu/paper-agent/image-gen"><img src="https://agentmods.dev/badge/skills/guo-chenxu/paper-agent/image-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 597 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00048 $0.00597
Opus 5 $0.00024 $0.00298
Sonnet 5 $0.00010 $0.00119
Haiku 4.5 $0.00005 $0.00060

Measured 9d ago against content hash 23130e532974, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

image-gen 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 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/generate_image.py, scripts/image2pdf.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/image-gen/SKILL.md · 80 lines

How it starts

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

Image Generation Skill

When To Use

Use this skill when a paper or report needs generated visual material:

  1. Generate architecture diagrams, flowcharts, method illustrations, and other figures that need to be inserted into a paper.
  2. Add or redraw figures based on writing, reviewer, or human feedback.
  3. Save a generated image to figures/ and provide a same-name PDF.

Do not use this skill for experiment plots that should be produced from measured data. Those belong in the experiment/visualization code.

Configuration

The script reads model configuration from repository .env:

  • IMAGE_GEN_API_KEY
  • IMAGE_GEN_BASE_URL
  • IMAGE_GEN_MODEL
  • IMAGE_GEN_VENDOR

Supported vendor values:

  • gemini: calls Gemini-style generateContent image output.
  • openai or gpt-image: calls OpenAI-compatible /v1/images/generations.

For gpt-image, set for example:

IMAGE_GEN_VENDOR=gpt-image
IMAGE_GEN_MODEL=gpt-image-1

Workflow

  1. Write a precise prompt that includes the figure purpose, desired layout, labels, and academic style.
  2. Run the generator from the repository root.
  3. Verify both image and PDF outputs exist in figures/.
  4. Insert the PDF in LaTeX unless the template specifically requires raster images.

Example:

python .claude/skills/image-gen/scripts/generate_image.py \
  --name fig_architecture \
  --prompt "Create a clean academic architecture diagram for ... Use white background, vector-like style, and readable labels."

Expected outputs:

  • figures/fig_architecture.png or figures/fig_architecture.jpg
  • figures/fig_architecture.pdf

Script

  • scripts/generate_image.py: loads .env, calls the configured image model, saves the generated image under figures/, then converts it to PDF.
  • scripts/image2pdf.py: converts an existing generated image into a same-name PDF vector wrapper.

Required PDF conversion dependency:

python -m pip install img2pdf

Quality Checks

Before considering the figure complete:

Read the full file on GitHub · 80 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 80 lines · 48 tokens per session scan A 23130e532974

Subscribe to this mod's changes

image-gen is a skill published in the GitHub repository Guo-Chenxu/paper-agent (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 48 tokens to every session and 597 once invoked, about $0.0002 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-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

A workflow for generating academic illustrations, such as architecture diagrams and method visuals, with image generation and repeated review. Claude plans and checks the figure during the process.

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

paper2video

Turn a research paper, a paper2assets package, or an existing PPT deck into a narrated MP4 video by fully delegating slide authoring to the installed ppt-master skill and fully delegating rendering, subtitles, timeline assembly, and strict media QA to the installed pptx2video skill and its public CLI. Resolves one…

microsoft/ResearchStudio · 157 tokens

figure-composer

Compose one publication-grade multi-panel figure. Start from a one-line claim plus immutable data Artifact Version references, or inspect an existing figure and draft its outline directly. Plan a 12-column panel outline, delegate one worker per panel, compose and inspect the result, then run at most three adversarial…

aipoch/open-science · 93 tokens