SuperAPI AI Directory

gpt-image-2

Design & creation

View repository

Updated 10-15 20:27

About this skill

GPT Image 2

This is a focused skill for GPT Image 2 that works in all 3 runtime environments, but its behavior differs significantly.The first step must be to determine the current runtime mode。

It only performs two types of image tasks:

  • Generate images:POST /images/generations
  • Edit images:POST /images/edits

This file retains: runtime modes, skill structure, environment variables, save / naming rules, template index, mode-aware workflow. All detailed templates are placed in references/, organized hierarchically:

  • Level one: category directories
  • Level two: individual template Markdown files

Runtime modes (required reading, determine before doing anything)

This Skill comes with a lightweight detection script; run it once first, then decide how to work based on the result:

node skills/gpt-image-2/scripts/check-mode.js
# 想拿结构化结果给上层程序用:
node skills/gpt-image-2/scripts/check-mode.js --json

The output will provide mode = A / A? / B-or-C as well as recommendation. The three modes are defined as follows:

Mode A · Garden local image generation

Trigger condition: environment variable ENABLE_GARDEN_IMAGEGEN is true (1 / true / yes / on)and exists OPENAI_API_KEY。

Behavior: complete end-to-end run-through of "select template → write prompt → call script → generate image and write to disk".

  • Use scripts/generate.js for text-to-image,scripts/edit.js to edit existing images.
  • By default, prompts are written to garden-gpt-image-2/prompt/, and images are written to garden-gpt-image-2/image/。
  • This is the most powerful mode: you are the "holder" of the image tool.

Mode B · Host-Native delegates image generation to the host

Trigger condition: Garden is not enabled (ENABLE_GARDEN_IMAGEGEN is not set / is false), butthe current host Agent has a built-in image generation tool or image MCP。

Typical识别信号(you should self-check):

  • in your toolset there appears image_generation / imagegen / dalle / nano_banana / mcp__*image* / make_image / a similar name
  • the user invokes this Skill in a client that supports native image generation, such as ChatGPT / Codex / Gemini / Cursor
  • the user explicitly says "use your own tool to generate the image"

Behavior: this Skill degenerates into prompt engineering guidance——

  1. Still follow the process of "select template → fill fields → render final prompt".
  2. Do not call node scripts/generate.js(there is no API key, it will definitely fail).
  3. Directly call the host's built-in image tool, using the rendered prompt as input.
  4. If the user wishes, you may also conveniently save the prompt file to garden-gpt-image-2/prompt/, but where the image goes is determined by the host and is not mandatory.

Mode C · Advisor pure prompt consultant

Trigger condition: Garden is not enabled,andthe host Agent also has no image generation tool.

Behavior: this Skill degenerates into a "high-quality prompt writing consultant"——

  1. Follow the process of "select template → fill fields → render final prompt"; if information is missing, ask the user.
  2. Print the final prompt directly to the user + save a copy to garden-gpt-image-2/prompt/<task-slug>-<timestamp>.md。
  3. Add a brief "how to use" suggestion (e.g., drop it into ChatGPT / Midjourney / DALL·E / Sora / Nano Banana / your own backend / a third-party GPT Image 2 gateway).
  4. Do not pretend the image was generated successfully. Clearly tell the user: "A high-quality prompt ready for direct reuse has been generated, please execute it with your image tool."

Mode Decision Table

Condition Mode Call script? Save prompt to disk? Save image to disk?
ENABLE_GARDEN_IMAGEGEN=1 + has KEY A ✅ generate.js / edit.js ✅ Automatic ✅ Automatic
ENABLE_GARDEN_IMAGEGEN=1 but no KEY A? ❌ (KEY required first) — —
Not enabled + host has image tools B ❌ (use host tools) Optional Decided by host
Not enabled + host has no image tools C ❌ ✅ Required ❌ (impossible)

When the mode is uncertain

  • If you can't clearly tell whether you are B or C,just ask the user a single question: "Should I use the image tools in your environment to generate the image, or do you only need me to write the prompt?"
  • Mode A script call fails (401 / network / quota) → report the error and ask "switch to B / C?"

User Input Tools

When this skill needs to ask the user a question, follow these rules:

  1. Prefer the user input tool provided by the current runtime.
  2. If there is no corresponding tool, ask with a short plain-text numbered question.
  3. Ask as many questions as possible in one go.

Skill Structure

  • scripts/check-mode.js:Run this first, to detect the operating mode (A / B / C)
  • scripts/generate.js: text-to-image (used only by Mode A)
  • scripts/edit.js: image editing based on the original image / mask (used only by Mode A)
  • scripts/shared.js: shared logic for requests, saving, and environment variable reading
  • references/: layered structured prompt templates (used by all three modes A / B / C)

Environment Variables

Read the configuration in the following order:

  1. CLI arguments
  2. process.env
  3. <cwd>/.env
  4. <cwd>/.gateway.env
  5. ~/.gateway.env

Core variables:

  • ENABLE_GARDEN_IMAGEGEN — Mode switch。1 / true / yes / on enables Mode A; if unset or set to another value, enter Mode B / C.
  • OPENAI_API_KEY — required for Mode A; not needed for B / C.
  • OPENAI_BASE_URL — defaults to https://api.openai.com/v1, can point to a third-party compatible gateway.
  • OPENAI_IMAGE_MODEL — defaults to gpt-image-2, can be changed to a model supported by the gateway (e.g., gpt-image-1 / dall-e-3)。

The default implementation works with the OpenAI-compatible interface and does not hardcode any third-party gateway.

Default Output Directory

If the user does not explicitly specify an output path, use the following under the current workspace by default:

  • Prompt directory:garden-gpt-image-2/prompt/(Recommended for all three modes A / B / C, for easy reuse and version management)
  • Image directory:garden-gpt-image-2/image/(Used only by Mode A; Mode B is decided by the host, Mode C produces no image)

If the directory does not exist, the script (Mode A) must create it automatically; Mode B / C must manually create it before writing the prompt mkdir -p。

Default Naming Rules

If the user does not explicitly specify a file name, the script should automatically generate a file name related to the current task and append the current timestamp to avoid duplicate names.

Naming rules:

  • Prompt:garden-gpt-image-2/prompt/<task-slug>-<timestamp>.md
  • Image:garden-gpt-image-2/image/<task-slug>-<timestamp>.png

Where:

  • <task-slug>: Automatically extract a relevant short name based on the current user request
  • <timestamp>: Current timestamp, e.g. 20260424-153045

Example:

  • garden-gpt-image-2/prompt/live-commerce-ui-20260424-153045.md
  • garden-gpt-image-2/image/live-commerce-ui-20260424-153045.png
  • garden-gpt-image-2/prompt/vr-headset-exploded-view-20260424-153102.md
  • garden-gpt-image-2/image/vr-headset-exploded-view-20260424-153102.png

Prompt saving rules

Mode Whether prompt saving is mandatory Description
Mode A ✅ Mandatory Entering the actual generation / editing workflow must be persisted
Mode B Recommended Saving is recommended by default for easy reuse; if the user says "no", skip it
Mode C ✅ Mandatory The user takes the prompt and executes it themselves; not persisting it means the work is wasted

General rules (applicable to all three modes):

  1. If the user explicitly provides a prompt file path, that file can be used directly as input.
  2. If the user directly provides a text prompt, also first save the final prompt to garden-gpt-image-2/prompt/。
  3. If the user explicitly specifies --prompt-output, respect the user-specified path.
  4. Otherwise, use the default naming rules to save automatically.

Image saving rules (Mode A only)

  1. If the user explicitly specifies --image or --output, respect the user-specified path.
  2. Otherwise, save to garden-gpt-image-2/image/。
  3. by default. The filename should be semantically related to the current task and have a timestamp appended.

Mode B is determined by the host image tool for how to save; Mode C does not produce images.

Quick usage

0. Detect the running mode (the first step of any task)

node skills/gpt-image-2/scripts/check-mode.js

The output will tell you whether it is currently Mode A / B / C, determining whether to call generate.js / edit.js. The following 1~4 are used only under Mode A .

1. Text-to-image (Mode A)

node skills/gpt-image-2/scripts/generate.js \
  --prompt "A cute baby sea otter" \
  --size 1024x1024 \
  --quality high

2. Generate an image with a prompt file (Mode A)

node skills/gpt-image-2/scripts/generate.js \
  --promptfile garden-gpt-image-2/prompt/poster-20260424-153045.md

3. Edit an existing image (Mode A)

node skills/gpt-image-2/scripts/edit.js \
  --image assets/source.png \
  --prompt "Replace the background with a clean studio scene"

4. Local editing with a mask (Mode A)

node skills/gpt-image-2/scripts/edit.js \
  --image assets/source.png \
  --mask assets/mask.png \
  --prompt "Replace only the masked area with a glass vase"

5. "Usage" of Mode B / C

There is no command-line entry point—this Skill at this point is onlyPrompt engineering guide:

  • Mode B: Render the final prompt → call the host's built-in image_generation type of tool (pass the prompt in the parameters) → get the image.
  • Mode C: Render the final prompt → save to garden-gpt-image-2/prompt/<task-slug>-<timestamp>.md → display the content directly to the user → prompt the user in which image tools it can be directly reused.

How the JSON template works

When references/ provides a JSON template, use it according to the following rules:

  1. First, from SKILL.md find the closest category directory.
  2. Then locate the specific template file.
  3. In the template, {argument ...} indicates a replaceable parameter.
  4. Values explicitly provided by the user should be filled in directly.
  5. If the user does not provide it, but the template marks default , you can default to using the default value first.
  6. If missing information would significantly affect the result, proactively ask the user.
  7. The user can also explicitly say "you generate it randomly", in which case you can keep the default value or reasonably randomize within the range allowed by the template.

Questioning rules

When the template is missing key variables, do not ask vaguely, "What style do you want?". You should ask precisely based on the template fields.

For example, when a livestream UI template lacks a subject, ask first:

  • Who is the streamer?
  • Use a real person's photo, a celebrity name, a character description, or generate completely randomly?

When product information is missing, ask:

  • What is the product name?
  • Is the product price specified?
  • Do you want me to automatically fill in the comment and gift content?

Template index

Based on the task type, read only the most closely matching specific template file, do not read the entire references/。

1. Methodology master document

Read first:

  • references/prompt-writing.md

Applicable to:

  • You have not yet decided how to construct the JSON template
  • You need to determine which fields should be asked, which can be defaulted, and which can be randomized
  • You need to abstract cases into reusable templates

2. UI Mockups (references/ui-mockups/)

Suitable for various "interface + content" mockup visuals. Currently implemented:

  • live-commerce-ui.md — E-commerce livestream sales screenshot mockup (streamer + chat area + gift area + product card)
  • social-interface-mockup.md — Social platform post detail page mockup (Twitter/X, Xiaohongshu, Weibo, Threads, etc.)
  • product-card-overlay.md — Landing page hero / detail page main image (person + product + selling points + price)
  • chat-interface-scene.md — Chat / conversation interface mockup (iMessage, WeChat, group chat, AI assistant)
  • short-video-cover-ui.md — Short video cover / livestream thumbnail (YouTube, Douyin, Bilibili, VTuber stream)
  • landing-page-case-study.md — Dark SaaS / marketing case study long page UI mockup (multiple sections + scrolling narrative + data cards + CTA)

3. Product Visuals (references/product-visuals/)

Suitable for images with "the product as the visual center". Currently implemented:

  • exploded-view-poster.md — Product exploded view poster (subject stacked vertically + callouts + top logo + bottom brand area)
  • white-background-product.md — E-commerce pure white background main image (single item / multiple angles / minimalist marketing overlay)
  • premium-studio-product.md — High-end studio commercial product image (magazine advertising-level atmosphere)
  • packaging-showcase.md — Gift box / packaging display image (outer box + contents display)
  • lifestyle-product-scene.md — Lifestyle product scene image (product appearing in a real scene)
  • ecommerce-marketing-board.md — Chinese-style e-commerce super composite sales board (main image + detail page + selling points + usage steps + scenes + TVC storyboard combined in one image)

4. Maps (references/maps/)

Suitable for "map-type visuals" (infographics have been extracted into independent category 17). Currently implemented:

  • food-map.md — City food hand-drawn map (numbered points + legend + central mascot)
  • travel-route-map.md — Travel route map (multi-day itinerary / single-day city walk / outdoor route)
  • illustrated-city-map.md — Cityscape illustration map (landmarks + landscapes + cultural elements)
  • store-distribution-map.md — Brand store / service coverage distribution map
  • itinerary-day-trip-map.md — one-day tour split poster (left parchment itinerary card + right fantasy-realistic map, 5-7 stops strictly aligned)

5. Slides & Visual Docs (references/slides-and-visual-docs/)

Suitable for visual documents that "explain one thing clearly on one page". Currently implemented:

  • dense-explainer-slides.md — Irasutoya × Kasumigaseki mixed high-density explanatory Slide
  • policy-style-slide.md — Policy / government announcement / white paper style explanatory Slide
  • visual-report-page.md — Business report executive summary / investor briefing / annual report overview page
  • educational-diagram-slide.md — Teaching diagram (concept / mechanism / process breakdown)

6. Poster & Campaigns (references/poster-and-campaigns/)

Suitable for "brand key visual + campaign + banner + magazine cover". Currently implemented:

  • brand-poster.md — Brand main poster (product / person / text-only proposition)
  • campaign-kv.md — Campaign Key Visual + derivative layout system
  • banner-hero.md — Web hero / landing page / app banner (horizontal composition + CTA)
  • editorial-cover.md — Magazine / journal / publication cover
  • biomimetic-concept-poster.md — Bionic industrial design concept poster (natural prototype → evolution strip → hero render → multi-view technical drawing)
  • vintage-editorial-infographic.md — Retro archive / 1940s editorial infographic poster (figures + formulas + timeline + models, Bell Labs style)
  • character-catalog-poster.md — Multiple-version infographic poster for the same character (constellation / element / dynasty / personality series cards)
  • lineup-comparison-poster.md — Series product lineup comparison infographic poster (30+ SKUs in the same image + legend + tier key)

7. Portraits & Characters (references/portraits-and-characters/)

Suitable for "character visuals." Currently implemented:

  • professional-portrait.md — Professional business portrait (LinkedIn / team page / media image)
  • founder-portrait.md — Founder media feature portrait (dramatic lighting + reserved headline space)
  • virtual-host.md — VTuber / virtual streamer personal card + livestream preview
  • character-sheet.md — Character comprehensive setting sheet (three-view + expressions + clothing + color palette)
  • pose-reference-sheet.md — N×N pose / action dictionary reference sheet (same character in multiple poses, dance / combat / fitness)

8. Scenes & Illustrations (references/scenes-and-illustrations/)

Suitable for illustration-type visuals with "atmosphere + story + emotion." Currently implemented:

  • healing-scene.md — Healing everyday / seasonal scene illustration
  • concept-scene.md — Cinematic concept large scene / IP key art
  • picture-book-scene.md — Children's book / picture book interior page / holiday card
  • minimalist-mood-scene.md — Minimalist negative-space atmospheric image / literary wallpaper

9. Editing Workflows (references/editing-workflows/)

Suitable for image-editing tasks based on existing images (corresponding to scripts/edit.js). Currently implemented:

  • background-replacement.md — Background replacement (product / portrait / outdoor / studio scene)
  • local-object-replacement.md — Local object replacement (with or without mask)
  • object-removal.md — Clutter / passerby / power line / blemish removal
  • product-retouching.md — Product retouching (gloss / label / shadow / blemish)
  • portrait-local-edit.md — Local portrait modification (hairstyle / clothing / makeup / accessories)

10. Avatars & Profile (references/avatars-and-profile/)

Suitable for "personal image" visuals such as stylized avatars / character designs / grids / stickers / series portraits. Currently implemented:

  • style-transfer-selfie.md — Convert the person in the reference image into any style such as cosplay / gothic / retro film / idol photo
  • character-grid-portrait.md — n×n grid portraits of the same character (multiple professions / expressions / dynasties / styles)
  • themed-3d-icon.md — Kawaii 3D / Minecraft / skeuomorphic 3D app-icon-style avatars
  • sticker-set.md — Sticker set / emoji pack collection (standalone elements + outlines + labels)
  • cultural-portrait-series.md — Dynasty / mythology / literature / ethnic series portraits

11. Storyboards & Sequences (references/storyboards-and-sequences/)

Suitable for "narrative sequence" visuals such as multiple panels / comics / relationship diagrams / process steps. Currently implemented:

  • four-panel-comic.md — 4-panel comic / satirical comic / joke comic (introduction, development, turn, conclusion + speech bubbles)
  • manga-spread-page.md — Single-page / spread comic panels (irregular panels + dialogue + inner monologue)
  • anime-key-visual.md — Single-image anime KV / light novel cover / IP poster
  • character-relationship-diagram.md — Character relationship diagram poster (cards + relationship lines + legend)
  • recipe-process-flowchart.md — Recipe / tutorial / process step diagram (numbering + illustrations + descriptions)
  • product-tvc-storyboard.md — Product TVC commercial storyboard (9-panel live-action texture + shot description + duration)
  • cinematic-storyboard-grid.md — Cinematic narrative storyboard contact sheet (3×4 / 4×4, continuous narrative + cinematic still)
  • process-photo-board.md — Live-action cinematic process board (equipment wear / makeup / training / operation breakdown, numbered + progressive steps)

12. Grids & Collages (references/grids-and-collages/)

Suitable for "multi-panel grid / collage / project board" type visuals. Currently implemented:

  • banner-grid-2x2.md — 2×2 marketing banner set (4 unified series designs produced in one go)
  • lookbook-grid.md — 7-day lookbook / 9-grid self-care / TOP N list images
  • mixed-style-multi-panel.md — Multi-style mixed collage (same subject interpreted in different art styles)
  • anime-pitch-board.md — Anime / game / film and TV project pitch board (KV + characters + worldview + copy)
  • ad-banner-multi-grid.md — Multi-industry / multi-theme mixed advertising banner grid (each cell has an independent industry + style + copy)

13. Branding & Packaging (references/branding-and-packaging/)

Suitable for "brand identity system / mascot / packaging design" type visuals. Currently implemented:

  • brand-identity-board.md — Brand identity system board (logo + color palette + typography + application mockup)
  • mascot-brand-kit.md — Mascot multi-panel brand identity set (main character + three-view + expressions + applications)
  • cosmetic-packaging.md — Cosmetics / skincare single bottle / series / gift box packaging
  • beverage-label-design.md — Beverage / food / condiment label design (China-chic / Japanese-style / Western-style)
  • full-mascot-brand-doc.md — 18+ module large-scale brand identity + mascot full-process document(DNA / moodboard / sketches / line art / 3D / color palette / materials / applications overview in one image)
  • character-merch-board.md — IP character + merchandise / packaging / poster / social profile multi-element comprehensive brand board

14. Typography & Text Layout (references/typography-and-text-layout/)

Suitable for "text-first / bilingual layout" and other "text as primary visual" types. Currently implemented:

  • title-safe-poster.md — Large-type statement poster (Japanese high-energy / Swiss minimalist / retro print)
  • bilingual-layout-visual.md — Chinese-English / Chinese-Japanese bilingual layout visuals (culture / academic / cross-cultural branding)

15. Assets & Props (references/assets-and-props/)

Suitable for "icon sets / game screenshots" and other "set assets / game assets" type visuals. Currently implemented:

  • retro-skeuomorphic-icons.md — Skeuomorphic / Y2K / pixel icon sets (complete sets in a unified style)
  • game-screenshot-mockup.md — In-game screenshot mockup (HUD + subtitles + quest panel)

16. Academic Figures (references/academic-figures/)

Suitable for illustrations for "papers / top conference submissions / academic posters / defense PPTs / proposal defenses / journal submission Graphical Abstracts". Overall leans toward white background + publication typography + geometric precision + low-saturation engineering colors (mainly dark blue / gray-blue / black-gray, ≤3 primary colors) + printable in monochrome.Strictly prohibited to fabricate quantitative data(values / contour lines / color scale ranges / formulas).

CS / CV / ML direction:

  • method-pipeline-overview.md — Method overview figure / pipeline figure (multi-stage blocks + data flow; variant 4 provides an engineering-style left/middle/right three-part technical roadmap)
  • neural-network-architecture.md — Neural network architecture diagram (layer blocks + tensor shape + skip connections)
  • qualitative-comparison-grid.md — Multi-method qualitative comparison grid (rows = samples, columns = methods)

Engineering / natural sciences / general defense:

  • scientific-schematic.md — Conceptual / principle / experimental setup diagrams (high freedom, natural language templates)
  • mechanism-diagram.md — Mechanism diagrams / causal chains / transformation pathways (central object + multi-stage transformation + result area; includes three variants: three-part causal chain / cyclic self-excitation / multi-branch competition)
  • multi-condition-comparison.md — Multi-condition / multi-scenario result comparison figure(side-by-side results of the same object under different conditions, 2×2 / 1×N / M×N; emphasizes strict consistency across panels)
  • publication-chart.md — Publication-ready data charts (bar / line / scatter / heatmap / box)

Overview / abstract / defense cover page:

  • graphical-abstract.md — Journal submission Graphical Abstract / graphical abstract (four variants: horizontal 4-panel / center-out / square / vertical)
  • research-overview-poster.md — Research overview diagram for thesis proposal / defense / presentation title page (three layers top-middle-bottom + five modules; includes three variants: central radial / left-right two-column / minimalist)

Selection strategy: For CS/CV/ML papers, prefer method-pipeline-overview + qualitative-comparison-grid; for engineering / energy / chemical / materials fields, prefer method-pipeline-overview variant 4 + mechanism-diagram + multi-condition-comparison; for journal submission abstract figures use graphical-abstract; for defense PPT title pages use research-overview-poster。

17. Infographics (references/infographics/)

Suitable for "information visualization large images" such as "infographics / high-density popular science / hand-drawn infographics / KPI dashboards". Currently implemented:

  • legend-heavy-infographic.md — High-legend-density popular science / causal chain / evolution / anatomy diagrams (bilingual)
  • hand-drawn-infographic.md — Hand-drawn styleinfographics (macaron / morandi / blackboard / kraft paper; natural language templates)
  • bento-grid-infographic.md — Bento-grid modular infographics (high-density multi-module widget layout)
  • comparison-infographic.md — Binary / multivariate comparison infographics (A vs B / package tiers / misconceptions vs correct answers)
  • step-by-step-infographic.md — Step-by-step tutorial infographics (illustrative feel, warm; not engineering flowcharts)
  • kpi-dashboard-infographic.md — KPI dashboard-style infographics (year in review / Wrapped / business dashboard)

18. Technical Diagrams (references/technical-diagrams/)

Suitable for engineering diagrams such as "system architecture / process / sequence / state machine / ER / mind map / network topology". Unified dark grid background + monospace font + role-encoded color scheme, and every template comes with a light variant.

⚠️ Note: this directory generates PNG bitmaps,not editable SVG; if you need editable output, use mermaid / draw.io / excalidraw / Figma instead. Currently implemented:

  • system-architecture.md — System architecture diagram (frontend + backend + DB + cache + queue + external)
  • flowchart-decision.md — Flowchart / decision diagram (BPMN shape semantics + Yes/No branches)
  • sequence-diagram.md — Sequence diagram (actor + lifeline + message arrows + activation bars)
  • state-machine.md — State machine / lifecycle diagram (state + transition + guard / action)
  • er-diagram.md — ER diagram / data model diagram (entity + fields + PK/FK + crow's foot relationships)
  • mind-map-tech.md — Technical topic mind map (central + radial branches)
  • network-topology.md — Network topology diagram (device glyphs + zone / VPC + bandwidth / protocol labels)

Prompt workflow (mode-aware)

Regardless of A / B / C,the first 6 steps are shared; the difference is only in how steps 7-8 "produce the image".

  1. Run check-mode.js to determine the mode(A / B / C)。
  2. Determine whether the task is image generation or image editing.
  3. Identify which category directory it belongs to (refer to the "template index" below).
  4. Read only the corresponding specific template file,do not read the entire references/ at once。
  5. Strictly follow the template format: most templates use a JSON main template (preferred for structured tasks), while a few templates (infographics/hand-drawn-infographic.md、academic-figures/scientific-schematic.md etc.) use a hybrid form of "structured natural language + parameters", because forcing JSON would limit creative freedom.
  6. Map the user input to template parameters; when key information is insufficient, proactively ask targeted clarifying questions.

At this point the prompt has been rendered. Next, branch by mode:

7-A. Mode A: save the final prompt to garden-gpt-image-2/prompt/, call scripts/generate.js or scripts/edit.js, and the image is saved to garden-gpt-image-2/image/。 7-B. Mode B: Pass the final prompt directly to the host's image tool call; as needed, save a copy of the prompt to garden-gpt-image-2/prompt/。 7-C. Mode C: Save the final prompt to garden-gpt-image-2/prompt/<task-slug>-<timestamp>.md, and display the complete prompt to the user in the conversation, along with a brief "how to use / recommended tools" suggestion.

  1. After the task ends, tell the user in one sentence: what the current mode is, where the prompt is saved, and where the image (if any) is saved.

Important Constraints

General:

  • The JSON in the template file is aprompt structure template, not an API request body template.
  • In all three modes, what is ultimately handed to the image model is the "rendered prompt string" — it can be flattened JSON, or a structured natural-language paragraph, used exactly as the template specifies.
  • Unless the user explicitly requests it,do not copy the "mode descriptions" from SKILL.md into the final prompt— that is meta-information meant for the Agent.

Applicable only to Mode A:

  • Generation scripts use a JSON body
  • Editing scripts use multipart form data
  • Responses are parsed preferentially as data[0].b64_json , and are also compatible with data[0].url
  • Unless the upstream interface explicitly requires it, do not introduce additional special query parameters

When to Ask Questions

Ask only when this information is missing and would significantly affect the result:

  • There is no prompt goal
  • There is no original image when editing an image
  • The subject's identity or visual type determines the direction of the result
  • Product / price / copy / UI text is a core component of the image
  • The user has expressed multiple conflicting goals at the same time

Otherwise, prioritize making reasonable defaults on your own and continue executing.