codex-image-gallery
- 作者仓库星标 0
- 作者更新于 2026年8月24日 15:33
- 作者仓库 claude-code-skills
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
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/.If the API check fails, check for a running server process:
pgrep -fl 'node .*server\.mjs' || trueWhen 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.
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.
Start the server if none is running:
node scripts/server.mjsKeep the process running for the user and read stdout for the URL.
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/imagesreturns JSON withrootPathanditems/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.
- 流狐分类
- 设计与多媒体
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @daymade · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- Shell 执行
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Run commands from this skill directory, the directory containing this SKILL.md. The server prints the actual URL. It starts at http://127.0.0.1:8765/ and tries later ports if the default is occupied.
Check the default URL first: If this succeeds, reuse the running server at http://127.0.0.1:8765/. If the API check fails, check for a running server process:
# 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
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Quick Start → Workflow → Image Root → Validation → Response
要点 -> Start a local browser gallery for Codex image outputs. · Run commands from this skill directory, the directory containing this SKILL.md. · The server prints the actual URL. · If this succeeds, reuse the running server at http://127.0.0.1:8765/. · If the server chose another port, use that port. · Keep the process running for the user and read stdout for the URL. · Report the URL, image root, whether the server was reused or newly started, and any verification failure.
文件/命令 -> scripts/server.mjs · assets/index.html · http://127.0.0.1:8765/ · GET /api/images · rootPath · items · /images/<relative-path>
内容 SHA-256 -> 349465468309
方法与流程
适用与边界
原文中的明确线索
scripts/server.mjs、assets/index.html、http://127.0.0.1:8765/、GET /api/images、rootPath、items、/images/<relative-path>