ai-image-generator

ai-image-generator is a skill for Claude Code, Codex from TashanGKD/tashan-writing-system. It costs 86 tokens per session (3,234 once invoked), scanned A, a copy of ai-image-generator, MIT.

A shared image-generation capability for other skills that need information graphics or article illustrations. It defines how to choose an image model, create prompts, use multiple visual viewpoints, reuse style-library templates, and connect images with an index.

In plain words
What is it for?
It is for selecting an image model, sending image-generation requests, supporting multi-view drafts, reusing stored styles, and linking generated images to article content.
Why use it?
It keeps image-generation decisions and API instructions in one place instead of duplicating them across several skills.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit It is for selecting an image model, sending image-generation requests, supporting multi-view drafts, reusing stored styles, and linking generated images to article content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tashangkd/tashan-writing-system/ai-image-generator
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 TashanGKD/tashan-writing-system --skill ai-image-generator
Clone the repo
git clone --depth 1 https://github.com/TashanGKD/tashan-writing-system

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 ai-image-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/tashangkd/tashan-writing-system/ai-image-generator/github.svg)](https://agentmods.dev/skills/tashangkd/tashan-writing-system/ai-image-generator)
Your own site
<a href="https://agentmods.dev/skills/tashangkd/tashan-writing-system/ai-image-generator"><img src="https://agentmods.dev/badge/skills/tashangkd/tashan-writing-system/ai-image-generator/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.

agentmods 80×15 button for ai-image-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/tashangkd/tashan-writing-system/ai-image-generator"><img src="https://agentmods.dev/badge/skills/tashangkd/tashan-writing-system/ai-image-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,234 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.
Origin 86% copy Near-identical to another mod 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.00086 $0.03234
Opus 5 $0.00043 $0.01617
Sonnet 5 $0.00017 $0.00647
Haiku 4.5 $0.00009 $0.00323

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

Security

Grade A, and why

ai-image-generator 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 11d 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.

resp = requests.post(ENDPOINT, headers=headers, json=payload, timeout=120)
Origin

This is a copy

86% identical to ai-image-generator — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/ai-image-generator/SKILL.md · 253 lines

How it starts

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

AI配图能力 Skill

这是一个能力层 Skill,被其他 Skill 调用,不直接面向用户任务。 任何需要生成图片的 Skill 都应该引用本 Skill,而不是自行嵌入 API 细节。


模型与 API

优先级 模型 适用场景 API Key
首选 qwen-image-2.0-pro 含中文文字的信息图、结构图 YOUR_DASHSCOPE_API_KEY
次选 wan2.6-t2i 纯视觉风格图(无需复杂中文文字排版) 同上(dashscope)
备用 gpt-image-1(DMXAPI) 英文为主的极简图 YOUR_DMXAPI_KEY

选择原则:信息图/结构图/有中文标注 → 用 qwen-image-2.0-pro;纯视觉风格图 → 用 wan2.6-t2i

wan2.6-t2i API 调用(endpoint 不同):

url = 'https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis'
body = {'model': 'wan2.6-t2i', 'input': {'prompt': 'PROMPT'}, 'parameters': {'size': '1024*1024', 'n': 1}}

⚠️ 已知问题:DMXAPI 上的 DALL-E 3 有较高概率网络超时(实测超时案例:2026-03-20 向日葵调研任务)。遇到超时时直接切换 qwen-image-2.0-pro,不要反复重试 DALL-E 3。

qwen-image-2.0-pro API 调用

import requests, base64

API_KEY = 'YOUR_DASHSCOPE_API_KEY'
ENDPOINT = 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation'

headers = {'Content-Type': 'application/json', 'Authorization': f'Bearer {API_KEY}'}
payload = {
    "model": "qwen-image-2.0-pro",
    "input": {"messages": [{"role": "user", "content": [{"text": "你的提示词"}]}]},
    "parameters": {
        "n": 1,
        "watermark": False,
        "prompt_extend": True,
        "size": "1024*1024"   # 标准图;小图同尺寸,HTML 中用 max-width: 65% 控制
    }
}

resp = requests.post(ENDPOINT, headers=headers, json=payload, timeout=120)
img_url = resp.json()['output']['choices'][0]['message']['content'][0]['image']

# 下载并保存(URL 24 小时有效,立即保存)
ir = requests.get(img_url, timeout=60)
with open('output.png', 'wb') as f:
    f.write(ir.content)

⚠️ 限速处理:遇到 429 时等待 30 秒后重试,最多重试 3 次。


风格库

风格库文件:_内部总控/产品定义/图片风格库.md(10种风格,当前文章使用 S03

S03 标准提示词前缀(适合大多数中文信息图):

简洁专业的信息图,适合微信文章,白色背景。[内容描述]
深蓝色#1a2f5e和橙色#e8622c为主色,圆角矩形,清晰中文标注,整体简洁商务风格。

全景图优先原则(先于绘图流程执行)

核心规则:先建立完整的对象-关系模型,再决定画什么图

Read the full file on GitHub · 253 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. 11d ago First seen · 253 lines · 86 tokens per session scan A 7fd28da2f8e8

Subscribe to this mod's changes

ai-image-generator is a skill published in the GitHub repository TashanGKD/tashan-writing-system (2 stars, last pushed 5mo ago), licensed MIT. It adds 86 tokens to every session and 3,234 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 86% identical to ai-image-generator, differing in 6 lines, and is treated as a copy.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

chengfeng-check-updates

An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens