imagegen
できること
このスキルは、イラスト、写真、テクスチャ、モックアップなどのラスター画像を作成または変更します。コードやベクター図ではなく、画像ファイルが必要な人向けです。
使う場面
- ✓プロジェクト用のイラスト、写真風の画像、テクスチャを新しく作りたいとき。
- ✓既存の画像を参考にして、変更したりバリエーションを作ったりしたいとき。
- ✓切り抜き用に背景が透明な画像が必要なとき。
スキルのリンク
https://github.com/openai/skills/blob/main/skills/.system/imagegen/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ウェブサイトのヘッダー用に、コーヒーカップのフラットなイラストを作成してください。背景は透明にしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、標準では内蔵の画像生成機能を使って画像を作成または編集します。結果は、別の場所を選ばない限りCodexのホームフォルダに保存されます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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 normal image generation and editing. Does not requireOPENAI_API_KEY. - Fallback CLI mode (explicit-only):
scripts/image_gen.pyCLI. Use only when the user explicitly asks for the CLI path. RequiresOPENAI_API_KEY.
Within the explicit CLI fallback only, the CLI exposes three subcommands:
generateeditgenerate-batch
Rules:
- Use the built-in
image_gentool by default for all normal image generation and editing requests. - Never switch to CLI fallback automatically.
- 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. - Never modify
scripts/image_gen.py. If something is missing, ask the user before doing anything else.
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. - Do not overwrite an existing asset unless the user explicitly asked for replacement; otherwise create a sibling versioned filename such as
hero-v2.pngoritem-icon-edited.png.
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 semantics:
- Built-in edit mode is for images already visible in the conversation context, such as attached images or images generated earlier in the thread.
- If the user wants to edit a local image file with the built-in tool, first load it with built-in
view_imagetool so the image is visible in the conversation context, then proceed with the built-in edit flow. - Do not promise arbitrary filesystem-path editing through the built-in tool.
- If a local file still needs direct file-path control, masks, or oth
よくある質問
APIキーは必要ですか?
内蔵のツールでは不要です。別のコマンドラインによる代替手段ではOPENAI_API_KEYが必要で、依頼された場合にだけ実行されます。
画像はどこに保存されますか?
初期設定では、Codexのホームフォルダに保存されます。
ベクター画像やコードも作れますか?
いいえ。このスキルはビットマップ画像用です。コードやベクターの作業は別のツールが担当します。
詳細
作者による元の説明
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/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.
repo: openai/skills
人気
- GitHubのスター
- 28k
- ランキング
- #9863
- ライセンス
- —
- 更新日
- 2026/10/28
コメント
- …
このリポジトリの他のスキル
aspnet-core
28kASP.NET Coreのウェブアプリを作る、レビューする、更新する作業を支援します。適切なアプリの種類を選び、現在の.NETの公式ガイダンスに従います。
chatgpt-apps
28kMCPサーバーとウィジェットのUIを組み合わせたChatGPTアプリを作る手助けをします。ツール設計、UIリソース、メタデータ、ローカルの設定を扱います。
cli-creator
28kAPIのドキュメント、仕様、既存のスクリプトを、どのフォルダからでも実行でき、安定したJSONを返す再利用可能なコマンドラインツールにする手助けをします。
define-goal
28k曖昧な意図を、成功の基準、範囲、停止条件を含む明確で測定可能な目標に変える手助けをします。作業を始める前に行います。