agentsclimarketplace

Gpt image

Skill leessju/get-image-2/skills/gpt-image

Use this skill whenever a user asks to generate, create, draw, render, or edit images with GPT Image 2 / gpt-image-2, text-to-image, reference-image editing, inpainting, posters, typography, Chinese text, UI mockups, diagrams, or gallery prompts. Analyze the user's prompt, search the bundled Reference Gallery/craft files for matching design patterns, confer on direction when useful, then call the packaged `gpt-image` CLI or bundled `scripts/generate.py`. Do not write new image-generation code unless explicitly asked to modify this repo.From its SKILL.md

Install
npx -y skills add leessju/get-image-2 --skill gpt-image

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.3 KB, as published. Nobody here has run it

gpt-image

Agent runbook for GPT Image 2 generation/editing. Use the prompt library + packaged CLI. Do not reimplement image API code.

Operating loop

  1. Classify request: generate, edit, inpaint, or multi-reference; identify asset type, exact text, aspect ratio, references, safety constraints, and budget/quality.
  2. Search references first: open references/gallery.md; load/search the closest references/gallery-<category>.md file(s). Read actual **Prompt** text before choosing a pattern.
  3. Refine with craft: load references/craft.md for dense text, diagrams, UI, data visualization, multi-panel layouts, weak prompts, or no close gallery match.
  4. Confer when useful: before costly/ambiguous/high-polish calls, present 1–3 matched directions plus planned size/quality; ask at most one concise question. Skip long discussion for precise “generate now” requests.
  5. Preflight, no side effects: use existing CLI/skill if present. Check command availability (command -v gpt-image), installed tool lists when the tool manager exists, or the runtime’s own skill registry when available. Do not assume a local home path in cloud/hosted runtimes.
  6. No blind setup: do not reinstall, overwrite skill folders, create/modify .env, or write API keys unless the user explicitly requested setup. Global/shared installs are opt-in only.
  7. Execute via CLI only: call gpt-image or scripts/generate.py. Do not create a new generate.py, SDK wrapper, or ad-hoc script for normal image requests.
  8. Report: output file path(s), key flags, and one concise refinement suggestion if useful.

Fast path: precise prompt + explicit “generate now” → quick reference/craft check, then CLI.

CLI resolution

Preferred call order:

# Existing CLI on PATH
gpt-image -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]

# Installed skill folder; use runtime-provided skill path when available
uv run "$SKILL_DIR/scripts/generate.py" -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]

# Direct transient CLI when the user requested setup/one-off CLI execution
uvx --from git+https://github.com/wuyoscar/gpt_image_2_skill gpt-image -p "PROMPT" [options]

scripts/generate.py is a launcher: repo-local src/gpt_image_cli → installed gpt-image → PATH gpt-image → transient uvx/uv fallback.

Codex execution rules

  • CLI delegates image work to codex exec --json --enable image_generation --cd <workdir> --model <model> and relies on the user's existing Codex login/subscription/session flow.
  • --model selects the Codex model for the delegated run. Set GPT_IMAGE_CODEX_MODEL to change the default.
  • The CLI parses Codex JSONL/stdout/exit code, finds generated files under ~/.codex/generated_images/<thread_id>/, copies them to the requested output path(s), and verifies the files exist.
  • By default the delegated run uses --sandbox workspace-write. Use --dangerously-bypass-approvals-and-sandbox only when the local Codex policy blocks an otherwise trusted image job.
  • Use --codex-timeout to cap long delegated runs. Default is 300 seconds.
  • Do not create, read, or ask for OpenAI API key files for this skill.
  • Never print secret values.

Flags

FlagValuesUse
-p, --promptstringRequired prompt/edit instruction
-f, --filepathOutput path; auto-named if omitted
-i, --imagerepeatable pathUse edits endpoint; supports multiple references
-m, --maskPNG pathInpaint with alpha mask; requires -i
--modeldefault from GPT_IMAGE_CODEX_MODEL or gpt-5.4-miniCodex model for the delegated run
--size1k, 2k, 4k, portrait, landscape, square, wide, tall, or literalCanvas size
--qualitylow, medium, high, autoCost/quality dial
-n, --nintegerNumber of images
--backgroundauto, opaqueGeneration background
--moderationauto, lowGeneration moderation setting
--formatpng, jpeg, webpOutput encoding
--compression0-100JPEG/WebP compression
--userstringOptional end-user identifier
--dangerously-bypass-approvals-and-sandboxbooleanForward Codex's dangerous bypass flag for trusted local runs only
--codex-timeoutsecondsTimeout for the delegated Codex run
--log-filepathJSONL timing diagnostics path
--no-logbooleanDisable timing diagnostics

Quality policy:

  • low: cheap drafts, broad exploration, many variants.
  • medium: normal exploration, style probing, balanced cost.
  • high: final assets, Chinese text, posters, diagrams, UI, paper figures, dense labels.

Size policy:

  • default/social square: 1k / 1024x1024
  • poster/mobile/beauty: portrait
  • landscape/gameplay/photo: landscape
  • print/paper figure: 2k
  • widescreen hero: 4k
  • vertical story/banner: tall

Delegation routing

ModeTriggerDelegated Codex inputs
Text-to-imageno -iprompt + requested output path(s)
Reference editone or more -iprompt + attached reference image(s)
Inpaint-i + -mprompt + attached reference and mask image(s)

Surface Codex CLI errors verbatim enough for debugging; exit codes: 0 success, 1 generation/refusal/missing output, 2 bad args/missing Codex CLI.

Reference loading

  • references/gallery.md: routing index for the 162-prompt Reference Gallery Atlas. Load first.
  • references/gallery-*.md: concrete prompts, previews, paths, metadata, attribution. Load 1 category for normal requests; 2–3 for hybrids.
  • references/craft.md: prompt-craft checklist. Load for prompt repair, exact text, UI/data/diagram grammar, edit invariants, and multi-panel consistency.
  • references/openai-cookbook.md: official parameter/model semantics. Load for API behavior or model capability questions.

Reference loading policy: load the smallest useful slice; never load all category files by default.

Verification

  • Before API call: confirm endpoint mode, size, quality, output path, and required reference/mask files.
  • After CLI call: report path(s) printed by the CLI and surface stderr on failure.
  • For edits/inpaints: verify -i paths exist; verify -m exists when used.

Preserve Curated vs Author + Source metadata when adapting examples. Add new collected prompts to the Reference Gallery before README promotion.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.