Skip to main content
skill CX Codex

codex-image-gallery — Claude Code skill: what it does, how to install

Launches a local browser gallery for reviewing Codex-generated images. Useful when you need to inspect local output folders without leaving your agent workflow.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add daymade/claude-code-skills --skill codex-image-gallery -a claude-code
Open on GitHub

What codex-image-gallery does

The skill runs a lightweight local server to inspect images created by Codex. Everything is self-contained within the skill folder, using scripts/server.mjs for the backend and assets/index.html for the user interface. It reads files from ~/.codex/generated_images by default, but you can target any path using the GALLERY_ROOT environment variable.

Before starting a new process, the workflow checks if a gallery is already running on port 8765 via /api/images. If that port is busy, the server increments port numbers automatically. You need Node.js installed locally or the server will fail immediately. Once verified, it opens your default browser.

What it helps with

  • browse Codex image outputs in a local web interface
  • inspect generated images stored in ~/.codex/generated_images
  • serve an alternative image folder using the GALLERY_ROOT variable
  • reuse an active gallery server without launching duplicate processes

Example prompts for the agent

  • Open the local gallery for my Codex generated images
  • Inspect generated images in ~/.codex/generated_images
  • Start the codex-image-gallery server for a custom image folder

How to install codex-image-gallery

1Skills CLI (Vercel)

npx skills add daymade/claude-code-skills --skill codex-image-gallery -a claude-code

2Manually: put the files in place

~/.claude/skills/codex-image-gallery/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/codex-image-gallery/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about codex-image-gallery

How to install codex-image-gallery in Claude Code?

Run npx skills add daymade/claude-code-skills --skill codex-image-gallery -a claude-code. This command registers the skill in your Claude Code environment.

What does codex-image-gallery do?

It runs a local Node.js server and opens a browser interface to view images generated by Codex. By default, it displays files from ~/.codex/generated_images.

How can I change the image directory?

Set the path with the GALLERY_ROOT environment variable, such as GALLERY_ROOT=/path/to/images node scripts/server.mjs. The server will load graphics from that directory.

Source text

SKILL.md · MIT
---
name: codex-image-gallery
description: 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.
---

# 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`.

## Quick Start

Run commands from this skill directory, the directory containing this `SKILL.md`.

```bash
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.

## Workflow

1. Check the default URL first:

   ```bash
   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/`.

2. If the API check fails, check for a running server process:

   ```bash
   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.

3. Verify any reused URL before reporting success:

   ```bash
   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.

4. Start the server if none is running:

   ```bash
   node scripts/server.mjs
   ```

   Keep the process running for the user and read stdout for the URL.

5. Open the browser unless the user asks for URL-only:

   ```bash
   open http://127.0.0.1:8765/
   ```

## Image Root

Default image root:

```text
~/.codex/generated_images
```

Use a different folder with:

```bash
GALLERY_ROOT=/path/to/images node scripts/server.mjs
```

## Validation

Before declaring the skill healthy after edits, run:

```bash
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 item
- The page loads from the bundled `assets/index.html`

## Response

Report the URL, image root, whether the server was reused or newly started, and any verification failure. Keep the answer short.

© daymade · MIT · daymade/claude-code-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set64

notify-wecom Sends a single one-off message to a WeCom (Enterprise WeChat) group bot. Handy when the team needs a quick ping without templates or setup. CX Codex +1 341installs setup-notifications-via-wecom Sets up a WeCom group bot webhook and sends technical status messages through it. Useful when a backup, sync or cron job should report on its own. CX Codex +1 341installs local-codex Runs the local OpenAI Codex CLI as a non-interactive sub-agent using ChatGPT OAuth. Ideal for offloading code generation and reviews without API keys. CX Codex +1 333installs wps-doc-scraper This skill archives public WPS/KDocs documents and embedded ProcessOn mind maps as raw data, SVG or PNG, and Markdown. Useful when a link has to be saved without logging in. CX Codex +1 334installs download-gemini-images This skill downloads images from an open Gemini chat through your logged-in Chrome session and packages them into a ZIP in thread order. CX Codex +1 325installs openclaw-model-switch Safely switches or repairs OpenClaw model settings in openclaw.json. It handles primary model switches, routing errors, and token hijack bugs without breaking gateway sync. CX Codex +1 323installs claude-migrate-memory-to-doc Pulls your profile and preferences out of Claude's personal memory into documents that Claude, Cursor and other CLIs can read. CX Codex +1 325installs skill-governance Works out how many Skills the model actually sees, why the catalog is truncated, and which duplicates should go. Handy once your Skill list gets long. CX Codex +1 303installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor