wuyoscar/gpt-image2-skill

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.

Ver código fuente

Ver en acción

Ejemplo del autor

Fictional watch: exploded-view author gallery example

The repository author generated this Curated gallery sample with gpt-image-2.5-sunburst, quality high, at 2048×2048 on 2026-09-09. The watch and added dimensions are illustrative, not validated manufacturing instructions. This is an author-published generation, not a site-run installation test or a guarantee about other models.

Fictional watch: exploded-view author gallery example
Ver imagen completa

Entrada de ejemplo

Create a premium technical exploded-view illustration of a fictional mechanical wristwatch called the Meridian 8, centered on a dark slate background with fine blueprint grid accents. Show the watch components separated vertically with precise spacing: sapphire crystal, dial, hands, chapter ring, movement plates, escapement, balance wheel, mainspring barrel, case, crown, and leather strap sections. Use realistic brushed steel, brass, ruby jewel accents, and deep navy dial details. Add crisp callouts and labels with the in-image text "Meridian 8", "Exploded Assembly", "42 mm Case", "25 Jewels", and "Power Reserve 72 h". Include numbered callouts "01" through "10" with short labels like "Balance Wheel", "Mainspring Barrel", and "Sapphire Crystal". The result should be highly detailed, technically believable, sharply rendered, and suitable for an industrial design plate with clean hierarchy, exact labeling, and refined material realism.

Resultado de ejemplo

Original 2048×2048 exploded-view concept of a fictional mechanical watch.
Licencia

Lossless WebP at original resolution; decoded RGB pixels verified identical. Complete original prompt and explicit source-run model retained.

MIT License

Copyright (c) 2026 Wuyoscar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Ejemplo del autor

Thriller poster: original downward-shadow result

The repository author generated this Curated sample with gpt-image-2.5-sunburst, quality high, at 768×1024 on 2026-09-09. The shadow visibly points down-right rather than up into the title as requested. The film and credits are fictional. This is an author-published generation, not a site-run installation test or a guarantee about other models.

Thriller poster: original downward-shadow result
Ver imagen completa

Entrada de ejemplo

A Saul-Bass-style minimalist thriller movie poster, 3:4 portrait. Off-white paper background with subtle vintage grain. Large flat-color cut-paper shapes, bold geometry, negative-space illusion.

Composition: a single stylised human silhouette in crimson running across centre; the shadow warps into a knife blade pointing up into the title. Black ink-brush splatter across the lower third. A single yellow eye motif in the upper-left negative space.

Exact typography:
- Title (large hand-lettered serif, black): "THE LAST HEIR"
- Tagline (small caps sans-serif, dark red): "EVERY FAMILY KEEPS A SECRET. HIS WILL BURY THEM ALL."
- Bottom credit block: "PRODUCERS JANE NORRIS  LEWIS HAHN    DIRECTED BY MAYA ALVAREZ    A CINERA RELEASE    IN CINEMAS OCTOBER 31"

Palette: cream, charcoal black, crimson red, mustard-yellow accent. Pure flat graphic design, no photo elements, no gradients, no 3D — in the lineage of Bass's "Anatomy of a Murder", "Vertigo", and "The Man with the Golden Arm".

Resultado de ejemplo

Original 768×1024 illustrated thriller poster; the downward shadow limitation is preserved.
Licencia

Lossless WebP at original resolution; decoded RGB pixels verified identical. Complete original prompt and explicit source-run model retained.

MIT License

Copyright (c) 2026 Wuyoscar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Cómo usar

  1. Copia el comando y revisa el paquete antes de instalarlo en tu entorno de agente.
  2. Consulta las herramientas, credenciales y entornos necesarios en el documento original.
  3. Describe las entradas y el resultado deseado; contrasta la salida con las fuentes.
npx skills add https://github.com/wuyoscar/gpt-image2-skill --skill gpt-image

Antes de empezar

  • La instalación no incluye suscripción al modelo, cuota API ni permisos sobre tus archivos.
  • Las estrellas e instalaciones reflejan actividad, no una prueba independiente de calidad o seguridad.
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

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:

bash
# 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.

Key and cost rules

  • CLI reads OPENAI_API_KEY from process env, then .env, then ~/.env without overriding existing env; successful API calls may bill the user’s OpenAI account.
  • If host/runtime has native platform-managed image generation and the user wants that path, use the host tool instead of this CLI.
  • If OPENAI_API_KEY is unset, report missing key or use host-native generation when requested; do not write secrets.
  • If user wants to avoid local-key use, respect unset OPENAI_API_KEY; if a key exists in .env/~/.env, tell them to remove/rename it for the session rather than working around it.
  • 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 gpt-image-2Image model
--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

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

Endpoint routing

ModeTriggerEndpoint
Text-to-imageno -i/v1/images/generations
Reference editone or more -i/v1/images/edits
Inpaint-i + -m/v1/images/edits with mask

Surface API errors verbatim enough for debugging; exit codes: 0 success, 1 API/refusal, 2 bad args/missing key.

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.

Relacionados por tarea

del mismo repositorio

Más Skills

Todos los Skills