跳到正文
Skillpedia
技术文档33k · #8684

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/diagrammer/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Convert the user's plain-English diagram request into a JSON spec.
  2. Save the spec to a temporary or project file.
  3. Render it:
diagrammer path/to/spec.json > path/to/diagram.svg
  1. 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"
  • label on edges
  • style: "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.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8684
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能