relay-imagegen
Skill0 starsChanged 5 months agoMITView on GitHub
Generate or edit images through the OpenAI-compatible relay configured in Codex config/auth files. Use when the user explicitly asks for relay, proxy, custom-endpoint, or "中转站" image generation instead of the built-in image tool.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- yfpgle-glitch/relay-imagegentheir own version, first seen Sep 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- yfpgle-glitch/relay-imagegen★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-designSkill
- architecture-consultantSkill
- backend-patternsSkill
- ci-cdSkill
- code-reviewSkill
- containersSkill
- database-migrationsSkill
- doc-generatorSkill
- git-workflowSkill
- go-reviewSkill
- luaSkill
- markdownSkill
- nginxSkill
- nodejsSkill
- observabilitySkill
- product-managerSkill
- project-standards-initSkill
- prompt-designSkill
- python-reviewSkill
- reactSkill
- redisSkill
- releaseSkill
- security-baselineSkill
- semi-mcp-setupSkill
- tailwindcssSkill
- test-engineeringSkill
- tibishu-note-searchSkill
- tibishu-notesSkill
- typescript-reviewSkill
- unity-csharpSkill
- validation-lintSkill
- vueSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use scripts/relay_imagegen.py from this skill directory to run the bundled system ImageGen CLI through the user's configured relay.
- Very specific: line 17
Read the active model provider from ${CODEX_HOME:-~/.codex}/config.toml.
- Very specific: line 18
Read missing values from ${CODEX_HOME:-~/.codex}/auth.json.
- Distinctive: line 26
Never print, copy, persist, or ask the user to paste resolved credentials.
- Very specific: line 30
Use uv so no permanent Python package installation is required.
- Distinctive: line 33
Before the first live request, verify credential resolution without revealing the resolved values:
- Very specific: line 61
Do not assume a relay supports direct transparent output, even when the upstream CLI exposes --background transparent.
- Distinctive: line 70
Run a local background-removal or cutout step to convert the result to RGBA.
- Distinctive: line 75
After generation, inspect the image, save project assets inside the workspace, and report the output path and final prompt.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Relay ImageGen
Use scripts/relay_imagegen.py from this skill directory to run the bundled
system ImageGen CLI through the user's configured relay. Do not use the
built-in image generation tool when the request explicitly requires a relay.
Resolve the wrapper path relative to this loaded SKILL.md; do not assume the
skill is installed under CODEX_HOME.
The wrapper resolves credentials at runtime in this order:
- Read the active model provider from
${CODEX_HOME:-~/.codex}/config.toml. - Read missing values from
${CODEX_HOME:-~/.codex}/auth.json. - Fail without making a request if either the base URL or token is missing.
Accept both base_url and openai_base_url in Codex config, including
top-level values and active model_providers entries. If --check reports a
missing base URL while config.toml contains openai_base_url, verify the
wrapper's field resolution instead of asking the user to paste credentials.
Never print, copy, persist, or ask the user to paste resolved credentials.
Run
Use uv so no permanent Python package installation is required. Replace
<skill-directory> with the directory containing this SKILL.md.
Before the first live request, verify credential resolution without revealing the resolved values:
uv run --with tomli python \
"<skill-directory>/scripts/relay_imagegen.py" \
--checkGenerate an image with:
uv run --with openai --with tomli python \
"<skill-directory>/scripts/relay_imagegen.py" \
generate \
--prompt "<prompt>" \
--out "<workspace-output-path>"Pass normal system ImageGen CLI arguments after the wrapper path. The default
model is gpt-image-2; select another gpt-image-* model only when the user
requests it or the relay requires it.
For edits, use the edit subcommand and pass --image. For multiple distinct
prompts, use generate-batch.
Transparent Image Workflow
Do not assume a relay supports direct transparent output, even when the
upstream CLI exposes --background transparent. Some relay/model combinations
reject transparent backgrounds or render a checkerboard into the image.
For sticker-like transparent assets:
- Generate or edit an opaque PNG with the subject isolated on a plain white or solid-color background suitable for background removal. Do not request a checkerboard background.
- Run a local background-removal or cutout step to convert the result to RGBA. Edge-connected solid-background removal is sufficient for simple assets; use a stronger matting tool for complex hair, fur, edges, or shadows.
- Visually inspect the result and verify its alpha channel.
After generation, inspect the image, save project assets inside the workspace, and report the output path and final prompt. If network access is blocked, request the narrow approval needed to rerun the same command.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

