Logo de Codex Image

Codex Image

Comunidade
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.

Visão geral

Publicado porIanShaw027
Repositóriocodex-image
Nome da habilidadecodex-image
Estrelas
32
Forks
5
Arquivos incluídos
16
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • 16 arquivos incluídos

    Scripts, modelos de documentos e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente leitura e nunca são executados.

  • Código aberto

    Publicada por IanShaw027 no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Codex Image no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/IanShaw027/codex-image/tree/main/skills/codex-image
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Codex Image em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Codex Image automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Codex Image não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Codex Image faz?

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.

Por que usar Codex Image no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Codex Image é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Codex Image no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/IanShaw027/codex-image/tree/main/skills/codex-image. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Codex Image?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Codex Image?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Codex Image com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Codex Image é gratuita?

Sim. A habilidade é publicada no GitHub por IanShaw027 sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇