diagrammer
它能做什么
这个技能帮你的 AI 把简单的文字描述转换为干净的 SVG 图。适合需要为文档、README、文章或幻灯片制作技术图、又不想使用设计工具的人。
适用场景
- ✓当你想把请求流程或架构图保存为 SVG 文件时。
- ✓当你需要为 README 或幻灯片制作状态机或数据管道图时。
- ✓当你想要一张以可编辑文本规格保存的图,以便之后修改时。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/diagrammer/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请画一张 SVG 图,展示请求从客户端经过 API 到达 Postgres 数据库的过程。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能编写一个包含节点和连线的小型 JSON 规格,然后用 diagrammer 工具将其渲染为 SVG 文件。你可以修改规格并重新渲染。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
diagrammer
Use diagrammer to turn a small JSON spec into a clean SVG diagram. It is useful when the user wants a precise technical diagram without opening a design tool.
Install
The renderer must be installed locally:
pipx install diagrammer
Workflow
- Convert the user's plain-English diagram request into a JSON spec.
- Save the spec to a temporary or project file.
- Render it:
diagrammer path/to/spec.json > path/to/diagram.svg
- Return the SVG path to the user.
Spec Essentials
{
"nodes": [
{"id": "client", "type": "box", "label": "client"},
{"id": "api", "type": "box", "label": "api"},
{"id": "db", "type": "database", "label": "postgres"}
],
"edges": [
{"from": "client", "to": "api", "label": "request"},
{"from": "api", "to": "db", "label": "query"}
]
}
Built-in node types: box, circle, text, database, stack, group, note, and custom.
Useful optional fields:
direction:"LR"or"TB"router:"straight"or"ortho"labelon edgesstyle:"solid"or"dashed"weight:"thin"or"thick"
For the full reference, run:
diagrammer prompt
When To Choose This
Use diagrammer when the output should be a checked-in SVG artifact, especially for:
- README diagrams
- architecture sketches
- request flows
- state machines
- neural-net or transformer diagrams
- simple data pipelines
Prefer Mermaid when the user specifically asks for Mermaid syntax or wants diagrams rendered by a Markdown platform. Prefer Excalidraw when the user wants editable hand-drawn canvas files.
常见问题
我需要安装什么吗?
需要。指南说 diagrammer 渲染器必须安装在本地,例如用 pipx 安装。
有哪些节点类型?
指南列出了 box、circle、text、database、stack、group、note 和 custom。
我可以修改布局吗?
可以。规格中可以设置方向、路由样式和连线样式。
详情
作者的原始描述
Render clean blueprint-style SVG diagrams from JSON specs. Use when users ask to draw, sketch, or diagram a request flow, neural net, transformer block, system architecture, state machine, data pipeline, or any node-and-edge technical visual they want as an SVG for docs, READMEs, posts, or slides.
热度
- GitHub 星标
- 33k
- 排名
- #8684
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。