media-image-gen

Installation
SKILL.md

media-image-gen

Turn the user's loose visual brief into a well-engineered GPT Image 2 prompt, generate the asset, and log cost. Built around OpenAI's official prompting guide — see PROMPTING.md in this directory for the full distilled cookbook.

Setup: TypeScript CLI (cli.ts) — run pnpm install in this directory once (needs Node.js ≥ 18). Auth either way:

  • API key (default): in ~/.config/image-gen/env as export OPENAI_API_KEY=sk-…, or exported in shell.
  • ChatGPT plan (default when signed in): no API key — bills your ChatGPT Plus/Pro quota. Run pnpm exec tsx cli.ts setup once to sign in; after that it's used automatically unless you pass --api. See the auth section below.

Usage log at ~/.config/image-gen/usage.jsonl.

Your job

  1. Classify the request into one of these categories: logo | illustration | photoreal | infographic | ui-mockup | ad | story-panel | style-transfer | edit
  2. Interview the user for anything missing. Ask one short message — no questionnaires. The critical fields by category are listed below.
  3. Assemble the prompt using the structure in PROMPTING.md: Scene → Subject → Details → Composition → Constraints. Quote literal text. Spell tricky words letter-by-letter.
  4. Show the user the final prompt + estimated cost (--dry-run first if you're unsure).
  5. Call cli.ts generate or cli.ts edit and report the actual cost.
  6. Iterate small. Single-change edits — "change only X, keep everything else the same" — and repeat the preserve list each turn (per the cookbook's anti-drift rule).
Installs
2
GitHub Stars
26
First Seen
Oct 29, 2026