generate-image

generate-image is a skill for Claude Code from synthetic-sciences/openscience. It costs 103 tokens per session (1,590 once invoked), scanned A, original, Apache-2.0.

A library for extracting structured data from AI responses and checking it against Pydantic schemas, which define the required fields and types. It can retry failed extractions and stream partial results.

In plain words
What is it for?
Use it to turn model responses into validated Python objects, parse complex JSON, and support several AI providers.
Why use it?
It reduces the manual work of checking whether an AI response has the expected shape and values.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to turn model responses into validated Python objects, parse complex JSON, and support several AI providers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/synthetic-sciences/openscience/generate-image
About the project

synthetic-sciences/openscience is an AI workbench that carries out scientific research by reading papers, forming hypotheses, writing and running code, conducting experiments, analyzing results, and preparing reports. Researchers use it for work in machine learning, biology, physics, and chemistry with remote or local models. Catalogue add-ons extend its scientific workflows through skills and instructions.

synthetic-sciences/openscience · 4,160 stars · on GitHub · openscience.sh

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.

Any agent
npx skills add synthetic-sciences/openscience --skill generate-image
Clone the repo
git clone --depth 1 https://github.com/synthetic-sciences/openscience

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 generate-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/synthetic-sciences/openscience/generate-image/github.svg)](https://agentmods.dev/skills/synthetic-sciences/openscience/generate-image)
Your own site
<a href="https://agentmods.dev/skills/synthetic-sciences/openscience/generate-image"><img src="https://agentmods.dev/badge/skills/synthetic-sciences/openscience/generate-image/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 generate-image

Your own site · 80×15
<a href="https://agentmods.dev/skills/synthetic-sciences/openscience/generate-image"><img src="https://agentmods.dev/badge/skills/synthetic-sciences/openscience/generate-image.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,590 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 22
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00103 $0.01590
Opus 5.5 $0.00041 $0.00636
Sonnet 5.5 $0.00021 $0.00318
Haiku 4.5 $0.00010 $0.00159

Measured 1mo ago against content hash c7a03d15f73d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generate-image 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate_image.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.

backend/cli/skills/core/generate-image/SKILL.md · 126 lines

How it starts

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

Generate Image

Generate or edit an image with the native generate_image tool. The tool keeps credentials in the trusted host, renders through whichever route the person has, and saves the image into the connected workspace, where read opens it for inspection and a manuscript includes it directly.

The route

The environment line Image generation: says whether a route exists and which one:

  • Ace: the managed account. Renders Nano Banana Pro (google/gemini-3-pro-image) and settles the cost from the Wallet, like any other Ace request. One reference image per request.
  • A Gemini key the user connected in Customize → Models: Nano Banana Pro (gemini-3-pro-image) on their own account, up to 14 reference images.
  • An OpenAI key the user connected: GPT Image 2 (gpt-image-2) on their own account, reference images as an edit.

A personal OpenRouter key is not a route. When the line says image generation is unavailable, say once that it needs Ace or a Gemini or OpenAI key connected in Customize → Models, then continue with the rest of the request. Never ask the user to paste a key into chat, never call the tool to "check", and never draw the image by hand as TikZ, SVG, Graphviz or matplotlib shapes in its place.

Tool contract

Call generate_image with:

  • prompt (required): what the image shows and how. Prompt quality decides output quality more than the model does. Name, in one sentence each: the subject and how much of it is in frame ("a single pipette tip above a 96-well plate"); the medium and style (scientific illustration, flat vector, watercolour, 3D render, photograph); the lighting and palette ("soft diffuse light, cool blue and white palette"); the composition ("wide shot, subject left of centre, empty space on the right for a title"); and what to avoid ("no text, no labels, no watermark"). Any text that must appear is quoted verbatim. Asking for empty space where a caption or title will go is the single most useful compositional instruction for posters and slides.
  • purpose: illustration for a conceptual figure or graphical abstract (the tool prepends publication framing: clean background, restrained palette, no invented text or data); edit when changing an existing image; schematic belongs to the schematics skill.
  • output_path: destination in the workspace, .png (any route), .jpg or .webp (Ace and OpenAI). Default generated-image.png.
  • input_path: an existing image to edit. Omit it entirely for a new image; never pass a directory, ., /dev/null or a blank canvas.
  • reference_paths: existing images whose style or components the result should follow. Up to 14 on a Gemini or OpenAI key; on Ace pass one image in total (either input_path or one reference).
  • aspect_ratio: 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16 or 21:9, from the slot the image fills.
  • image_size: 1K while iterating (default), 2K for anything printed, 4K only for a poster or cover.

Read the full file on GitHub · 126 lines

Files

What ships with it

1 file 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. 1mo ago Changed · +48 lines · +36 tokens per session c7a03d15f73d
  2. 1mo ago First seen · 78 lines · 67 tokens per session scan A 55ec6967055e

Subscribe to this mod's changes

generate-image is a skill published in the GitHub repository synthetic-sciences/openscience (4,160 stars, last pushed yesterday), licensed Apache-2.0. It adds 103 tokens to every session and 1,590 once invoked, about $0.0004 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

system-prompts

Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.

can1357/oh-my-pi · 40 tokens

tool-prompt-optimization

Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…

can1357/oh-my-pi · 0 tokens

gno

Search local documents, files, notes, and knowledge bases. Index directories, search with BM25/vector/hybrid, get AI answers with citations. Use when user wants to search files, find documents, query notes, look up information in local folders, index a directory, set up document search, build a knowledge base, needs…

gmickel/gno · 86 tokens

knowledge-model-and-provider-runtime-provider-resilience-admission-and-observability

A codebase guide for handling unreliable AI provider requests across agents and sessions, including retries, circuit breakers, fair queues, stalled streams, cache tracking, and health checks.

echoVic/blade-code · 184 tokens

journal

A mirror for emotional truth. Use when the user wants to journal, reflect, or "tell me the truth about how I feel." Goes for the feeling beneath the event, names avoidance, and refuses easy answers — not a cheerful prompt list.

lvndry/jazz · 51 tokens

knowledge-model-and-provider-runtime-model-catalog-configuration-and-credentials

A codebase guide for defining AI models and providers, selecting endpoints and credentials, configuring fallback channels, and migrating model identifiers.

echoVic/blade-code · 160 tokens