
Hermes: Theia — Codex Vision Skill
A Hermes Agent skill for image analysis and generation via the OpenAI Codex CLI.
What It Does
- Image analysis — Describe, QA, and understand images via Codex's vision capabilities
- Image generation — Generate new images using Codex's built-in
image_gentool (GPT-image-2) - Identity-preserve generation — Use reference images to maintain consistent identity across generated portraits
- Batch generation — Generate multiple images from a shared reference with a prompt file
Requirements
| Requirement | Details |
|---|---|
| Codex CLI | npm install -g @openai/codex |
| ChatGPT Plus | Required for image generation (OAuth, not API key) |
| Auth | codex auth login completed — valid ~/.codex/auth.json |
Codex uses ChatGPT Plus OAuth tokens, not an API key. ~/.codex/auth.json has "auth_mode": "chatgpt" and "OPENAI_API_KEY": null. If tokens are invalidated, re-auth via codex auth login.
OpenRouter does not support image generation (404 on /v1/images/generations).
Quick Start
Analyze an Image
cd /path/to/images && codex exec \
"Describe this image in detail" \
--image photo.jpg \
--skip-git-repo-check
Generate an Image (No Reference)
cd /path/to/output
codex exec --skip-git-repo-check -s workspace-write --add-dir /path/to/output \
"Generate a photorealistic portrait. Save to /path/to/output/result.jpg"
Generate with Reference (Identity-Preserve)
codex exec --skip-git-repo-check -s workspace-write \
--add-dir /path/to/references \
-i primary-reference.jpg \
--add-dir /path/to/output \
"Generate a portrait. Reference identity from attached image. Save to /path/to/output/result.jpg"