Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add yan-labs/yan-skills --skill imagegengit clone --depth 1 https://github.com/yan-labs/yan-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/yan-labs/yan-skills/imagegen)<a href="https://agentmods.dev/skills/yan-labs/yan-skills/imagegen"><img src="https://agentmods.dev/badge/skills/yan-labs/yan-skills/imagegen/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/yan-labs/yan-skills/imagegen"><img src="https://agentmods.dev/badge/skills/yan-labs/yan-skills/imagegen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Agent Snooping · line 31 Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00210 | $0.04847 |
| Opus 5 | $0.00105 | $0.02423 |
| Sonnet 5 | $0.00042 | $0.00969 |
| Haiku 4.5 | $0.00021 | $0.00485 |
Grade B, and why
imagegen scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
| 不传 `-m` | 用 `~/.codex/config.toml` 的默认模型,用户点名才覆盖 | Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- 页面接线后 `curl -I` 每张图 200;仓库结构迁移后 favicon/og 静默 404 是踩过的坑。 How it starts
The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.
imagegen
一句话定位:借 Codex agent 内置的图像生成能力出图;本 Skill 只管五件事——把需求翻成好提示词、把命令跑通、验收、压缩、放进项目该在的目录。
图像生成不是 CLI 子命令(没有 codex image;codex exec --image 是把图当输入附上)。它是 Codex agent 的内置工具 image_gen。不要翻 codex --help 找 flag,找不到就下结论"不能生图"——这个结论是错的。描述你要的图,让 agent 自己选方法。
启动命令
mkdir -p <outdir> # 先建目录,提示词里写它的绝对路径
cat <outdir>/prompt.md | codex exec --skip-git-repo-check \
--config model_reasoning_effort="medium" \
--sandbox danger-full-access \
-C <outdir> -o <outdir>/final.md 2>/dev/null
| 要点 | 说明 |
|---|---|
| 后台跑 | Bash 的 run_in_background: true,两张图约 2–3 分钟,成套图更久;等完成通知,不要轮询 |
--sandbox danger-full-access |
生图要走网络。这个 flag 是否需要确认取决于当前机器的授权设置:有常设授权就直接跑,没有就按该机器的规则确认一次;无论哪种,启动那一行都要说明用了哪个 sandbox |
-o <outdir>/final.md |
最终报告写进文件,从这里读路径与方法;stdout 是进度噪音,别去解析 |
2>/dev/null |
压掉 stderr 的思考流;调试 Codex 本身时才拿掉 |
| effort | medium 够用,这不是推理任务 |
不传 -m |
用 ~/.codex/config.toml 的默认模型,用户点名才覆盖 |
| 原图在哪 | Codex 每次 image_gen 的原始输出都落在 ~/.codex/generated_images/<session-id>/exec-*.png(0.7–1.5 MB/张);输出目录里的是它后处理过的版本,要原图去那里取 |
codex --version 失败或启动就退出:先 codex doctor,如实报告,不要盲目重试。
提示词怎么写
一份 prompt.md 必含六样,缺一样就会出一类问题:
- 输出目录绝对路径(已
mkdir -p)。 - 逐张编号:精确文件名 + 具体描述 + 像素尺寸/比例。
- 共享风格块:画风、背景、hex 调色板、光线、镜头——一套图靠它保持一致。
No text, no letters, no logos, no watermarks.生成的字几乎必花,非英文界面更是错字;文字后期用 HTML/CSS 叠。- 逃生口:
If you genuinely cannot generate images, say so plainly. Do not substitute placeholders, ASCII art, solid rectangles, or images downloaded from the web. - 回报要求:每个文件的绝对路径、实际像素、字节数、有无 alpha、所用方法(哪个工具/模型、有无本地后处理)。
透明图务必写 true alpha, not a white/dark square——实测 Codex 靠这句自检,第一版烤了底色又自己返工。
再加一条常用兜底:If the exact size is unsupported, generate the nearest aspect and resize locally (sips / PIL) to the exact pixels; keep alpha for transparent items.
完整示例(吉祥物 + og:image 两张一套)
Generate two images with your built-in image generation tool and save them to:
<outdir absolute path>/
Shared style: palette #2563EB (primary) #F59E0B (accent) #0F172A (ink) #F8FAFC (paper).
No text, no letters, no logos, no watermarks anywhere.
1. `mascot-logo.png` — 1024x1024, transparent background PNG (true alpha, not a white square).
A friendly round owl holding a tiny wrench. Flat vector style, bold clean shapes,
2-3 flat tones per element, no gradients, no drop shadows. Occupies 75-80% of the
frame, centered, props included in that measure.
2. `og-image.png` — 1200x630 (1.91:1), opaque. Photorealistic editorial photo: a person
in their late twenties at a wooden desk in front of a laptop, soft window light from
the left, shallow depth of field, calm home office, mug and small plant. Eye-level,
subject on the left so the right third is clean negative space. Laptop screen is a
soft blurred blue-white glow, nothing readable.
Rules: if you genuinely cannot generate images, say so plainly — no placeholders, ASCII
art, solid rectangles, or web downloads. If the exact size is unsupported, generate the
nearest aspect and resize locally (sips / PIL); keep alpha for the mascot.
Report per file: absolute path, actual pixels, bytes, alpha yes/no, method used.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 184 lines · 210 tokens per session scan B ba4bd72ee388
imagegen is a skill published in the GitHub repository yan-labs/yan-skills (179 stars, last pushed today), licensed MIT. It adds 210 tokens to every session and 4,847 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
drawio-diagram
A tool for creating editable Draw.io diagrams, a file format used for flowcharts, system diagrams, and model illustrations.
infographic-creator
Create beautiful infographics based on given text content. Use when users request to create infographics.
nano-banana
Generate professional presentation slides and high-quality illustrations using Gemini image generation API (Nano Banana 2), with interactive browser-based review and iterative editing. Full workflow: content planning conversation → slidesplan.json → batch image generation → review with feedback → targeted slide…
logo-design
Generate logo variants for a brand, producing multiple production-grade marks across different architectures (wordmark, lockup, symbol-only, letterform-as-symbol, monogram) with rationale, application specs, and decision-ready presentation. Distinct from brand-identity, which produces the complete system (logo plus…
visio-image-rebuilder
Rebuild or restyle editable Microsoft Visio diagrams from reference images and existing .vsdx files, then export deliverables as .vsdx, PNG, SVG, PDF, or PPTX. Use when the user asks Codex to open Visio, recreate a diagram from a PNG/JPG/screenshot/reference image, match a scientific model figure, update…
creative-direction
Walk the user through four directional axes (tone register, aesthetic philosophy, audience relationship, sensory ambition) and produce a structured aesthetic brief that downstream content, copy, design, and art-direction skills consume as required input. The aesthetic depth layer, distinct from creative-brief…