From cotidie
Create or edit a raster/bitmap image (photo, illustration, infographic, UI mockup, texture, sprite, cover art) via the installed Codex CLI. NOT for diagrams, flowcharts, wireframes, icons, or logos; use mermaid/SVG for those.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cotidie:codex-imageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Claude has no native image generation. The `codex` CLI does, via its built-in
Claude has no native image generation. The codex CLI does, via its built-in
image_gen tool (uses the user's Codex auth — no OPENAI_API_KEY needed).
Drive it from Bash, then collect the PNG it writes.
Use the wrapper — it runs Codex, locates the PNG, and prints the final path:
"${CLAUDE_PLUGIN_ROOT}/claude-skills/codex-image/codex-image.sh" "<prompt>" [dest.png]
dest.png → prints the source path under ~/.codex/generated_images/.dest.png → copies there and prints it (use a versioned name like
hero-v2.png; never overwrite an existing asset unless asked).Then verify: Read the printed path to confirm the image matches intent
before using it. Iterate with one targeted change if needed.
Order: scene/backdrop → subject → details → constraints. Quote any in-image text verbatim. Keep it tight; only add detail that materially helps.
A <style/medium> <subject>, <composition/framing>, <lighting/mood>,
<color palette>. Text (verbatim): "<exact text>". Constraints: <must-keep>;
Avoid: <no logos, no watermark, ...>.
The built-in tool does NOT return a path. Resolve it from the session id:
codex exec --sandbox workspace-write --skip-git-repo-check "<prompt>" < /dev/nullsession id: <id>.~/.codex/generated_images/<id>/ig_*.png (one per generated image).Three flags are mandatory — each fixes a real failure:
| Flag / piece | Without it |
|---|---|
--skip-git-repo-check | "Not inside a trusted directory" refusal |
< /dev/null | hangs: "Reading additional input from stdin" |
--sandbox workspace-write | can't write output |
Prompt must say "use the built-in image_gen tool only — no code, no CLI
fallback", else Codex may write a Python/SVG script instead, or fall to the
CLI path that needs OPENAI_API_KEY.
codex exec to print the file path — it won't. Use the session id.--skip-git-repo-check.-v2 sibling instead.#00ff00 chroma-key bg, then remove with
~/.codex/skills/.system/imagegen/scripts/remove_chroma_key.py. True native
transparency needs the CLI fallback (gpt-image-1.5 + OPENAI_API_KEY) — ask
the user first.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub cotidie/cotidie-skills --plugin cotidie