Codex Imageのロゴ

Codex Image

コミュニティ
IanShaw027
codex-image

Use when generating or editing raster images and the built-in image_gen tool is not exposed in the current Codex session, when Codex is running in API key mode, or when the user explicitly asks for codex-image, saved PNG/JPEG/WebP output, Images API, custom OPENAI_BASE_URL, exact output path, exact size, aspect ratio, or local image CLI workflow.

概要

公開者IanShaw027
リポジトリcodex-image
スキル名codex-image
スター
32
フォーク
5
同梱ファイル
16
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 16個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    IanShaw027がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルCodex ImageをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/IanShaw027/codex-image/tree/main/skills/codex-image
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/IanShaw027/codex-image.git /tmp/codex-image
mkdir -p .claude/skills
cp -r /tmp/codex-image/skills/codex-image .claude/skills/codex-image
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCodex Imageを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にCodex Imageを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Codex Imageは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Codex Image Skill

Local saved-file raster image workflow backed by scripts/codex_image.py, shell launchers, and thin OpenAI-compatible image HTTP calls.

Core rules

  • Use built-in/system imagegen first when the current session actually exposes image_gen and the user wants the normal native image workflow: current-turn image context, fastest simple generation/editing, or natural multi-turn follow-up without explicit local file/output-path control.
  • Use this skill as the fallback when built-in image_gen is absent, hidden, unavailable, already ruled out by the user, or failed before producing an image.
  • This skill is CLI-only. Do not describe it as built-in image support.
  • Use the installed launcher path directly, not a repo-relative path: on POSIX bash "${CODEX_HOME:-$HOME/.codex}/skills/codex-image/scripts/codex-image"; on Windows use %CODEX_HOME%\skills\codex-image\scripts\codex-image.cmd or %USERPROFILE%\.codex\skills\codex-image\scripts\codex-image.cmd.
  • Once this skill is selected, usually run the installed launcher first. Preflight config, auth, or --help only when the launcher is missing or its failure still leaves a real decision to make.
  • When a launcher call fails with a deterministic local parse or input-shape error and the safe retry is obvious, retry once immediately in the same turn before sending commentary.
  • Do not fall back to SVG, Pillow sketches, screenshots, or one-off scripts unless the user explicitly wants code-native graphics.
  • OPENAI_BASE_URL or provider base_url must exist in API-key mode.

When to use

  • Generate a new raster image and save it to disk
  • Edit one or more real input images through /v1/images/edits
  • Use exact output paths, exact sizes, aspect ratios, PNG/JPEG/WebP, or custom provider endpoints
  • Use this path in API-key mode, with custom OPENAI_BASE_URL, or for direct Images API workflows even if built-in image_gen is exposed
  • Use explicit Responses API image-generation state only when the caller really needs it
  • Batch-generate many prompts through generate-batch

When not to use

  • The built-in/system imagegen path is available and the user wants the normal built-in experience
  • The user wants native current-turn image context or the fastest simple multi-turn image follow-up and does not need explicit local file/output-path control
  • The task is better solved as SVG, HTML/CSS, canvas, or another code-native asset
  • The task is extending an existing repo-native icon or illustration system

Intent rules

  • If the model must see any real image input, treat the task as edit.
  • If the user only describes references in text and provides no image files, treat the task as generate.
  • Prefer --prompt over a long trailing positional prompt when shell quoting would be awkward.
  • For simple one-shot generate, keep the prompt close to the user's wording. Only expand it into a longer art brief when the user explicitly asks for richer art direction or stricter visual constraints.
  • generate and edit default to the Images API. Use --transport responses only for explicit multi-turn image-generation state such as --previous-response-id or --response-image-id.
  • In responses mode, edit may omit local image inputs when the follow-up should continue from prior response state alone.
  • Attachment placeholders and image-set selectors only work inside a Codex thread with CODEX_THREAD_ID or CODEX_SESSION_ID.
  • These placeholders are an explicit local thread workflow, not the same thing as built-in imagegen's native current-turn runtime image context.
  • In that Codex-thread mode, [Image #N] resolves against the most recent attachment-bearing user turn. It is the current turn only when the current turn actually carries attachments; otherwise treat it as a historical reference, not native current-turn image context.
  • Previous attachment-bearing turns can be referenced as [Turn -K Image #N].
  • Stable thread-wide attachment numbering can be referenced as [Thread Image #N].
  • The previous saved result for the thread can be referenced as [Last Output] or [Last Output #N].
  • After a follow-up that adds only one new attachment, that new file is [Image #1]. Older images do not remain addressable as [Image #2] or [Image #3]; switch to [Turn -1 Image #N], [Thread Image #N], or explicit --image-set.
  • In that Codex-thread mode, the active image set is the previous edit call's resolved input image list for the thread, not prior generated outputs.
  • Use --image-set last-output when the user wants to continue refining the previously generated result image itself.
  • Attachment placeholders resolve only from rollout-recorded paths for that turn; they do not fall back to the current shell working directory.
  • Use --image-set to select active, last-output, latest-turn, turn:-K, or thread:1,2,5 explicitly.
  • edit does not implicitly inherit prior thread state. Reuse requires explicit --image-set active or explicit image references.
  • Harmless placeholder variants such as [Image#1] and [image # 1] are normalized automatically.
  • If generate is called with --image, the CLI emits a warning and reroutes it to edit.

Output rules

  • Default output base is ${CODEX_HOME:-~/.codex}/generated_images/.
  • Inside Codex, the default subdirectory uses CODEX_THREAD_ID or CODEX_SESSION_ID.
  • Outside Codex, the default subdirectory is manual/.
  • Use --out for an exact final path.
  • Use --out-dir for batch or multi-output jobs.
  • Use --name for a readable prefix with an automatic random suffix.
  • For project-bound assets, save or move the final image into the workspace before finishing.
  • Keep edits non-destructive by default unless the user explicitly asked to overwrite.
  • Successful responses calls record the latest response ids under the thread output directory for follow-up reuse.

Workflow

  1. Decide generate, edit, or generate-batch.
  2. Collect prompt, exact text, constraints, output target, and any input images.
  3. If the user mainly wants the normal native image conversation path and does not need saved-file, exact output path, explicit placeholder references, or API/CLI control, do not use this skill; let built-in imagegen handle it.
  4. Keep the default transport on the Images API. Reach for --transport responses only when explicit prior-response image state is part of the task.
  5. In a Codex thread with CODEX_THREAD_ID or CODEX_SESSION_ID, use [Image #N] for the most recent attachment-bearing turn, [Turn -K Image #N] for earlier attachment-bearing turns, [Thread Image #N] for stable thread-wide references, [Last Output] for the previous saved result image, or --image-set active / --image-set last-output / --image-set latest-turn for explicit reuse. A follow-up that adds one new image should usually look like [Turn -1 Image #1], [Turn -1 Image #2], and [Image #1] rather than [Image #1], [Image #2], [Image #3]. A follow-up that says "use the last result as the base and refine it" should usually include [Last Output] or --image-set last-output, then describe that image as the base result to refine in the prompt.
  6. Normalize the size request:
    • keep explicit WIDTHxHEIGHT unchanged
    • convert ratio forms such as 16:9 or 9:16@1k into direct API sizes
    • preserve the requested final delivery size as the post-save target
  7. Run the bundled launcher.
  8. Validate subject, composition, text, and invariants.
  9. Report the final saved path.

Size and post-processing policy

  • Pass explicit non-standard sizes such as 1000x1800 to the API unchanged.
  • If the returned image has the same aspect ratio but different pixels, resize locally to the requested final size.
  • If the returned aspect ratio differs materially, stop instead of stretching automatically.

Prompt guidance

  • Structure prompts as backdrop -> subject -> details -> constraints.
  • Quote exact text when text matters.
  • Repeat invariants for edits.
  • Add only useful detail; do not invent extra objects, brands, or layout constraints.

For prompt schema, taxonomy, examples, and CLI detail, use:

  • references/prompting.md
  • references/sample-prompts.md
  • references/cli.md
  • references/image-api.md
  • references/codex-network.md

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Codex Image」では何ができますか?

Use when generating or editing raster images and the built-in image_gen tool is not exposed in the current Codex session, when Codex is running in API key mode, or when the user explicitly asks for codex-image, saved PNG/JPEG/WebP output, Images API, custom OPENAI_BASE_URL, exact output path, exact size, aspect ratio, or local image CLI workflow.

TypingMindでCodex Imageを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Codex Imageはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCodex Imageをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/IanShaw027/codex-image/tree/main/skills/codex-imageを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Codex Imageを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Codex Imageは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCodex Imageを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Codex Image」は無料ですか?

はい。IanShaw027がGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇