image-gen-skill

image-gen-skill is a skill for Claude Code, Codex from TencentCloudBase/awesome-miniprogram-skills. It costs 57 tokens per session (509 once invoked), scanned A, original, MIT.

An AI image-generation skill for creating new pictures from written descriptions, including product images, illustrations, and different art styles.

In plain words
What is it for?
It helps create realistic, anime, oil-painting, watercolor, or sketch-style images, with optional style, size, and quantity choices.
Why use it?
It separates requests to create a new image from requests to edit an existing image or generate text.

Skill for Claude CodeCodex

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

Good fit It helps create realistic, anime, oil-painting, watercolor, or sketch-style images, with optional…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tencentcloudbase/awesome-miniprogram-skills/image-gen-skill
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 TencentCloudBase/awesome-miniprogram-skills --skill image-gen-skill
Clone the repo
git clone --depth 1 https://github.com/TencentCloudBase/awesome-miniprogram-skills

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tencentcloudbase/awesome-miniprogram-skills/image-gen-skill.svg)](https://agentmods.dev/skills/tencentcloudbase/awesome-miniprogram-skills/image-gen-skill)
Your own site
<a href="https://agentmods.dev/skills/tencentcloudbase/awesome-miniprogram-skills/image-gen-skill"><img src="https://agentmods.dev/badge/skills/tencentcloudbase/awesome-miniprogram-skills/image-gen-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 509 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00057 $0.00509
Opus 5 $0.00028 $0.00254
Sonnet 5 $0.00011 $0.00102
Haiku 4.5 $0.00006 $0.00051

Measured 7d ago against content hash 6856b8d464c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

image-gen-skill scanned grade A with 0 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 7d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (apis/generateImage.js, cloudfunctions/image-gen-handler/ai/image.js, cloudfunctions/image-gen-handler/index.js, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/image-gen-skill/SKILL.md · 44 lines

What it actually says

AI 图片生成

触发场景

用户原话举例:

  • 自由绘画:"画一只在咖啡杯旁打盹的橘猫"、"生成一幅星空下的山水画"
  • 商品图:"帮我生成一张北欧风格手工咖啡壶的产品展示图"
  • 插画创作:"画一张赛博朋克风格的城市插画"、"生成儿童绘本风格的小故事插图"
  • 风格创作:"用水彩风格画一朵牡丹"、"一幅印象派的日落"

不适用范围

  • 文本生成需求 → 不在本技能范围,由 text-gen-skill 处理
  • 图片编辑(修改已有图片)→ 不在本技能范围,由 image-edit-skill 处理
  • 上传图片后要求识别/分析内容 → 不在本技能范围

接口链路

  • generateImage:根据 prompt 生成图片,支持风格、尺寸、数量等参数

使用顺序

  1. 用户表达图片生成意图时,直接调用 generateImage
  2. 若用户指定了图片风格或尺寸,传入对应参数
  3. AI 负责优化 prompt 以提升生成质量,但保持用户原始意图
  4. 返回结果后通过 image-result-card 卡片展示
  5. 图片已自动持久化到云存储,但仍提示用户及时保存

设计约束

  • 必须通过云函数调用,小程序 SDK 不支持图片生成
  • 生成的图片自动上传到云存储持久化(详见云函数 ai/image.js)
  • 云函数超时配置 120 秒(图片生成较慢)
  • 返回的 fileID 可永久使用,tempUrl 仅 24 小时有效
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. 7d ago First seen · 44 lines · 57 tokens per session scan A 6856b8d464c8

Subscribe to this mod's changes

image-gen-skill is a skill published in the GitHub repository TencentCloudBase/awesome-miniprogram-skills (35 stars, last pushed 2mo ago), licensed MIT. It adds 57 tokens to every session and 509 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.