daymade/codex-image-gallery
Start or reuse a self-contained local web gallery for browsing Codex-generated images. Use when the user asks to browse Codex generated images, open a local image gallery, inspect ~/.codex/generated_images, view a Codex image output folder, or browse image files produced by Codex.
npx skills add https://github.com/daymade/claude-code-skills --skill codex-image-gallery
Start a local browser gallery for Codex image outputs. This skill is self-contained: the server lives in scripts/server.mjs, and the UI template lives in assets/index.html.
Run commands from this skill directory, the directory containing this SKILL.md.
node scripts/server.mjs
The server prints the actual URL. It starts at http://127.0.0.1:8765/ and tries later ports if the default is occupied.
node -e 'fetch("http://127.0.0.1:8765/api/images").then(r => r.json()).then(j => console.log(j.rootPath, j.items.length)).catch(() => process.exit(1))'
If this succeeds, reuse the running server at http://127.0.0.1:8765/.
pgrep -fl 'node .*server\.mjs' || true
When a process exists but the default URL fails, inspect its stdout or try likely later ports because the server auto-increments when a port is occupied.
node -e 'fetch("http://127.0.0.1:8765/api/images").then(r => r.json()).then(j => console.log(j.rootPath, j.items.length))'
If the server chose another port, use that port.
node scripts/server.mjs
Keep the process running for the user and read stdout for the URL.
open http://127.0.0.1:8765/
Default image root:
~/.codex/generated_images
Use a different folder with:
GALLERY_ROOT=/path/to/images node scripts/server.mjs
Before declaring the skill healthy after edits, run:
node --check scripts/server.mjs
Then start the server and verify:
GET /api/images returns JSON with rootPath and items/images/<relative-path> returns image content for at least one listed itemassets/index.htmlReport the URL, image root, whether the server was reused or newly started, and any verification failure. Keep the answer short.
Take daymade/codex-image-gallery from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.