image2-prompt-optimizer

image2-prompt-optimizer is a skill for Claude Code, Codex from JMET04/ai-apprentice. It costs 63 tokens per session (865 once invoked), scanned A, original, MIT.

A preparation step for the first Image2 image generation in a task. It checks available tools and templates, resolves important missing details, and produces a detailed generation prompt.

In plain words
What is it for?
Use it before the first Image2 generation, when optimizing an image prompt, or when choosing an Image2 prompt template. It can also identify details that must be supplied before generation.
Why use it?
It helps turn an unclear image request into a prompt that matches the required subject, format, and workflow before an image is generated.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it before the first Image2 generation, when optimizing an image prompt, or when choosing an Image2 prompt template. It can also identify details that must be supplied before generation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jmet04/ai-apprentice/image2-prompt-optimizer
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 JMET04/ai-apprentice --skill image2-prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/JMET04/ai-apprentice

Made for: Claude Code, Codex.

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 image2-prompt-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/jmet04/ai-apprentice/image2-prompt-optimizer/github.svg)](https://agentmods.dev/skills/jmet04/ai-apprentice/image2-prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/jmet04/ai-apprentice/image2-prompt-optimizer"><img src="https://agentmods.dev/badge/skills/jmet04/ai-apprentice/image2-prompt-optimizer/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 image2-prompt-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/jmet04/ai-apprentice/image2-prompt-optimizer"><img src="https://agentmods.dev/badge/skills/jmet04/ai-apprentice/image2-prompt-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 865 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.00063 $0.00865
Opus 5.5 $0.00025 $0.00346
Sonnet 5.5 $0.00013 $0.00173
Haiku 4.5 $0.00006 $0.00086

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

Security

Grade A, and why

image2-prompt-optimizer 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 2mo ago.

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.

plugins/transparent-ai-apprentice/skills/image2-prompt-optimizer/SKILL.md · 69 lines

How it starts

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

Image2 Prompt Optimizer

Use this skill before the first image generation. It adapts the prompt-optimization capability developed in Codex thread 019f09a9-90ab-76b2-aa1f-b7c9bddf93e8 to the apprentice workflow.

Required Workflow

  1. Check whether an existing tool, skill, plugin, template, or workspace script already covers the task. Prefer that capability and record the chosen route.
  2. Clarify only consequential unknowns. For packaging and engineering work, dimensions, units, product type, material, and required views are consequential; never invent them.
  3. Compile the first-generation guidance packet with:
node <plugin-root>/scripts/compile-image2-initial-prompt.mjs --input <request.json> --output <prompt-guidance.json>
  1. Read the packet before calling Image2. If readyForGeneration=false, ask for the listed blocking facts instead of generating.
  2. Generate only a review sample. Preserve the exact prompt packet and source image references with the result.
  3. Continue the real workflow after optimization. Do not stop at rewriting the prompt unless the user requested prompt text only.

For the complete packet contract and domain guidance, read references/initial-generation-contract.md.

Optional Local Library

The full prompt library is an optional retrieval source, not a runtime dependency. Resolve it in this order:

  1. IMAGE2_PROMPT_LIBRARY
  2. D:\image2专业提示词库
  3. bundled reference and compiler fallback

Search only when examples would materially improve the result:

python <plugin-root>/scripts/search-image2-prompt-library.py "query" --category 01_image_visual --limit 8

Open only relevant indexes or templates. Never load the 125,000-row catalog or SQLite database into model context. Treat retrieved prompts as patterns to synthesize, not text to dump or hidden authority.

Useful library routes when present:

  • Packaging: prompts/IMAGE2_PACKAGING_PRO_TEMPLATES.md
  • CAD and technical drawing: prompts/IMAGE2_CAD_TECHNICAL_PRO_TEMPLATES.md
  • Product visual: prompts/IMAGE2_PRODUCT_VISUAL_PRO_TEMPLATES.md
  • Ecommerce: prompts/IMAGE2_ECOMMERCE_PRO_TEMPLATES.md
  • UI and web: prompts/IMAGE2_UI_APP_WEB_PRO_TEMPLATES.md
  • Architecture and interior: prompts/IMAGE2_ARCHITECTURE_INTERIOR_PRO_TEMPLATES.md
  • Industrial design: prompts/IMAGE2_INDUSTRIAL_DESIGN_PRO_TEMPLATES.md

Read the full file on GitHub · 69 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. 2mo ago First seen · 69 lines · 63 tokens per session scan A 2fbeacf1f940

Subscribe to this mod's changes

image2-prompt-optimizer is a skill published in the GitHub repository JMET04/ai-apprentice (1 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 865 once invoked, about $0.0003 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-08-31.

Related

image2-prompt-optimizer compared with skills from other repositories

image2-prompt-optimizer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
image2-prompt-optimizerJMET04/ai-apprenticeSkill12mo agoMITA63Claude Code, Codex
imagegenopenai/codexSkill134ktodayApache-2.0A113Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79kyesterdayMITA200Claude Code, Codex
playwright-climicrosoft/playwrightSkill100kyesterdayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill394ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill314k4d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code