image-gen

image-gen is a skill for Claude Code, Codex from ayuayue/PiDeck. It costs 75 tokens per session (2,397 once invoked), scanned A, original, MIT.

Instructions for generating images such as illustrations, posters, avatars, and logos through an OpenAI-compatible image API. It explains how to select a configured image provider and save the result in the project.

In plain words
What is it for?
Use it when a user asks for a new image or visual asset, including requests that use a reference image, and when the generated file needs to be placed in the project.
Why use it?
It gives an agent a defined way to create image assets while keeping image-service settings separate from the conversation model settings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when a user asks for a new image or visual asset, including requests that use a reference image, and when the generated file needs to be placed in the project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ayuayue/pideck/image-gen
Install

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.

Any agent
npx skills add ayuayue/PiDeck --skill image-gen
Clone the repo
git clone --depth 1 https://github.com/ayuayue/PiDeck

Made for: Claude Code, Codex.

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

agentmods badge for image-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/ayuayue/pideck/image-gen.svg)](https://agentmods.dev/skills/ayuayue/pideck/image-gen)
Your own site
<a href="https://agentmods.dev/skills/ayuayue/pideck/image-gen"><img src="https://agentmods.dev/badge/skills/ayuayue/pideck/image-gen.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,397 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

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 →

  • medium Data Exfiltration · line 74
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 87
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.02397
Opus 5 $0.00037 $0.01198
Sonnet 5 $0.00015 $0.00479
Haiku 4.5 $0.00007 $0.00240

Measured 8d ago against content hash 4bd23311cb40, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

image-gen scanned grade A with 1 finding 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 8d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sS "$EP/generations" \
resources/skills/image-gen/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

图片生成(image-gen)

这是什么

当用户说「帮我画一张图」「生成一张海报」「做一个 logo」等请求时,用本技能 直接调用生图 API 出图。生成的图片保存为本地文件,交给用户在项目里使用。

生图供应商配置与「会话 LLM」完全分离:生图用的是 PiDeck 的 imagegen.json (或用户直接提供的 baseUrl / apiKey / 模型),不碰 AI 对话用的模型配置。

第一步:确定模型与凭据

生图请求最少需要三样:baseUrl + apiKey + 模型 id。按优先级取:

  1. 读 PiDeck 生图配置(如果用户在用 PiDeck):

    平台 配置路径
    Windows 安装版 %APPDATA%\pi-desktop\imagegen.json(即 C:\Users\<用户>\AppData\Roaming\pi-desktop\imagegen.json
    Windows 便携版 <exe 同目录>\data\imagegen.json
    macOS ~/Library/Application Support/pi-desktop/imagegen.json
    Linux ~/.config/pi-desktop/imagegen.json

    文件结构:

    {
      "providers": [
        {
          "id": "ig-1",
          "name": "OpenAI 或 Ark",
          "baseUrl": "https://api.openai.com",   // 根地址,端点按规则推导(见下)
          "apiKey": "sk-xxxx",
          "models": ["gpt-image-1"],             // 该供应商可选模型
          "extraParams": { "size": true, "output_format": false, "watermark": true },
          "referenceMode": "none | edits | image-field",   // 参考图 API 形态
          "apiStyle": "openai | siliconflow"                // 字段名/响应方言
        }
      ],
      "activeProviderId": "ig-1",   // 用户上次选中的供应商
      "activeModel": "gpt-image-1"  // 用户上次选中的模型
    }
    
    • 默认用 activeProviderId + activeModel:用户上次选的,通常是想要的。
    • 模型必须在该供应商的 models[] 里;如果有多个模型,让用户确认用哪个(用户会指定)。
  2. 读不到配置 / 用户不在 PiDeck 里:询问用户三样东西—— baseUrlapiKey模型 id。并顺手问是否需要参考图(图生图)。

第二步:确定是否有参考图

用户可能要求「基于这张图改一下」(图生图 / 局部编辑)。有参考图时:

  • 让用户提供图片的文件路径,或直接上传。
  • 把图片转成 base64 / data URI 备用(见下文各形态)。
  • 若供应商 referenceModenone:该供应商不支持图生图,直接告诉用户 「这个供应商没开启参考图能力」,不要硬发图。

参考图约束(与 PiDeck 一致):≤ 4 张,支持 png/jpeg/webp。

第三步:拼端点 URL

baseUrl 是根地址,生图端点按下面规则推导(不要盲猜):

  • 已经以 /images/generations 结尾 → 直接用。
  • 以版本段结尾(/v1/v1beta/api/api/v3 等)→ 直接追加 /images/generations
    • 例:https://ark.cn-beijing.volces.com/api/v3.../api/v3/images/generations
  • 裸根地址 → 补 /v1 再追加。
    • 例:https://api.openai.comhttps://api.openai.com/v1/images/generations

Read the full file on GitHub · 172 lines

Changes

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.

  1. 8d ago First seen · 172 lines · 75 tokens per session scan A 4bd23311cb40

Subscribe to this mod's changes

image-gen is a skill published in the GitHub repository ayuayue/PiDeck (760 stars, last pushed today), licensed MIT. It adds 75 tokens to every session and 2,397 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sn-infographic

An image-making tool that turns supplied content into an infographic, a visual format for explaining information with arranged text and graphics.

OpenSenseNova/SenseNova-Skills · 57 tokens

sn-ppt-standard

Standard and fast PPT pipeline. All LLM / VLM / T2I calls are wrapped in a single CLI entry (scripts/runstage.py). The main agent's job is simple: emit ONE shell command per stage, never write loops, never write prompts. Standard mode plans thoroughly with a three-sample deck preview checkpoint (three concatenated…

OpenSenseNova/SenseNova-Skills · 170 tokens

skin-creator

Create and apply a two-asset LobsterAI visual skin from the user's style description. Use only when the AI Skin Designer kit supplies the structured skinpack workflow marker; do not use for ordinary theme or image requests.

netease-youdao/LobsterAI · 48 tokens

sn-ppt-creative

Creative-mode PPT pipeline. One full-page 16:9 PNG per slide. LLM / VLM calls go through sn-ppt-standard/lib/modelclient.py (shared thin client). Text-to-image (the actual png rendering) goes through sn-image-base/scripts/snagentrunner.py. Falls back to web image search when T2I generation fails. Expects taskpack.json…

OpenSenseNova/SenseNova-Skills · 97 tokens

sn-ppt-entry

Entry point for PPT generation. Asks the user to choose a mode (fast, standard, or creative), then collects role / audience / scene / pagecount as needed. For standard mode, also asks how images should be sourced (AI generation, web search, or none), whether charts should use AI-generated infographics or ECharts, and…

OpenSenseNova/SenseNova-Skills · 204 tokens

music-search

Search cloud drives for downloadable music resources (songs, albums, lossless audio). Use this skill when the user wants to download a specific song or album. Do NOT use for general music information, lyrics, or recommendations.

netease-youdao/LobsterAI · 47 tokens