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 TencentCloudBase/awesome-miniprogram-skills --skill image-gen-skillgit clone --depth 1 https://github.com/TencentCloudBase/awesome-miniprogram-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/tencentcloudbase/awesome-miniprogram-skills/image-gen-skill)<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>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.00057 | $0.00509 |
| Opus 5 | $0.00028 | $0.00254 |
| Sonnet 5 | $0.00011 | $0.00102 |
| Haiku 4.5 | $0.00006 | $0.00051 |
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.
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.
What it actually says
AI 图片生成
触发场景
用户原话举例:
- 自由绘画:"画一只在咖啡杯旁打盹的橘猫"、"生成一幅星空下的山水画"
- 商品图:"帮我生成一张北欧风格手工咖啡壶的产品展示图"
- 插画创作:"画一张赛博朋克风格的城市插画"、"生成儿童绘本风格的小故事插图"
- 风格创作:"用水彩风格画一朵牡丹"、"一幅印象派的日落"
不适用范围
- 文本生成需求 → 不在本技能范围,由 text-gen-skill 处理
- 图片编辑(修改已有图片)→ 不在本技能范围,由 image-edit-skill 处理
- 上传图片后要求识别/分析内容 → 不在本技能范围
接口链路
generateImage:根据 prompt 生成图片,支持风格、尺寸、数量等参数
使用顺序
- 用户表达图片生成意图时,直接调用 generateImage
- 若用户指定了图片风格或尺寸,传入对应参数
- AI 负责优化 prompt 以提升生成质量,但保持用户原始意图
- 返回结果后通过
image-result-card卡片展示 - 图片已自动持久化到云存储,但仍提示用户及时保存
设计约束
- 必须通过云函数调用,小程序 SDK 不支持图片生成
- 生成的图片自动上传到云存储持久化(详见云函数 ai/image.js)
- 云函数超时配置 120 秒(图片生成较慢)
- 返回的
fileID可永久使用,tempUrl仅 24 小时有效
What ships with it
15 files 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.
- apis/generateImage.js 1.4 KB runs code
- cloudbaserc.json 700 B
- cloudfunctions/image-gen-handler/ai/image.js 2.3 KB runs code
- cloudfunctions/image-gen-handler/index.js 632 B runs code
- cloudfunctions/image-gen-handler/package.json 216 B
- components/image-result-card/index.js 3.4 KB runs code
- components/image-result-card/index.json 49 B
- components/image-result-card/index.wxml 1.6 KB
- components/image-result-card/index.wxss 2.9 KB
- data/seed.js 456 B runs code
- index.js 371 B runs code
- mcp.json 2.2 KB
- mp-skills.json 154 B
- README.md 2.4 KB
- utils/util.js 594 B runs code
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.
- 7d ago First seen · 44 lines · 57 tokens per session scan A 6856b8d464c8
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.
Other skills, from other repositories
card-xiaohongshu
Xiaohongshu-style knowledge cards, arranged as a swipeable multi-card carousel.
video-hyperframes
Hyperframes / Remotion-compatible continuous frame animation with autoplay support.
card-twitter
Twitter quote or data card designed to pair with a post.
poster-hero
Vertical poster or Moments-style share image with strong visual impact.
deck-ljg-present
A presentation template that converts an outline or Markdown document into large, poster-like slides while keeping the original wording, order, and content. It uses black, red, or yellow colour themes and assigns document elements to slide layouts.
article-sketchnote-editorial
A visual editorial format that turns a concept into a magazine-like story told through a problem, failed attempts, a turning point, discovery, and naming. It combines Chinese prose with sketchnote-style page layouts.