Agent Skills › daymade/claude-code-skills › codex-image-gallery

codex-image-gallery

GitHub

提供本地浏览器画廊以浏览 Codex 生成的图像,支持复用或启动服务器,自动处理端口冲突并验证服务状态。

daymade-codex/codex-image-gallery/SKILL.md daymade/claude-code-skills

Trigger Scenarios

用户要求浏览 Codex 生成的图像 用户要求打开本地图像画廊 用户要求检查 ~/.codex/generated_images 目录

Install

npx skills add daymade/claude-code-skills --skill codex-image-gallery -g -y
More Options

Non-standard path

npx skills add https://github.com/daymade/claude-code-skills/tree/main/daymade-codex/codex-image-gallery -g -y

Use without installing

npx skills use daymade/claude-code-skills@codex-image-gallery

指定 Agent (Claude Code)

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

安装 repo 全部 skill

npx skills add daymade/claude-code-skills --all -g -y

预览 repo 内 skill

npx skills add daymade/claude-code-skills --list

SKILL.md

Frontmatter
{
    "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.

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:

    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:

    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:

    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:

    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:

    open http://127.0.0.1:8765/
    

Image Root

Default image root:

~/.codex/generated_images

Use a different folder with:

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

Validation

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

Version History

  • 98c21cf Current 2026-08-28 22:48

Same Skill Collection

auto-repo-setup/SKILL.md
bilibili-source/SKILL.md
capture-screen/SKILL.md
cli-demo-generator/SKILL.md
cloudflare-troubleshooting/SKILL.md
codex-image-gallery/SKILL.md
competitors-analysis/SKILL.md
data-visualization-discipline/SKILL.md
daymade-audio/asr-transcribe-to-text/SKILL.md
daymade-audio/audio-router/SKILL.md
daymade-audio/meeting-minutes-taker/SKILL.md
daymade-audio/stepfun-asr/SKILL.md
daymade-audio/stepfun-tts/SKILL.md
daymade-audio/transcript-fixer/SKILL.md
daymade-claude-code/agent-web-search-setup/SKILL.md
daymade-claude-code/claude-code-hooks/SKILL.md
daymade-claude-code/claude-code-ops-router/SKILL.md
daymade-claude-code/claude-code-ping-start-5h-quota/SKILL.md
daymade-claude-code/claude-export-txt-better/SKILL.md
daymade-claude-code/claude-skills-troubleshooting/SKILL.md
daymade-claude-code/claude-switch-models-setup/SKILL.md
daymade-claude-code/claude-usage-analyst/SKILL.md
daymade-claude-code/continue-claude-code-work/SKILL.md
daymade-claude-code/continue-claude-work/SKILL.md
daymade-claude-code/continue-codex-work/SKILL.md
daymade-claude-code/lark-cli-router/SKILL.md
daymade-claude-code/local-conversation-history/SKILL.md
daymade-claude-code/marketplace-dev/SKILL.md
daymade-claude-code/prior-work-retrieval/SKILL.md
daymade-claude-code/read-claude-code-history/SKILL.md
daymade-claude-code/read-claude-web-conversation/SKILL.md
daymade-claude-code/read-codex-history/SKILL.md
daymade-claude-code/statusline-generator/SKILL.md
daymade-claude-code/tech-selection/SKILL.md
daymade-claude-code/terminal-screenshot/SKILL.md
daymade-codex/codex-1m-context-window-setup/SKILL.md
daymade-codex/design-style-picker/SKILL.md
daymade-codex/interaction-design-board/SKILL.md
daymade-codex/local-codex/SKILL.md
daymade-docs/docs-router/SKILL.md
daymade-docs/docx-creator/SKILL.md
daymade-docs/excel-automation/SKILL.md
daymade-docs/mermaid-tools/SKILL.md
daymade-docs/pdf-creator/SKILL.md
daymade-docs/ppt-creator/SKILL.md
daymade-docs/read-docx-review/SKILL.md
daymade-financial/ashare-news-fetcher/SKILL.md
daymade-financial/benchmark-due-diligence/SKILL.md
daymade-financial/bigdata-skill/SKILL.md

Metadata

Files
0
Version
c6903aa
Hash
57869932
Indexed
2026-08-28 22:48

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-29 01:09
浙ICP备14020137号-1