imagegen
Skill2 starsChanged 5 months agoMITView on GitHub
图像生成与编辑。生成或改图:照片、插画、mockup、位图素材;矢量/SVG 走原生编辑。
- Reads credentials
- Installs packages
We split this skill into the rules it gives an agent
41 rules. 1 is common, 24 are distinctive, and 16 are very specific to this project.
1
Common
Most of the 43 edited versions we read keep these.
24
Distinctive
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Use the built-in image_gen tool by default for normal image generation and editing requests.
- Distinctive: line 25
Do not switch to CLI fallback for ordinary quality, size, or file-path control.
- Very specific: line 27
Never silently switch from built-in image_gen or CLI gpt-image-2 to CLI gpt-image-1.5.
- Very specific: line 29
If the built-in tool fails or is unavailable, tell the user the CLI fallback exists and that it requires OPENAI_API_KEY.
- Very specific: line 30
If the user explicitly asks for CLI mode, use the bundled scripts/image_gen.py workflow.
- Distinctive: line 31
Use the bundled CLI for requested CLI workflows.
- Distinctive: line 35
Do not describe or rely on OS temp as the default built-in destination.
- Very specific: line 36
Do not describe or rely on a destination-path argument (if any) on the built-in image_gen tool.
- Distinctive: line 38
If the user names a destination, move or copy the selected output there.
- Distinctive: line 39
If the image is meant for the current project, move or copy the final selected image into the workspace before finishing.
- Very specific: line 40
If the image is only for preview or brainstorming, render it inline.
- Very specific: line 41
Never leave a project-referenced asset only at the default $CODEX_HOME/* path.
- Distinctive: line 72
If the user wants to modify an existing image while preserving parts of it, treat the request as edit.
- Distinctive: line 73
If the user provides images only as references for style, composition, mood, or subject guidance, treat the request as generate.
- Distinctive: line 74
If the user provides no images, treat the request as generate.
- Very specific: line 78
Follow the currently exposed tool schema.
- Distinctive: line 79
Ask for a missing image only when neither supported mechanism can include it.
- Distinctive: line 91
Use the built-in tool by default.
- Distinctive: line 93
Write a prompt that preserves the user's scope, generate or edit, inspect the result, and make targeted corrections when needed.
- Distinctive: line 95
Follow the tool's required delivery format.
- Very specific: line 99
Ask built-in image_gen for a genuinely transparent background and preserve its alpha.
- Distinctive: line 105
Treat this as prompt-shaping guidance, not a closed schema.
- Distinctive: line 109
Use the user's prompt specificity to decide how much augmentation is appropriate:
- Distinctive: line 111
If the prompt is already specific and detailed, preserve that specificity and only normalize/structure it.
- Distinctive: line 112
If the prompt is generic, you may add tasteful augmentation when it will materially improve the result.
- Common: line 130
Use camera/composition language for photorealism.
- Distinctive: line 131
Only use SVG/vector stand-ins when the user explicitly asked for vector output or a non-image placeholder.
- Distinctive: line 137
If the prompt is generic, add only the extra detail that will materially help.
- Distinctive: line 138
If the prompt is already detailed, normalize it instead of expanding it.
- Very specific: line 152
Use gpt-image-2 for new CLI/API workflows unless the user confirms a different model.
- Very specific: line 156
Use quality low for fast drafts, thumbnails, and quick iterations.
- Very specific: line 158
If the user asks for 4K-style output, use 3840x2160 for landscape or 2160x3840 for portrait.
- Very specific: line 175
Follow the current workspace intermediate/output directories.
- Very specific: line 176
Use --out or --out-dir to control output paths.
- Very specific: line 179
Prefer uv for dependency management in this repo.
- Distinctive: line 192
If you are using the installed skill outside this repo, install dependencies into that environment with its package manager.
- Very specific: line 197
Do not ask the user for OPENAI_API_KEY when using the built-in image_gen tool.
- Distinctive: line 198
Never ask the user to paste the full key in chat.
- Distinctive: line 200
If the key is missing, give the user these steps:
- Distinctive: line 201
Create an API key in the OpenAI platform UI: https://platform.openai.com/api-keys
- Distinctive: line 205
If installation is not possible in this environment, tell the user which dependency is missing and how to install it into their active …
“Common” is measured: kept by at least 6 in 10 of the 43 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Image Generation Skill
Generates or edits images for the current project (for example website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, or infographics).
Top-level modes and rules
This skill has exactly two top-level modes:
- Default built-in tool mode (preferred): built-in
image_gentool for image generation, editing, and transparent-image requests. Does not requireOPENAI_API_KEY. - Fallback CLI mode:
scripts/image_gen.pyCLI. Use when the user explicitly asks for or confirms the CLI/API/model path. RequiresOPENAI_API_KEY.
Within CLI fallback, the CLI exposes three subcommands:
generateeditgenerate-batch
Rules:
- Use the built-in
image_gentool by default for normal image generation and editing requests. - Do not switch to CLI fallback for ordinary quality, size, or file-path control.
- For transparent images, ask built-in
image_genfor a transparent background and preserve the generated alpha. - Never silently switch from built-in
image_genor CLIgpt-image-2to CLIgpt-image-1.5; ask the user first unless they explicitly requestedgpt-image-1.5. - The word
batchby itself does not mean CLI fallback. If the user asks for many assets or says to batch-generate assets without explicitly asking for CLI/API/model controls, stay on the built-in path and issue one built-in call per requested asset or variant. - 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. - If the user explicitly asks for CLI mode, use the bundled
scripts/image_gen.pyworkflow. Do not create one-off SDK runners. - Use the bundled CLI for requested CLI workflows. Modify its code only when the user asks to repair or extend that implementation; a missing feature is not permission to expand the task.
Built-in save-path policy:
- In built-in tool mode, Codex saves generated images under
$CODEX_HOME/*by default. - Do not describe or rely on OS temp as the default built-in destination.
- Do not describe or rely on a destination-path argument (if any) on the built-in
image_gentool. If a specific location is needed, generate first and then move or copy the selected output from$CODEX_HOME/generated_images/.... - Save-path precedence in built-in mode:
- If the user names a destination, move or copy the selected output there.
- If the image is meant for the current project, move or copy the final selected image into the workspace before finishing.
- If the image is only for preview or brainstorming, render it inline; the underlying file can remain at the default
$CODEX_HOME/*path.
- Never leave a project-referenced asset only at the default
$CODEX_HOME/*path. - Use the requested output name or a descriptive filename without a version suffix. Verify the destination before an authorized replacement and keep any rollback copy outside final deliverables. For an unrequested replacement, save to a separate output directory or choose a distinct descriptive name; never overwrite an unrelated asset.
Shared prompt guidance for both modes lives in references/prompting.md and references/sample-prompts.md.
Fallback-only docs/resources for CLI mode:
references/cli.mdreferences/image-api.mdreferences/codex-network.mdscripts/image_gen.py
When to use
- Generate a new image (concept art, product shot, cover, website hero)
- Generate a new image using one or more reference images for style, composition, or mood
- Edit an existing image (inpainting, lighting or weather transformations, background replacement, object removal, compositing, transparent background)
- Produce many assets or variants for one task
When not to use
- Extending or matching an existing SVG/vector icon set, logo system, or illustration library inside the repo
- Creating simple shapes, diagrams, wireframes, or icons that are better produced directly in SVG, HTML/CSS, or canvas
- Making a small project-local asset edit when the source file already exists in an editable native format
- Any task where the user clearly wants deterministic code-native output instead of a generated bitmap
Decision tree
Think about two separate questions:
- Intent: is this a new image or an edit of an existing image?
- Execution strategy: is this one asset or many assets/variants?
Intent:
- If the user wants to modify an existing image while preserving parts of it, treat the request as edit.
- If the user provides images only as references for style, composition, mood, or subject guidance, treat the request as generate.
- If the user provides no images, treat the request as generate.
Built-in edit inputs:
- Inspect local edit targets with
view_imagebefore editing. - Follow the currently exposed tool schema. When every target has a local path and the tool supports
referenced_image_paths, use those paths. Otherwise use the smallest recent-image count that includes all targets ifnum_last_images_to_includeis supported. Never set both mechanisms. - Ask for a missing image only when neither supported mechanism can include it. File paths alone do not require switching to the paid API/CLI workflow.
- Preserve the requested invariants and save a new version unless replacement is authorized.
Execution strategy:
- In the built-in default path, produce many assets or variants by issuing one
image_gencall per requested asset or variant. - In the CLI fallback path, use the CLI
generate-batchsubcommand only when the user explicitly chose CLI mode and needs many prompts/assets. - For many distinct assets, do not use
nas a substitute for separate prompts.nis for variants of one prompt; distinct assets need distinct built-in calls or distinct CLIgenerate-batchjobs.
Assume the user wants a new image unless they clearly ask to change an existing one.
Complete the requested image work
- Use the built-in tool by default. Use CLI/API mode only when the user requested or authorized it; keep its credential and model requirements separate.
- Identify the edit target and reference roles, exact text, and visual constraints from the request. Clarify only missing information that blocks the result.
- Write a prompt that preserves the user's scope, generate or edit, inspect the result, and make targeted corrections when needed.
- For project assets, copy the selected tool-returned output into the workspace and update consuming references as required. For previews, display the generated image inline. Preserve all requested final batch assets.
- Follow the tool's required delivery format. Report saved project paths when applicable; include prompts or internal mode details only when requested or useful to reproduce the result.
Transparent image requests
Ask built-in image_gen for a genuinely transparent background and preserve its alpha.
Prompt augmentation
Reformat user prompts into a structured, production-oriented spec. Make the user's goal clearer and more actionable, but do not blindly add detail.
Treat 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.
Specificity policy
Use the user's prompt specificity to decide how much augmentation is appropriate:
- If the prompt is already specific and detailed, preserve that specificity and only normalize/structure it.
- If the prompt is generic, you may add tasteful augmentation when it will materially improve the result.
Allowed augmentations:
- composition or framing hints
- polish level or intended-use hints
- practical layout guidance
- reasonable scene concreteness that supports the stated request
Not allowed augmentations:
- extra characters or objects that are not implied by the request
- brand names, slogans, palettes, or narrative beats that are not implied
- arbitrary side-specific placement unless the surrounding layout supports it
For complex compositing, exact-text layouts, or batch prompt specifications, see optional prompt specs. Simple requests do not need that template.
Prompting best practices
- Structure prompt as scene/backdrop -> subject -> details -> constraints.
- Include intended use (ad, UI mock, infographic) to set the mode and polish level.
- Use camera/composition language for photorealism.
- Only use SVG/vector stand-ins when the user explicitly asked for vector output or a non-image placeholder.
- Quote exact text and specify typography + placement.
- For tricky words, spell them letter-by-letter and require verbatim rendering.
- For multi-image inputs, reference images by index and describe how they should be used.
- For edits, repeat invariants every iteration to reduce drift.
- Iterate with single-change follow-ups.
- If the prompt is generic, add only the extra detail that will materially help.
- If the prompt is already detailed, normalize it instead of expanding it.
- For CLI fallback only, see
references/cli.mdandreferences/image-api.mdfor model,quality,input_fidelity, masks, output format, and output-path guidance. - For transparent images, ask built-in
image_genfor actual transparency and preserve its alpha.
More principles shared by both modes: references/prompting.md.
Copy/paste specs shared by both modes: references/sample-prompts.md.
Guidance by asset type
Asset-type templates (website assets, game assets, wireframes, logo) are consolidated in references/sample-prompts.md.
gpt-image-2 guidance for CLI fallback
The fallback CLI defaults to gpt-image-2.
- Use
gpt-image-2for new CLI/API workflows unless the user confirms a different model. - CLI
gpt-image-2does not supportbackground=transparent; ask before usinggpt-image-1.5unless the user explicitly requested that model. gpt-image-2always uses high fidelity for image inputs; do not setinput_fidelitywith this model.gpt-image-2supportsqualityvalueslow,medium,high, andauto.- Use
quality lowfor fast drafts, thumbnails, and quick iterations. Usemedium,high, orautofor final assets, dense text, diagrams, identity-sensitive edits, or high-resolution outputs. - Square images are typically fastest to generate. Use
1024x1024for fast square drafts. - If the user asks for 4K-style output, use
3840x2160for landscape or2160x3840for portrait. gpt-image-2size may beautoorWIDTHxHEIGHTif all constraints hold: max edge<= 3840px, both edges multiples of16px, long-to-short ratio<= 3:1, total pixels between655,360and8,294,400.
Popular gpt-image-2 sizes:
1024x1024square1536x1024landscape1024x1536portrait2048x20482K square2048x11522K landscape3840x21604K landscape2160x38404K portraitauto
Fallback CLI mode only
Temp and output conventions
These conventions apply only to the CLI fallback. They do not describe built-in image_gen output behavior.
- Follow the current workspace intermediate/output directories. If none are specified, use
work/imagegen/for intermediate files andoutputs/imagegen/for final artifacts. - Use
--outor--out-dirto control output paths; keep filenames stable and descriptive.
Dependencies
Prefer uv for dependency management in this repo.
Required Python package:
uv pip install openaiOptional for image inspection and downscaling:
uv pip install pillowPortability note:
- If you are using the installed skill outside this repo, install dependencies into that environment with its package manager.
- In uv-managed environments,
uv pip install ...remains the preferred path.
Environment
OPENAI_API_KEYmust be set for live API calls.- Do not ask the user for
OPENAI_API_KEYwhen using the built-inimage_gentool. - Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.
If the key is missing, give the user these steps:
- Create an API key in the OpenAI platform UI: https://platform.openai.com/api-keys
- Set
OPENAI_API_KEYas an environment variable in their system. - Offer to guide them through setting the environment variable for their OS/shell if needed.
If installation is not possible in this environment, tell the user which dependency is missing and how to install it into their active environment.
Script-mode notes
- CLI commands + examples:
references/cli.md - API parameter quick reference:
references/image-api.md - Network approvals / sandbox settings for CLI mode:
references/codex-network.md
Reference map
references/prompting.md: shared prompting principles for both modes.references/sample-prompts.md: shared copy/paste prompt recipes for both modes.references/cli.md: fallback-only CLI usage viascripts/image_gen.py.references/image-api.md: fallback-only API/CLI parameter reference.references/codex-network.md: fallback-only network/sandbox troubleshooting for CLI mode.scripts/image_gen.py: fallback-only CLI implementation. Use only when the user explicitly chooses or confirms CLI mode.
Other versions48 projects use a version of this.
Word for word · 0
None found.
Edited · 28
- openai/codex★ 133k58% same
- openai/skills★ 27k49% same
- jlia0/tinyclaw★ 3.6k17% same
- TinyAGI/tinyagi★ 3.6k17% same
- TinyAGI/tinyclaw★ 3.6k17% same
- JetBrains/skills★ 38617% same
- PracticalSwan/agent-skills★ 2232% same
- delorenj/skills★ 1858% same
- ckorhonen/claude-skills★ 1717% same
- opensite-ai/opensite-skills★ 1517% same
18 more not listed
Wrote their own version · 20
- BlockRunAI/ClawRouter★ 6.6ksame name
- yan-labs/yan-skills★ 225same name
- jhy0285/monofield★ 5same name
- robin-liquidium/agent-skills★ 5same name
- ThilinaTLM/agent-skills★ 4same name
- Firzus/agent-skills★ 3same name
- int2t05/engineering-skills★ 3same name
- cyperx84/image-gen-skills★ 2same name
- okooo5km/imagegen★ 2same name
- abel-yelin/luolink-Claude-skills★ 1same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use send-user-message, tinyagi-admin and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Maliot100XSkillsend-user-message
Send a proactive message to a paired user via their channel (Discord, Telegram, or WhatsApp). Use when the agent needs to notify, alert, or send an unsolicited message to a user — especially during heartbeat invocations, scheduled tasks, or when the agent wants to reach out without a prior user message in the current conversation. Triggers: 'send message to user', 'notify user', 'alert user', 'message the user on discord/telegram/whatsapp', or any need to proactively communicate with a paired sender.
Also in 4 projects that use this
jlia0Skilltinyagi-admin
Manage and operate the TinyAGI system itself — agents, teams, settings, queue, tasks, daemon lifecycle, and source code. Use when the agent needs to: list/add/remove/update agents or teams, check queue status, view logs, start/stop/restart TinyAGI, change settings (provider, model, channels), send messages to the queue, manage tasks, retry dead-letter messages, view recent responses, modify TinyAGI source code or configuration, or perform any administrative operation on the TinyAGI platform. Triggers: 'manage tinyagi', 'add an agent', 'remove a team', 'check queue', 'view logs', 'restart tinyagi', 'change provider', 'update settings', 'create a task', 'modify tinyagi code'.
Also in 3 projects that use this
anyprotoSkillskills-manager
Context-aware routing to skills and hooks management. Use when troubleshooting skill activation, fine-tuning keywords, or managing the automated documentation system.
Also in 3 projects that use this
bivexSkillschedule
Управление расписанием занятий с специалистами по самосовершенствованию. Используй когда пользователь спрашивает о расписании, хочет добавить/удалить/перенести занятие, посмотреть план на день или неделю.
Also in 4 projects that use this
genomewalkerSkilltasks
Browse and resume tasks, threads, and background jobs across sessions
Also in 4 projects that use this
GoogleSkillmemory
Records and appends every user-agent customer support interaction to the memory.md log in the workspace.
Also in 5 projects that use this
In this repository57 other files it gives its agents.
- codex-skills-pack/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- automateSkill
- autopilotSkill
- create-hookSkill
- create-subagentSkill
- goalSkill
- loopSkill
- onboardSkill
- subscribeSkill
- review-agentSkill
- review-bugbotSkill
- review-securitySkill
- reviewSkill
- split-to-prsSkill
- canvasSkill
- migrate-to-buildsSkill
- migrate-to-skillsSkill
- new-repoSkill
- originSkill
- rename-chatSkill
- sdkSkill
- shareSkill
- shellSkill
- statuslineSkill
- update-cli-configSkill
- update-cursor-settingsSkill
- computer-useSkill
- documentsSkill
- excel-live-controlSkill
- google-docsSkill
- google-drive-commentsSkill
- google-driveSkill
- google-sheetsSkill
- google-slidesSkill
- pdfSkill
- PresentationsSkill
- sites-buildingSkill
- sites-hostingSkill
- sites-preview-troubleshootingSkill
- SpreadsheetsSkill
- template-creatorSkill
- create-ruleSkill
- create-skillSkill
- openai-docsSkill
- plugin-creatorSkill
- plugin-managementSkill
- skill-creatorSkill
- skill-installerSkill
- humanizer-zh-academicSkill
- natural-fictionSkill
- natural-writingSkill
- precise-proseSkill
- prose-auditSkill
- qu-ai-weiSkill
- research-paper-writingSkill
- voice-profileSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

