doc-smith-images

doc-smith-images is a skill for Claude Code from AIGNE-io/doc-smith-skills. It costs 30 tokens per session (3,862 once invoked), scanned A, original, Apache-2.0.

An internal image-generation workflow for creating or editing diagrams, illustrations, and other bitmap images with AI. It can set the image path, size, aspect ratio, and text language.

In plain words
What is it for?
Generating architecture diagrams, flowcharts, data-flow images, and edited versions of existing images.
Why use it?
It provides a defined way to create visual assets without manually drawing every image.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: names the AskUserQuestion tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is /doc-smith-images "用户登录流程图" --savePath ./images/login-flow.png.

Part of the doc-smith plugin — 6 skills shipped together

Good fit Generating architecture diagrams, flowcharts, data-flow images, and edited versions of existing images.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/AIGNE-io/doc-smith-skills
agentmods
npx agentmods add skills/aigne-io/doc-smith-skills/doc-smith-images

Made for: Claude Code.

Or install doc-smith, the plugin that ships this one along with the rest of its 6 skills.

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 doc-smith-images

README.md
[![agentmods](https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-images/github.svg)](https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-images)
Your own site
<a href="https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-images"><img src="https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-images/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 doc-smith-images

Your own site · 80×15
<a href="https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-images"><img src="https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-images.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,862 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 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.00030 $0.03862
Opus 5 $0.00015 $0.01931
Sonnet 5 $0.00006 $0.00772
Haiku 4.5 $0.00003 $0.00386

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

Security

Grade A, and why

doc-smith-images 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate.mjs), 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.

Makes network callslowCapability

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

curl -sL "$URL" -o "$SAVE_PATH"
skills/doc-smith-images/SKILL.md · 426 lines

How it starts

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

Doc-Smith 图片生成

使用 AI 生成图片,支持技术图表、架构图、流程图等。

用法

# 基础用法:描述要生成的图片
/doc-smith-images "系统架构图,展示微服务之间的调用关系"

# 指定输出路径
/doc-smith-images "用户登录流程图" --savePath ./images/login-flow.png

# 指定宽高比
/doc-smith-images "系统架构图" --ratio 16:9
/doc-smith-images "数据流向图" -r 4:3

# 指定图片尺寸
/doc-smith-images "概念图" --size 4K

# 指定图片中文字的语言
/doc-smith-images "API 调用流程" --locale en

# 编辑已有图片(基于原图修改)
/doc-smith-images "优化配色和布局" --update ./images/old.png --savePath ./images/new.png
/doc-smith-images "把标题改为英文" -u ./images/arch.png --savePath ./images/arch-en.png

# 组合使用
/doc-smith-images "微服务架构图" --ratio 16:9 --locale zh --savePath ./docs/arch.png

选项

Option Alias Description
--savePath <path> 图片保存路径(必需)
--ratio <ratio> -r 宽高比:1:1, 5:4, 4:3, 3:2, 16:9, 21:9(默认 4:3)
--size <size> -s 图片尺寸:2K, 4K(默认 2K)
--locale <lang> -l 图片中文字语言(默认 zh)
--update <path> -u 基于已有图片编辑
--context <text> -c 提供上下文信息,帮助生成更准确的图片
--backend <type> 指定后端:gemini-sdkafs-cli,跳过自动检测

推荐比例

图片类型 推荐比例 说明
架构图 16:9 或 4:3 系统架构、模块关系、组件结构
流程图 4:3 或 3:2 业务流程、数据流向、状态转换
时序图 16:9 交互时序、调用链路
概念图 4:3 概念关系、层次结构
示意图 4:3 或 1:1 功能示意、原理说明

输出

  • 生成的图片文件路径

后端检测

若提供了 --backend 参数(gemini-sdkafs-cli),直接使用指定后端,跳过以下检测流程。此参数由调用方(如 doc-smith-create、doc-smith-localize)在前置检测后传入。

若未提供 --backend,按优先级检测可用的图片生成后端。检测只执行一次,后续所有图片生成/编辑操作使用同一后端。

优先级 1: Gemini SDK(推荐)

检查环境变量 GEMINI_API_KEY 是否已设置且非空:

echo "$GEMINI_API_KEY" | head -c 5

若输出非空,选定 Gemini SDK 后端。

然后检查依赖是否已安装:

ls <skill-directory>/scripts/node_modules/@google/genai 2>/dev/null

若目录不存在,自动安装:

cd <skill-directory>/scripts && npm install

优先级 2: AFS CLI

若 Gemini API Key 未配置,检查 AFS CLI:

  1. 执行 which afs 确认已安装
  2. 检查 ~/.afs-config/config.toml 是否存在且包含 path = "/aignehub" 条目
  3. 若已安装但未挂载,自动挂载:cd ~ && afs exec /.actions/mount --path /aignehub --uri aignehub://

Read the full file on GitHub · 426 lines

Files

What ships with it

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

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 · 426 lines · 30 tokens per session scan A 0bdb59e40e94

Subscribe to this mod's changes

doc-smith-images is a skill published in the GitHub repository AIGNE-io/doc-smith-skills (9 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 3,862 once invoked, about $0.0002 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-31.

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