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.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.svg" alt="Measured on agentmods" 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 $0.00032 $0.00432
Sonnet 5 $0.00013 $0.00173
Haiku 4.5 $0.00006 $0.00086

Measured 6d ago against content hash 2fbeacf1f940, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 6d 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. 6d 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 17d ago), licensed MIT. It adds 63 tokens to every session and 865 once invoked, about $0.0003 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

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens

chengfeng-check-updates

An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens