[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CVC5514HZF8EQYRESS2GJB":3,"skill-same:01M7CVC5514HZF8EQYRESS2GJB":95},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7CVC5514HZF8EQYRESS2GJB","imagegen",null,"Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.","realsudarshan\u002FSD-skill","realsudarshan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128029723?v=4","01M7CTP2JEKQ9KBJ51NRZ2777Z","Sudarshan Dhakal","01M7CTP2JYR2PRY3BWGA30HX7J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"imagegen\"\ndescription: \"Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.\"\n---\n\n# Image Generation Skill\n\nGenerates or edits images for the current project (for example website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, or infographics).\n\n## Top-level modes and rules\n\nThis skill has exactly two top-level modes:\n\n- **Default built-in tool mode (preferred):** built-in `image_gen` tool for normal image generation and editing. Does not require `OPENAI_API_KEY`.\n- **Fallback CLI mode (explicit-only):** `scripts\u002Fimage_gen.py` CLI. Use only when the user explicitly asks for the CLI path. Requires `OPENAI_API_KEY`.\n\nWithin the explicit CLI fallback only, the CLI exposes three subcommands:\n\n- `generate`\n- `edit`\n- `generate-batch`\n\nRules:\n- Use the built-in `image_gen` tool by default for all normal image generation and editing requests.\n- Never switch to CLI fallback automatically.\n- If the built-in tool fails or is unavailable, tell the user the CLI fallback exists and that it requires `OPENAI_API_KEY`. Proceed only if the user explicitly asks for that fallback.\n- If the user explicitly asks for CLI mode, use the bundled `scripts\u002Fimage_gen.py` workflow. Do not create one-off SDK runners.\n- Never modify `scripts\u002Fimage_gen.py`. If something is missing, ask the user before doing anything else.\n\nBuilt-in save-path policy:\n- In built-in tool mode, Codex saves generated images under `$CODEX_HOME\u002F*` by default.\n- Do not describe or rely on OS temp as the default built-in destination.\n- Do not describe or rely on a destination-path argument (if any) on the built-in `image_gen` tool. If a specific location is needed, generate first and then move or copy the selected output from `$CODEX_HOME\u002Fgenerated_images\u002F...`.\n- Save-path precedence in built-in mode:\n  1. If the user names a destination, move or copy the selected output there.\n  2. If the image is meant for the current project, move or copy the final selected image into the workspace before finishing.\n  3. If the image is only for preview or brainstorming, render it inline; the underlying file can remain at the default `$CODEX_HOME\u002F*` path.\n- Never leave a project-referenced asset only at the default `$CODEX_HOME\u002F*` path.\n- Do not overwrite an existing asset unless the user explicitly asked for replacement; otherwise create a sibling versioned filename such as `hero-v2.png` or `item-icon-edited.png`.\n\nShared prompt guidance for both modes lives in `references\u002Fprompting.md` and `references\u002Fsample-prompts.md`.\n\nFallback-only docs\u002Fresources for CLI mode:\n- `references\u002Fcli.md`\n- `references\u002Fimage-api.md`\n- `references\u002Fcodex-network.md`\n- `scripts\u002Fimage_gen.py`\n\n## When to use\n- Generate a new image (concept art, product shot, cover, website hero)\n- Generate a new image using one or more reference images for style, composition, or mood\n- Edit an existing image (inpainting, lighting or weather transformations, background replacement, object removal, compositing, transparent background)\n- Produce many assets or variants for one task\n\n## When not to use\n- Extending or matching an existing SVG\u002Fvector icon set, logo system, or illustration library inside the repo\n- Creating simple shapes, diagrams, wireframes, or icons that are better produced directly in SVG, HTML\u002FCSS, or canvas\n- Making a small project-local asset edit when the source file already exists in an editable native format\n- Any task where the user clearly wants deterministic code-native output instead of a generated bitmap\n\n## Decision tree\n\nThink about two separate questions:\n\n1. **Intent:** is this a new image or an edit of an existing image?\n2. **Execution strategy:** is this one asset or many assets\u002Fvariants?\n\nIntent:\n- If the user wants to modify an existing image while preserving parts of it, treat the request as **edit**.\n- If the user provides images only as references for style, composition, mood, or subject guidance, treat the request as **generate**.\n- If the user provides no images, treat the request as **generate**.\n\nBuilt-in edit semantics:\n- Built-in edit mode is for images already visible in the conversation context, such as attached images or images generated earlier in the thread.\n- If the user wants to edit a local image file with the built-in tool, first load it with built-in `view_image` tool so the image is visible in the conversation context, then proceed with the built-in edit flow.\n- Do not promise arbitrary filesystem-path editing through the built-in tool.\n- If a local file still needs direct file-path control, masks, or other explicit CLI-only parameters, use the explicit CLI fallback only when the user asks for it.\n- For edits, preserve invariants aggressively and save non-destructively by default.\n\nExecution strategy:\n- In the built-in default path, produce many assets or variants by issuing one `image_gen` call per requested asset or variant.\n- In the explicit CLI fallback path, use the CLI `generate-batch` subcommand only when the user explicitly chose CLI mode and needs many prompts\u002Fassets.\n\nAssume the user wants a new image unless they clearly ask to change an existing one.\n\n## Workflow\n1. Decide the top-level mode: built-in by default, fallback CLI only if explicitly requested.\n2. Decide the intent: `generate` or `edit`.\n3. Decide whether the output is preview-only or meant to be consumed by the current project.\n4. Decide the execution strategy: single asset vs repeated built-in calls vs CLI `generate-batch`.\n5. Collect inputs up front: prompt(s), exact text (verbatim), constraints\u002Favoid list, and any input images.\n6. For every input image, label its role explicitly:\n   - reference image\n   - edit target\n   - supporting insert\u002Fstyle\u002Fcompositing input\n7. If the edit target is only on the local filesystem and you are staying on the built-in path, inspect it with `view_image` first so the image is available in conversation context.\n8. If the user asked for a photo, illustration, sprite, product image, banner, or other explicitly raster-style asset, use `image_gen` rather than substituting SVG\u002FHTML\u002FCSS placeholders. If the request is for an icon, logo, or UI graphic that should match existing repo-native SVG\u002Fvector\u002Fcode assets, prefer editing those directly instead.\n9. Augment the prompt based on specificity:\n   - If the user's prompt is already specific and detailed, normalize it into a clear spec without adding creative requirements.\n   - If the user's prompt is generic, add tasteful augmentation only when it materially improves output quality.\n10. Use the built-in `image_gen` tool by default.\n11. If the user explicitly chooses the CLI fallback, then and only then use the fallback-only docs for quality, `input_fidelity`, masks, output format, output paths, and network setup.\n12. Inspect outputs and validate: subject, style, composition, text accuracy, and invariants\u002Favoid items.\n13. Iterate with a single targeted change, then re-check.\n14. For preview-only work, render the image inline; the underlying file may remain at the default `$CODEX_HOME\u002Fgenerated_images\u002F...` path.\n15. For project-bound work, move or copy the selected artifact into the workspace and update any consuming code or references. Never leave a project-referenced asset only at the default `$CODEX_HOME\u002Fgenerated_images\u002F...` path.\n16. For batches, persist only the selected finals in the workspace unless the user explicitly asked to keep discarded variants.\n17. Always report the final saved path for any workspace-bound asset, plus the final prompt and whether the built-in tool or fallback CLI mode was used.\n\n## Prompt augmentation\n\nReformat user prompts into a structured, production-oriented spec. Make the user's goal clearer and more actionable, but do not blindly add detail.\n\nTreat this as prompt-shaping guidance, not a closed schema. Use only the lines that help, and add a short extra labeled line when it materially improves clarity.\n\n### Specificity policy\n\nUse the user's prompt specificity to decide how much augmentation is appropriate:\n\n- If the prompt is already specific and detailed, preserve that specificity and only normalize\u002Fstructure it.\n- If the prompt is generic, you may add tasteful augmentation when it will materially improve the result.\n\nAllowed augmentations:\n- composition or framing hints\n- polish level or intended-use hints\n- practical layout guidance\n- reasonable scene concreteness that supports the stated request\n\nNot allowed augmentations:\n- extra characters or objects that are not implied by the request\n- brand names, slogans, palettes, or narrative beats that are not implied\n- arbitrary side-specific placement unless the surrounding layout supports it\n\n## Use-case taxonomy (exact slugs)\n\nClassify each request into one of these buckets and keep the slug consistent across prompts and references.\n\nGenerate:\n- photorealistic-natural â€” candid\u002Feditorial lifestyle scenes with real texture and natural lighting.\n- product-mockup â€” product\u002Fpackaging shots, catalog imagery, merch concepts.\n- ui-mockup â€” app\u002Fweb interface mockups and wireframes; specify the desired fidelity.\n- infographic-diagram â€” diagrams\u002Finfographics with structured layout and text.\n- logo-brand â€” logo\u002Fmark exploration, vector-friendly.\n- illustration-story â€” comics, childrenâ€™s book art, narrative scenes.\n- stylized-concept â€” style-driven concept art, 3D\u002Fstylized renders.\n- historical-scene â€” period-accurate\u002Fworld-knowledge scenes.\n\nEdit:\n- text-localization â€” translate\u002Freplace in-image text, preserve layout.\n- identity-preserve â€” try-on, person-in-scene; lock face\u002Fbody\u002Fpose.\n- precise-object-edit â€” remove\u002Freplace a specific element (including interior swaps).\n- lighting-weather â€” time-of-day\u002Fseason\u002Fatmosphere changes only.\n- background-extraction â€” transparent background \u002F clean cutout.\n- style-transfer â€” apply reference style while changing subject\u002Fscene.\n- compositing â€” multi-image insert\u002Fmerge with matched lighting\u002Fperspective.\n- sketch-to-render â€” drawing\u002Fline art to photoreal render.\n\n## Shared prompt schema\n\nUse the following labeled spec as shared prompt scaffolding for both top-level modes:\n\n```text\nUse case: \u003Ctaxonomy slug>\nAsset type: \u003Cwhere the asset will be used>\nPrimary request: \u003Cuser's main prompt>\nInput images: \u003CImage 1: role; Image 2: role> (optional)\nScene\u002Fbackdrop: \u003Cenvironment>\nSubject: \u003Cmain subject>\nStyle\u002Fmedium: \u003Cphoto\u002Fillustration\u002F3D\u002Fetc>\nComposition\u002Fframing: \u003Cwide\u002Fclose\u002Ftop-down; placement>\nLighting\u002Fmood: \u003Clighting + mood>\nColor palette: \u003Cpalette notes>\nMaterials\u002Ftextures: \u003Csurface details>\nText (verbatim): \"\u003Cexact text>\"\nConstraints: \u003Cmust keep\u002Fmust avoid>\nAvoid: \u003Cnegative constraints>\n```\n\nNotes:\n- `Asset type` and `Input images` are prompt scaffolding, not dedicated CLI flags.\n- `Scene\u002Fbackdrop` refers to the visual setting. It is not the same as the fallback CLI `background` parameter, which controls output transparency behavior.\n- Fallback-only execution notes such as `Quality:`, `Input fidelity:`, masks, output format, and output paths belong in the explicit CLI path only. Do not treat them as built-in `image_gen` tool arguments.\n\nAugmentation rules:\n- Keep it short.\n- Add only the details needed to improve the prompt materially.\n- For edits, explicitly list invariants (`change only X; keep Y unchanged`).\n- If any critical detail is missing and blocks success, ask a question; otherwise proceed.\n\n## Examples\n\n### Generation example (hero image)\n```text\nUse case: product-mockup\nAsset type: landing page hero\nPrimary request: a minimal hero image of a ceramic coffee mug\nStyle\u002Fmedium: clean product photography\nComposition\u002Fframing: wide composition with usable negative space for page copy if needed\nLighting\u002Fmood: soft studio lighting\nConstraints: no logos, no text, no watermark\n```\n\n### Edit example (invariants)\n```text\nUse case: precise-object-edit\nAsset type: product photo background replacement\nPrimary request: replace only the background with a warm sunset gradient\nConstraints: change only the background; keep the product and its edges unchanged; no text; no watermark\n```\n\n## Prompting best practices\n- Structure prompt as scene\u002Fbackdrop -> subject -> details -> constraints.\n- Include intended use (ad, UI mock, infographic) to set the mode and polish level.\n- Use camera\u002Fcomposition language for photorealism.\n- Only use SVG\u002Fvector stand-ins when the user explicitly asked for vector output or a non-image placeholder.\n- Quote exact text and specify typography + placement.\n- For tricky words, spell them letter-by-letter and require verbatim rendering.\n- For multi-image inputs, reference images by index and describe how they should be used.\n- For edits, repeat invariants every iteration to reduce drift.\n- Iterate with single-change follow-ups.\n- If the prompt is generic, add only the extra detail that will materially help.\n- If the prompt is already detailed, normalize it instead of expanding it.\n- For explicit CLI fallback only, see `references\u002Fcli.md` and `references\u002Fimage-api.md` for `quality`, `input_fidelity`, masks, output format, and output-path guidance.\n\nMore principles shared by both modes: `references\u002Fprompting.md`.\nCopy\u002Fpaste specs shared by both modes: `references\u002Fsample-prompts.md`.\n\n## Guidance by asset type\nAsset-type templates (website assets, game assets, wireframes, logo) are consolidated in `references\u002Fsample-prompts.md`.\n\n## Fallback CLI mode only\n\n### Temp and output conventions\nThese conventions apply only to the explicit CLI fallback. They do not describe built-in `image_gen` output behavior.\n- Use `tmp\u002Fimagegen\u002F` for intermediate files (for example JSONL batches); delete them when done.\n- Write final artifacts under `output\u002Fimagegen\u002F`.\n- Use `--out` or `--out-dir` to control output paths; keep filenames stable and descriptive.\n\n### Dependencies\nPrefer `uv` for dependency management in this repo.\n\nRequired Python package:\n```bash\nuv pip install openai\n```\n\nOptional for downscaling only:\n```bash\nuv pip install pillow\n```\n\nPortability note:\n- If you are using the installed skill outside this repo, install dependencies into that environment with its package manager.\n- In uv-managed environments, `uv pip install ...` remains the preferred path.\n\n### Environment\n- `OPENAI_API_KEY` must be set for live API calls.\n- Do not ask the user for `OPENAI_API_KEY` when using the built-in `image_gen` tool.\n- Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.\n\nIf the key is missing, give the user these steps:\n1. Create an API key in the OpenAI platform UI: https:\u002F\u002Fplatform.openai.com\u002Fapi-keys\n2. Set `OPENAI_API_KEY` as an environment variable in their system.\n3. Offer to guide them through setting the environment variable for their OS\u002Fshell if needed.\n\nIf installation is not possible in this environment, tell the user which dependency is missing and how to install it into their active environment.\n\n### Script-mode notes\n- CLI commands + examples: `references\u002Fcli.md`\n- API parameter quick reference: `references\u002Fimage-api.md`\n- Network approvals \u002F sandbox settings for CLI mode: `references\u002Fcodex-network.md`\n\n## Reference map\n- `references\u002Fprompting.md`: shared prompting principles for both modes.\n- `references\u002Fsample-prompts.md`: shared copy\u002Fpaste prompt recipes for both modes.\n- `references\u002Fcli.md`: fallback-only CLI usage via `scripts\u002Fimage_gen.py`.\n- `references\u002Fimage-api.md`: fallback-only API\u002FCLI parameter reference.\n- `references\u002Fcodex-network.md`: fallback-only network\u002Fsandbox troubleshooting for CLI mode.\n- `scripts\u002Fimage_gen.py`: fallback-only CLI implementation. Do not load or use it unless the user explicitly chooses CLI mode.\n","# Image Generation Skill\n\nGenerates or edits images for the current project (for example website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, or infographics).\n\n## Top-level modes and rules\n\nThis skill has exactly two top-level modes:\n\n- **Default built-in tool mode (preferred):** built-in `image_gen` tool for normal image generation and editing. Does not require `OPENAI_API_KEY`.\n- **Fallback CLI mode (explicit-only):** `scripts\u002Fimage_gen.py` CLI. Use only when the user explicitly asks for the CLI path. Requires `OPENAI_API_KEY`.\n\nWithin the explicit CLI fallback only, the CLI exposes three subcommands:\n\n- `generate`\n- `edit`\n- `generate-batch`\n\nRules:\n- Use the built-in `image_gen` tool by default for all normal image generation and editing requests.\n- Never switch to CLI fallback automatically.\n- If the built-in tool fails or is unavailable, tell the user the CLI fallback exists and that it requires `OPENAI_API_KEY`. Proceed only if the user explicitly asks for that fallback.\n- If the user explicitly asks for CLI mode, use the bundled `scripts\u002Fimage_gen.py` workflow. Do not create one-off SDK runners.\n- Never modify `scripts\u002Fimage_gen.py`. If something is missing, ask the user before doing anything else.\n\nBuilt-in save-path policy:\n- In built-in tool mode, Codex saves generated images under `$CODEX_HOME\u002F*` by default.\n- Do not describe or rely on OS temp as the default built-in destination.\n- Do not describe or rely on a destination-path argument (if any) on the built-in `image_gen` tool. If a specific location is needed, generate first and then move or copy the selected output from `$CODEX_HOME\u002Fgenerated_images\u002F...`.\n- Save-path precedence in built-in mode:\n  1. If the user names a destination, move or copy the selected output there.\n  2. If the image is meant for the current project, move or copy the final selected image into the workspace before finishing.\n  3. If the image is only for preview or brainstorming, render it inline; the underlying file can remain at the default `$CODEX_HOME\u002F*` path.\n- Never leave a project-referenced asset only at the default `$CODEX_HOME\u002F*` path.\n- Do not overwrite an existing asset unless the user explicitly asked for replacement; otherwise create a sibling versioned filename such as `hero-v2.png` or `item-icon-edited.png`.\n\nShared prompt guidance for both modes lives in `references\u002Fprompting.md` and `references\u002Fsample-prompts.md`.\n\nFallback-only docs\u002Fresources for CLI mode:\n- `references\u002Fcli.md`\n- `references\u002Fimage-api.md`\n- `references\u002Fcodex-network.md`\n- `scripts\u002Fimage_gen.py`\n\n## When to use\n- Generate a new image (concept art, product shot, cover, website hero)\n- Generate a new image using one or more reference images for style, composition, or mood\n- Edit an existing image (inpainting, lighting or weather transformations, background replacement, object removal, compositing, transparent background)\n- Produce many assets or variants for one task\n\n## When not to use\n- Extending or matching an existing SVG\u002Fvector icon set, logo system, or illustration library inside the repo\n- Creating simple shapes, diagrams, wireframes, or icons that are better produced directly in SVG, HTML\u002FCSS, or canvas\n- Making a small project-local asset edit when the source file already exists in an editable native format\n- Any task where the user clearly wants deterministic code-native output instead of a generated bitmap\n\n## Decision tree\n\nThink about two separate questions:\n\n1. **Intent:** is this a new image or an edit of an existing image?\n2. **Execution strategy:** is this one asset or many assets\u002Fvariants?\n\nIntent:\n- If the user wants to modify an existing image while preserving parts of it, treat the request as **edit**.\n- If the user provides images only as references for style, composition, mood, or subject guidance, treat the request as **generate**.\n- If the user provides no images, treat the request as **generate**.\n\nBuilt-in edit semantics:\n- Built-in edit mode is for images already visible in the conversation context, such as attached images or images generated earlier in the thread.\n- If the user wants to edit a local image file with the built-in tool, first load it with built-in `view_image` tool so the image is visible in the conversation context, then proceed with the built-in edit flow.\n- Do not promise arbitrary filesystem-path editing through the built-in tool.\n- If a local file still needs direct file-path control, masks, or other explicit CLI-only parameters, use the explicit CLI fallback only when the user asks for it.\n- For edits, preserve invariants aggressively and save non-destructively by default.\n\nExecution strategy:\n- In the built-in default path, produce many assets or variants by issuing one `image_gen` call per requested asset or variant.\n- In the explicit CLI fallback path, use the CLI `generate-batch` subcommand only when the user explicitly chose CLI mode and needs many prompts\u002Fassets.\n\nAssume the user wants a new image unless they clearly ask to change an existing one.\n\n## Workflow\n1. Decide the top-level mode: built-in by default, fallback CLI only if explicitly requested.\n2. Decide the intent: `generate` or `edit`.\n3. Decide whether the output is preview-only or meant to be consumed by the current project.\n4. Decide the execution strategy: single asset vs repeated built-in calls vs CLI `generate-batch`.\n5. Collect inputs up front: prompt(s), exact text (verbatim), constraints\u002Favoid list, and any input images.\n6. For every input image, label its role explicitly:\n   - reference image\n   - edit target\n   - supporting insert\u002Fstyle\u002Fcompositing input\n7. If the edit target is only on the local filesystem and you are staying on the built-in path, inspect it with `view_image` first so the image is available in conversation context.\n8. If the user asked for a photo, illustration, sprite, product image, banner, or other explicitly raster-style asset, use `image_gen` rather than substituting SVG\u002FHTML\u002FCSS placeholders. If the request is for an icon, logo, or UI graphic that should match existing repo-native SVG\u002Fvector\u002Fcode assets, prefer editing those directly instead.\n9. Augment the prompt based on specificity:\n   - If the user's prompt is already specific and detailed, normalize it into a clear spec without adding creative requirements.\n   - If the user's prompt is generic, add tasteful augmentation only when it materially improves output quality.\n10. Use the built-in `image_gen` tool by default.\n11. If the user explicitly chooses the CLI fallback, then and only then use the fallback-only docs for quality, `input_fidelity`, masks, output format, output paths, and network setup.\n12. Inspect outputs and validate: subject, style, composition, text accuracy, and invariants\u002Favoid items.\n13. Iterate with a single targeted change, then re-check.\n14. For preview-only work, render the image inline; the underlying file may remain at the default `$CODEX_HOME\u002Fgenerated_images\u002F...` path.\n15. For project-bound work, move or copy the selected artifact into the workspace and update any consuming code or references. Never leave a project-referenced asset only at the default `$CODEX_HOME\u002Fgenerated_images\u002F...` path.\n16. For batches, persist only the selected finals in the workspace unless the user explicitly asked to keep discarded variants.\n17. Always report the final saved path for any workspace-bound asset, plus the final prompt and whether the built-in tool or fallback CLI mode was used.\n\n## Prompt augmentation\n\nReformat user prompts into a structured, production-oriented spec. Make the user's goal clearer and more actionable, but do not blindly add detail.\n\nTreat this as prompt-shaping guidance, not a closed schema. Use only the lines that help, and add a short extra labeled line when it materially improves clarity.\n\n### Specificity policy\n\nUse the user's prompt specificity to decide how much augmentation is appropriate:\n\n- If the prompt is already specific and detailed, preserve that specificity and only normalize\u002Fstructure it.\n- If the prompt is generic, you may add tasteful augmentation when it will materially improve the result.\n\nAllowed augmentations:\n- composition or framing hints\n- polish level or intended-use hints\n- practical layout guidance\n- reasonable scene concreteness that supports the stated request\n\nNot allowed augmentations:\n- extra characters or objects that are not implied by the request\n- brand names, slogans, palettes, or narrative beats that are not implied\n- arbitrary side-specific placement unless the surrounding layout supports it\n\n## Use-case taxonomy (exact slugs)\n\nClassify each request into one of these buckets and keep the slug consistent across prompts and references.\n\nGenerate:\n- photorealistic-natural â€” candid\u002Feditorial lifestyle scenes with real texture and natural lighting.\n- product-mockup â€” product\u002Fpackaging shots, catalog imagery, merch concepts.\n- ui-mockup â€” app\u002Fweb interface mockups and wireframes; specify the desired fidelity.\n- infographic-diagram â€” diagrams\u002Finfographics with structured layout and text.\n- logo-brand â€” logo\u002Fmark exploration, vector-friendly.\n- illustration-story â€” comics, childrenâ€™s book art, narrative scenes.\n- stylized-concept â€” style-driven concept art, 3D\u002Fstylized renders.\n- historical-scene â€” period-accurate\u002Fworld-knowledge scenes.\n\nEdit:\n- text-localization â€” translate\u002Freplace in-image text, preserve layout.\n- identity-preserve â€” try-on, person-in-scene; lock face\u002Fbody\u002Fpose.\n- precise-object-edit â€” remove\u002Freplace a specific element (including interior swaps).\n- lighting-weather â€” time-of-day\u002Fseason\u002Fatmosphere changes only.\n- background-extraction â€” transparent background \u002F clean cutout.\n- style-transfer â€” apply reference style while changing subject\u002Fscene.\n- compositing â€” multi-image insert\u002Fmerge with matched lighting\u002Fperspective.\n- sketch-to-render â€” drawing\u002Fline art to photoreal render.\n\n## Shared prompt schema\n\nUse the following labeled spec as shared prompt scaffolding for both top-level modes:\n\n```text\nUse case: \u003Ctaxonomy slug>\nAsset type: \u003Cwhere the asset will be used>\nPrimary request: \u003Cuser's main prompt>\nInput images: \u003CImage 1: role; Image 2: role> (optional)\nScene\u002Fbackdrop: \u003Cenvironment>\nSubject: \u003Cmain subject>\nStyle\u002Fmedium: \u003Cphoto\u002Fillustration\u002F3D\u002Fetc>\nComposition\u002Fframing: \u003Cwide\u002Fclose\u002Ftop-down; placement>\nLighting\u002Fmood: \u003Clighting + mood>\nColor palette: \u003Cpalette notes>\nMaterials\u002Ftextures: \u003Csurface details>\nText (verbatim): \"\u003Cexact text>\"\nConstraints: \u003Cmust keep\u002Fmust avoid>\nAvoid: \u003Cnegative constraints>\n```\n\nNotes:\n- `Asset type` and `Input images` are prompt scaffolding, not dedicated CLI flags.\n- `Scene\u002Fbackdrop` refers to the visual setting. It is not the same as the fallback CLI `background` parameter, which controls output transparency behavior.\n- Fallback-only execution notes such as `Quality:`, `Input fidelity:`, masks, output format, and output paths belong in the explicit CLI path only. Do not treat them as built-in `image_gen` tool arguments.\n\nAugmentation rules:\n- Keep it short.\n- Add only the details needed to improve the prompt materially.\n- For edits, explicitly list invariants (`change only X; keep Y unchanged`).\n- If any critical detail is missing and blocks success, ask a question; otherwise proceed.\n\n## Examples\n\n### Generation example (hero image)\n```text\nUse case: product-mockup\nAsset type: landing page hero\nPrimary request: a minimal hero image of a ceramic coffee mug\nStyle\u002Fmedium: clean product photography\nComposition\u002Fframing: wide composition with usable negative space for page copy if needed\nLighting\u002Fmood: soft studio lighting\nConstraints: no logos, no text, no watermark\n```\n\n### Edit example (invariants)\n```text\nUse case: precise-object-edit\nAsset type: product photo background replacement\nPrimary request: replace only the background with a warm sunset gradient\nConstraints: change only the background; keep the product and its edges unchanged; no text; no watermark\n```\n\n## Prompting best practices\n- Structure prompt as scene\u002Fbackdrop -> subject -> details -> constraints.\n- Include intended use (ad, UI mock, infographic) to set the mode and polish level.\n- Use camera\u002Fcomposition language for photorealism.\n- Only use SVG\u002Fvector stand-ins when the user explicitly asked for vector output or a non-image placeholder.\n- Quote exact text and specify typography + placement.\n- For tricky words, spell them letter-by-letter and require verbatim rendering.\n- For multi-image inputs, reference images by index and describe how they should be used.\n- For edits, repeat invariants every iteration to reduce drift.\n- Iterate with single-change follow-ups.\n- If the prompt is generic, add only the extra detail that will materially help.\n- If the prompt is already detailed, normalize it instead of expanding it.\n- For explicit CLI fallback only, see `references\u002Fcli.md` and `references\u002Fimage-api.md` for `quality`, `input_fidelity`, masks, output format, and output-path guidance.\n\nMore principles shared by both modes: `references\u002Fprompting.md`.\nCopy\u002Fpaste specs shared by both modes: `references\u002Fsample-prompts.md`.\n\n## Guidance by asset type\nAsset-type templates (website assets, game assets, wireframes, logo) are consolidated in `references\u002Fsample-prompts.md`.\n\n## Fallback CLI mode only\n\n### Temp and output conventions\nThese conventions apply only to the explicit CLI fallback. They do not describe built-in `image_gen` output behavior.\n- Use `tmp\u002Fimagegen\u002F` for intermediate files (for example JSONL batches); delete them when done.\n- Write final artifacts under `output\u002Fimagegen\u002F`.\n- Use `--out` or `--out-dir` to control output paths; keep filenames stable and descriptive.\n\n### Dependencies\nPrefer `uv` for dependency management in this repo.\n\nRequired Python package:\n```bash\nuv pip install openai\n```\n\nOptional for downscaling only:\n```bash\nuv pip install pillow\n```\n\nPortability note:\n- If you are using the installed skill outside this repo, install dependencies into that environment with its package manager.\n- In uv-managed environments, `uv pip install ...` remains the preferred path.\n\n### Environment\n- `OPENAI_API_KEY` must be set for live API calls.\n- Do not ask the user for `OPENAI_API_KEY` when using the built-in `image_gen` tool.\n- Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.\n\nIf the key is missing, give the user these steps:\n1. Create an API key in the OpenAI platform UI: https:\u002F\u002Fplatform.openai.com\u002Fapi-keys\n2. Set `OPENAI_API_KEY` as an environment variable in their system.\n3. Offer to guide them through setting the environment variable for their OS\u002Fshell if needed.\n\nIf installation is not possible in this environment, tell the user which dependency is missing and how to install it into their active environment.\n\n### Script-mode notes\n- CLI commands + examples: `references\u002Fcli.md`\n- API parameter quick reference: `references\u002Fimage-api.md`\n- Network approvals \u002F sandbox settings for CLI mode: `references\u002Fcodex-network.md`\n\n## Reference map\n- `references\u002Fprompting.md`: shared prompting principles for both modes.\n- `references\u002Fsample-prompts.md`: shared copy\u002Fpaste prompt recipes for both modes.\n- `references\u002Fcli.md`: fallback-only CLI usage via `scripts\u002Fimage_gen.py`.\n- `references\u002Fimage-api.md`: fallback-only API\u002FCLI parameter reference.\n- `references\u002Fcodex-network.md`: fallback-only network\u002Fsandbox troubleshooting for CLI mode.\n- `scripts\u002Fimage_gen.py`: fallback-only CLI implementation. Do not load or use it unless the user explicitly chooses CLI mode.\n",{"name":5,"description":7},"main","92c2f40ebfad0c0aa3cc1faa89ffd6b23f9e8d1b","official-openai\u002Fopenai-github-system-imagegen","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill","https:\u002F\u002Fsd-skill.vercel.app","https:\u002F\u002Fgithub.com\u002Frealsudarshan","sudarshandhakal.com.np","Innvotative","2026-11-12 23:03:50",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add realsudarshan\u002FSD-skill --skill imagegen",{"tool":40,"command":41},"bunx","bunx skills add realsudarshan\u002FSD-skill --skill imagegen",{"tool":43,"command":44},"pnpm","pnpm dlx skills add realsudarshan\u002FSD-skill --skill imagegen","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002FSKILL.md",true,[48,54,60,64,69,73,77,81,85,89],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"agents\u002Fopenai.yaml","REFERENCE","参考文档",918,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Fagents\u002Fopenai.yaml",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"assets\u002Fimagegen-small.svg","ASSET","资产文件",2889,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Fassets\u002Fimagegen-small.svg",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"assets\u002Fimagegen.png",3021,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Fassets\u002Fimagegen.png",{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":16},"LICENSE.txt","LICENSE","许可证",10776,{"path":70,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fcli.md",6257,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Freferences\u002Fcli.md",{"path":74,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fcodex-network.md",1620,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Freferences\u002Fcodex-network.md",{"path":78,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fimage-api.md",2500,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Freferences\u002Fimage-api.md",{"path":82,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fprompting.md",6462,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Freferences\u002Fprompting.md",{"path":86,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fsample-prompts.md",14793,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Freferences\u002Fsample-prompts.md",{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Fimage_gen.py","SCRIPT","脚本",31856,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-github-system-imagegen\u002Fscripts\u002Fimage_gen.py",[96,104,113,121,129,137],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":100,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":20},"01M7CW5Y6EPMPMNDWE4EN2GXRX","winui-app","Bootstrap, develop, and design modern WinUI 3 desktop applications with C# and the Windows App SDK using official Microsoft guidance, WinUI Gallery patterns, Windows App SDK samples, and CommunityToolkit components. Use when creating a brand new app, preparing a machine for WinUI, reviewing, refactoring, planning, troubleshooting, environment-checking, or setting up WinUI 3 XAML, controls, navigation, windowing, theming, accessibility, responsiveness, performance, deployment, or related Windows app design and development work.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fwinui-app\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fwinui-app\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":108,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M7CW5RWFX7616ENEG573VFWG","vercel-deploy","Deploy applications and websites to Vercel. Use when the user requests deployment actions like \"deploy my app\", \"deploy and give me the link\", \"push this live\", or \"create a preview deployment\".","MIT","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fvercel-deploy\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fvercel-deploy\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":20},"01M7CW5M4VZHQPWG764X1W0S3B","security-best-practices","Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review\u002Freport, or secure-by-default coding help. Trigger only for supported languages (python, javascript\u002Ftypescript, go). Do not trigger for general code review, debugging, or non-security tasks.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fsecurity-best-practices\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fsecurity-best-practices\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M7CW5EBTWA7PQ54HYFT1YW39","playwright","Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via `playwright-cli` or the bundled wrapper script.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fplaywright\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fplaywright\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":20},"01M7CW4DA7SZ4D9JMR3P7VJVM0","openai-docs","Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations, help choosing the latest model for a use case, or model upgrade and prompt-upgrade guidance; prioritize OpenAI docs MCP tools, use bundled references only as helper context, and restrict any fallback browsing to official OpenAI domains.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fopenai-docs\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fopenai-docs\u002FSKILL.md",[],[],{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":141,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":20},"01M7CW3EHY7X60KB9SYEMRD3YR","netlify-deploy","Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site\u002Frepo on Netlify, including preview and production deploys.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fnetlify-deploy\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fnetlify-deploy\u002FSKILL.md",[],[]]