codex-imagen

Generates or edits raster images via Codex backend using OAuth credentials.

132|39|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/darkamenosa/codex-imagen --skill codex-imagen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-imagen
Source: https://github.com/darkamenosa/codex-imagen/tree/main
Command: npx skills add https://github.com/darkamenosa/codex-imagen --skill codex-imagen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Codex Imagen solves the friction of generating or editing images by letting agents call the Codex backend directly using OAuth credentials already stored locally, without requiring an OpenAI API key.

Core Features & Use Cases

  • Native image_generation calls via Codex Responses: Uses the backend-api/codex Responses image_generation tool for raster image outputs.
  • Local OAuth credential discovery + refresh: Automatically locates OpenClaw/Codex auth JSON and refreshes tokens (including recovery from refresh_token_reused).
  • Reference-image support for edits/composition: Accepts local images, HTTP(S) URLs, or data URLs and sets input_image.detail for control over fidelity.
  • Streaming and multi-output saving for agent workflows: Streams results and writes each completed image to disk, returning paths (or JSON summaries) suitable for OpenClaw and other orchestrators.
  • Use Case: An OpenClaw agent needs to produce multiple UI icon variants from prompts and optional reference artwork, then return stable saved file paths to the conversation.

Quick Start

Ask the skill to generate an image and save it to disk by running the helper with your timeout and prompt.

Frequently Asked Questions about codex-imagen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate raster images using local OAuth credentials instead of an API key?

Generate raster images by calling the Codex backend Responses image_generation tool using locally stored OpenClaw or Codex OAuth credentials. This bypasses the need for a standard API key by automatically discovering and refreshing local auth tokens.

Can I use reference images for raster image editing and composition?

Yes, reference images are supported for edits and composition. You can provide local file paths, HTTP(S) URLs, or data URLs, and set the input_image detail parameter to control the fidelity of the generated raster output.

How do I save multiple streamed image outputs to disk for agent workflows?

Stream multiple image outputs to disk by running the generation helper with your prompt. The workflow writes each completed PNG artifact to disk and returns stable saved file paths or a JSON summary suitable for orchestrators.

Does this workflow handle OAuth token refresh and recovery automatically?

Yes, the workflow handles OAuth token refresh automatically. It locates the local auth JSON and refreshes tokens, including recovering from the refresh_token_reused error, ensuring continuous agent-driven image generation.

What is the best way to produce multiple UI icon variants from prompts for OpenClaw?

The best way is using agent-driven image creation with prompt-based generation and optional reference artwork. It streams results, saves each PNG artifact to disk, and returns stable file paths directly to your OpenClaw conversation.