Mermaid Diagrams
jjmartres/opencode
Helps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams.
专业图表生成技能:根据需求自动选择合适的图表类型,生成符合设计规范的 PNG 图表. An agent skill from 312362115/claude.
$ npx skills add 312362115/claude --skill diagram -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install 312362115/claude diagram --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/312362115/claude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/diagram .claude/skills/diagram && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "diagram" agent skill from https://github.com/312362115/claude/tree/main/skills/diagram into .claude/skills/diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/312362115/claude/tree/main/skills/diagramType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add 312362115/claude --skill diagram -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install 312362115/claude diagram --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/312362115/claude.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/diagram .agents/skills/diagram && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "diagram" agent skill from https://github.com/312362115/claude/tree/main/skills/diagram into .agents/skills/diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add 312362115/claude --skill diagram -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install 312362115/claude diagram --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/312362115/claude.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/diagram .cursor/skills/diagram && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "diagram" agent skill from https://github.com/312362115/claude/tree/main/skills/diagram into .cursor/skills/diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/312362115/claude.git --path skills/diagram--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add 312362115/claude --skill diagram -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install 312362115/claude diagram --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/312362115/claude.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/diagram .gemini/skills/diagram && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "diagram" agent skill from https://github.com/312362115/claude/tree/main/skills/diagram into .gemini/skills/diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install 312362115/claude diagramInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add 312362115/claude --skill diagram -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/312362115/claude.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/diagram .github/skills/diagram && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "diagram" agent skill from https://github.com/312362115/claude/tree/main/skills/diagram into .github/skills/diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add 312362115/claude --skill diagram -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install 312362115/claude diagram --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/312362115/claude.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/diagram .opencode/skills/diagram && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "diagram" agent skill from https://github.com/312362115/claude/tree/main/skills/diagram into .opencode/skills/diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
diagram专业图表生成技能:根据需求自动选择合适的图表类型,生成符合设计规范的 PNG 图表. An agent skill from 312362115/claude.
Diagram is an agent skill from 312362115/claude. 专业图表生成技能:根据需求自动选择合适的图表类型,生成符合设计规范的 PNG 图表。 覆盖 29 种图表:结构图(流程图、泳道图、时序图、架构图、状态图、ER图、类图、思维导图、甘特图、Kanban、Git Graph 等) 和统计图(柱状图、折线图、饼图、雷达图、热力图、散点图、桑基图、漏斗图、瀑布图、矩形树图、柱线混合图等)。 统一工具:HTML/SVG + 内联 JS 布局计算。ER/类图使用 ELKjs 布局引擎。 所有图表遵循统一的设计规范(配色/字体/组件/间距),风格现代简洁。 支持三种输出:PNG(默认)、HTML(富文档嵌入)、DSL(Mermaid 文本,嵌入 MD 文档)。 触发词:画图、画一个、生成图表、流程图、架构图、时序图、柱状图、对比图、关系图。 即使用户没有说"画图",只要需求中涉及可视化展示(流程、架构、数据对比、关系),都应触发此技能。 被 deep-research 等其他技能调用时,同样遵循本规范生成图表。
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 110 other files, including scripts and reference files (for example `CHANGELOG.md`, `references/design-system.md` and `references/diagram-utils.md`).
It sits in Development, covering Diagrams, Task management and Deep research. It works with Mermaid and Git. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 2d4fa49. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/, which the agent can run.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Diagram loads about 2.7k tokens when it runs, and up to ~23k if it reads all its reference files. Until then it costs about 109 tokens; SKILL.md has 643 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from 312362115/claude at commit 2d4fa49, republished under its MIT licence (© 312362115). 643 words, ~2,727 tokens.
.claude/skills/diagram/SKILL.md (or your agent's skills folder). This skill also uses 108 other files; get the full folder from GitHub.用自然语言描述需求,自动生成专业的 PNG 图表,直接嵌入 Markdown 文档。
理念:内容的拓扑形态决定哪些图表能表达,读者和场景决定从中选哪个。 不要一上来就问"这是哪种图"——先看内容长什么样。
按内容的结构形态归类——同一拓扑可能映射到多个图表类型:
| 拓扑形态 | 识别信号 | 可表达的图表类型 |
|---|---|---|
| 线性序列 | A → B → C,单路径,步骤、阶段、流程 | 流程图(线性)、时序图、时间线、甘特图 |
| 多源汇聚 / DAG | 多入口、多出口、依赖关系、资源流转 | 流程图(DAG)、数据流图、网络图、桑基图 |
| 分层堆叠 | 层级、技术栈、容器化、抽象层次 | 架构图、C4 图 |
| 角色协作 | 多角色 / 跨系统 / 跨服务交互 | 泳道图、时序图、C4 系统视图 |
| 实体关系 | 数据库表、对象关系、字段映射 | ER 图、类图 |
| 状态迁移 | 状态机、生命周期、并发、git 分支 | 状态图、Git Graph |
| 树形结构 | 决策、组织、知识层级、菜单层级 | 决策树、组织图、思维导图 |
| 矩阵 / 多维评估 | 多维度对比、四象限分类、覆盖关系 | 热力图、雷达图、SWOT、文氏图、矩形树图 |
| 数值比较 | 离散对比、占比、累计增减 | 柱状图、饼图、漏斗图、瀑布图 |
| 趋势变化 | 时间序列、版本演进、走势 | 折线图、柱线混合图 |
| 分布关系 | 散点、聚类、相关性 | 散点图(含气泡) |
| 阶段任务管理 | 看板、待办、阶段流转 | Kanban、甘特图 |
| 根因分析 | 多因素归因、缺陷溯源 | 鱼骨图 |
| 用户体验旅程 | 触点、情感曲线 | 旅程图 |
同一种拓扑可能有多个表达——按读者 + 场景 + 强调点做最终选择:
| 判断维度 | 选择倾向 |
|---|---|
| 读者是开发者 | DAG 类内容优先流程图/数据流图(信息密度高),不用桑基图 |
| 读者是评审/管理层 | 流量类内容选桑基图(视觉冲击),分层选 C4 容器视图 |
| 投屏路演 | 偏视觉冲击:桑基图、雷达图、时间线、思维导图 |
| 嵌入文档 | 偏信息密度:流程图、ER 图、表格风结构图 |
| 强调动作顺序 | 时序图 > 流程图 |
| 强调容器化 / 边界 | C4 > 架构图 |
| 强调层叠关系 | 架构图 > C4 |
| 数据对比为主 | 离散用柱状图,趋势用折线图,占比用饼图或矩形树图 |
| 数据维度 ≥ 3 | 雷达图、热力图或散点图 |
| 多分支决策逻辑 | 决策树 > 流程图 |
| 单分支线性流程 | 流程图(线性) |
当发现 Markdown 中有 ```mermaid 或 ```dot 代码块时:
映射规则:
| 源格式 | 关键字/语法 | 映射目标 |
|---|---|---|
Mermaid graph TD / flowchart | 节点 + 箭头 | flowchart 模板 |
Mermaid sequenceDiagram | 参与者 + 消息 | sequence 模板 |
Mermaid classDiagram | 类 + 关系 | class 模板 |
Mermaid stateDiagram | 状态 + 转换 | state 模板 |
Mermaid erDiagram | 实体 + 关系 | er 模板 |
Mermaid gantt | 任务 + 日期 | gantt 模板 |
Mermaid pie | 标签 + 数值 | pie 模板 |
Mermaid journey | 阶段 + 评分 | journey 模板 |
DOT digraph | 有向图 | flowchart / state / class(按结构判断) |
DOT graph | 无向图 | er / network(按结构判断) |
注意:不是调用 Mermaid/Graphviz 工具渲染,而是 Claude 理解标记语言描述的图结构,转成我们的模板数据,用统一设计规范渲染。这样所有图表风格一致。
1.1-1.2 决定用哪种图表后,下面这张表是布局策略和专属规范的检索入口——不是"内容→选类型"的决策表(决策已在 1.1-1.2 完成)。
| 图表类型 | 典型场景 | 布局策略 | 专属规范 |
|---|---|---|---|
| 流程图(线性) | 工作流程、决策逻辑(单路径) | 手动布局 | references/diagrams/flowchart.md |
| 流程图(DAG) | 多源汇聚、资源流转、关系图 | ELKjs | references/diagrams/flowchart.md |
| 泳道图 | 多角色协作流程 | 手动网格 | references/diagrams/swimlane.md |
| 时序图 | API 调用、消息交互 | 自定义顺序堆叠 | references/diagrams/sequence.md |
| 架构图 | 系统分层、技术栈 | 手动层堆叠 | references/diagrams/architecture.md |
| ER 图 | 数据库表结构 | ELKjs | references/diagrams/er.md |
| 类图 | 面向对象设计 | ELKjs | references/diagrams/class.md |
| 状态图 | 状态迁移 | ELKjs | references/diagrams/state.md |
| 网络图 | 网络拓扑 | 手动分层 | references/diagrams/network.md |
| 决策树 | 选型决策 | 树形布局 | references/diagrams/decision-tree.md |
| 数据流图 | 数据管道 | 手动分层 | references/diagrams/dataflow.md |
| C4 图 | C4 系统视图 | 手动分层 | references/diagrams/c4.md |
| 思维导图 | 知识结构 | 双侧树形 | references/diagrams/mindmap.md |
| 甘特图 | 项目排期 | 日期轴网格 | references/diagrams/gantt.md |
| 时间线 | 发展历程 | 纵向列表 | references/diagrams/timeline.md |
| 组织结构图 | 组织架构 | 树形 | references/diagrams/orgchart.md |
| SWOT 图 | 优劣势分析 | 卡片四象限 | references/diagrams/swot.md |
| 鱼骨图 | 根因分析 | 鱼骨骨架 | references/diagrams/fishbone.md |
| 文氏图 | 集合关系 | 圆形交叠 | references/diagrams/venn.md |
| 旅程图 | 用户体验 | 卡片横向 | references/diagrams/journey.md |
| 柱状图 | 离散对比 | 笛卡尔坐标 | references/diagrams/bar-chart.md |
| 折线图 | 趋势变化 | 笛卡尔坐标 | references/diagrams/line-chart.md |
| 饼图 | 占比构成 | 径向 | references/diagrams/pie-chart.md |
| 雷达图 | 多维评估 | 径向 | references/diagrams/radar-chart.md |
| 热力图 | 矩阵数据 | 网格 | references/diagrams/heatmap.md |
| 桑基图 | 流量路径 | 流带分层 | references/diagrams/sankey.md |
| 散点图 | 分布关系 | 笛卡尔坐标 | references/diagrams/scatter.md |
| 矩形树图 | 数据占比/层级面积 | Squarified | references/diagrams/treemap.md |
| 柱线混合图 | 柱状+折线混合 | 笛卡尔双 Y 轴 | references/diagrams/combo.md |
| Kanban | 项目管理/任务看板 | 竖列卡片 | references/diagrams/kanban.md |
| Git Graph | Git 分支工作流 | 横向分支线 | references/diagrams/git-graph.md |
references/design-system.md — 配色、字体、组件、间距references/diagram-utils.md — SVG 工具函数、文字测量、碰撞检测references/diagrams/<type>.md — 每种图表的数据结构、布局规则、渲染细节图表布局分两种:
ELKjs 自动布局(ER图、类图、状态图、流程图 DAG 模式):
lib/elk.bundled.jselk.layout(graph).then(result => { /* 渲染 */ }).then() 回调里手动布局(流程图、泳道图、架构图、时序图等):
1. 读取专属规范 → 了解数据结构和布局规则
2. 定义数据(nodes/edges/steps/tables 等)
3. 计算布局坐标(ELKjs 或手动)
4. 渲染 SVG(节点 → 连线 → 标签,按层级顺序)
5. 写入 HTML 文件(含内联 JS + CSS)
6. 用 capture.py 截图 → PNG(禁止手动调用 Playwright)所有模板遵循统一结构:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, system-ui, 'PingFang SC', sans-serif;
background: #ffffff;
padding: 24px;
display: inline-block; /* 关键:画布收缩包裹内容 */
}
</style>
<!-- ELKjs 仅在 ER/类图/状态图中引入 -->
<script src="lib/elk.bundled.js"></script>
</head>
<body>
<svg id="canvas"></svg>
<script>
(function() {
// 1. 数据定义(title, subtitle, nodes, edges 等)
// 2. 主题定义(colors, fonts, spacing)
// 3. 工具函数(el, measureText)
// 4. 布局计算(ELKjs 或手动)
// 5. 渲染(背景层 → 连线层 → 节点层 → 标签层)
})();
</script>
</body>
</html>标题默认行为取决于调用场景——但记住:标题、副标题、顶部标签条、底部图例、节点 icon 等都是可叠加的独立组件,不是"评审级必备"。完整组件清单和触发条件见 references/diagrams/review-grade.md。
| 调用场景 | 默认行为 |
|---|---|
| 用户直接请求画图 | 标题 + 副标题(普通尺寸) |
| deep-research 报告配图 | 不带标题,章节标题承担 |
| writing skill 嵌入文档的配图 | 不带标题,章节标题承担 |
| writing skill 路演 / 评审 HTML 配图 | 大字标题 + 副标题默认开,其他叠加组件按内容评估(见 review-grade.md) |
| 用户明确说"画评审版 / 路演图" | 进入 review-grade 评估流程,逐组件判断是否叠加 |
| 用户明确说"不要标题" | 跳过标题渲染 |
渲染参数:
title 为空字符串或 null 时跳过标题渲染,标题区高度设为 0#1a1a2e,标题区 52px#888888,y=36重要原则:被 writing 路演 HTML 调用 ≠ 必须开全部叠加组件。仍要按内容形态逐项评估,简单图就该简单画。
// 标题可选的标准写法
var TITLE_AREA_H = title ? 52 : 0;
// 渲染时条件判断
if (title) {
nodeGroup.appendChild(el('text', { ... })).textContent = title;
if (subtitle) nodeGroup.appendChild(el('text', { ... })).textContent = subtitle;
}PNG(默认) — 用于 Markdown 文档配图:
#FFFFFFHTML(可选) — 用于富文档嵌入、交互式展示:
python scripts/capture.py input.html -f htmlDSL(可选) — 用于嵌入 Markdown 文档,文本可 diff、可版本控制:
DSL 选择规则:
| 图表类型 | DSL | 代码块标记 |
|---|---|---|
| flowchart / sequence / class / state / er | Mermaid | ```mermaid |
| gantt / mindmap / timeline / c4 / sankey / journey | Mermaid | ```mermaid |
| architecture / swimlane / network / dataflow / orgchart / decision-tree | Mermaid(flowchart + subgraph) | ```mermaid |
| bar / line(柱状图、折线图) | Mermaid(xychart-beta) | ```mermaid |
| pie(饼图) | Mermaid | ```mermaid |
| radar / heatmap / scatter / funnel / waterfall 等 | 不支持 DSL | 继续用 PNG |
| quadrant / gitGraph / block | 暂不支持 | 后续按需开放 |
DSL 输出格式示例:
用户:画一个用户登录的流程图,输出 mermaid
输出:
` ` `mermaid
flowchart TD
A[用户访问登录页] --> B{已有账号?}
B -->|是| C[输入用户名密码]
B -->|否| D[跳转注册页]
C --> E{验证通过?}
E -->|是| F[跳转首页]
E -->|否| G[提示错误]
G --> C
` ` `用户:画一个微服务架构图,输出 mermaid
输出:
` ` `mermaid
flowchart TD
subgraph 网关层
nginx[Nginx 负载均衡] --> api_gw[API Gateway]
end
subgraph 服务层
user_svc[用户服务]
order_svc[订单服务]
pay_svc[支付服务]
end
subgraph 数据层
mysql[(MySQL)]
redis[(Redis)]
end
api_gw --> user_svc & order_svc & pay_svc
user_svc --> mysql
order_svc --> mysql
pay_svc --> redis
` ` `必须使用固化脚本,禁止手动调用 Playwright MCP 工具截图。
# 结构图:HTML → PNG
python ~/.claude/skills/diagram/scripts/capture.py <HTML文件> <输出路径>.png
# 结构图:HTML → 自包含 HTML
python ~/.claude/skills/diagram/scripts/capture.py <HTML文件> <输出路径>.html -f html
# 统计图:JSON → PNG(bridge.py 内部自动截图)
python ~/.claude/skills/diagram/scripts/bridge.py -c <配置>.json -o <输出路径>.png
# 统计图:JSON → 自包含 HTML
python ~/.claude/skills/diagram/scripts/bridge.py -c <配置>.json -o <输出路径>.html -f html为什么不能手动截图? capture.py / bridge.py 已封装好 HTTP 服务启动、ELKjs 异步等待、Retina 2x 输出、body 元素定位等逻辑。手动用
browser_run_code/browser_take_screenshot容易遗漏等待逻辑导致截图空白或模糊。
<图表类型>-<描述>.png(英文小写 + 连字符)
assets/ 或 images/ 目录docs/research/assets/| 工具 | 位置 | 用途 |
|---|---|---|
capture.py | scripts/capture.py | 结构图 HTML → PNG/HTML(内部调用 Playwright) |
bridge.py | scripts/bridge.py | 统计图 JSON → PNG/HTML(内部调用 Playwright) |
| ELKjs | lib/elk.bundled.js(已内联) | ER图/类图/状态图/流程图DAG的自动布局 |
Playwright 仅作为 capture.py / bridge.py 的内部实现,不要直接调用 Playwright MCP 工具(
browser_navigate、browser_take_screenshot、browser_run_code等)来截图。
ELKjs 仅用于自由图布局(节点和边的位置需要算法优化的场景)。以下图表类型不用 ELKjs:
原因:这些图表有明确的领域布局规则,ELKjs 的自动优化会打破这些规则(比如重排泳道顺序、改变分组位置)。
例外:流程图的 DAG 模式(多根节点、汇聚、非决策分支)使用 ELKjs,因为此类拓扑无法用简单的"主路径+侧分支"手动布局。详见 references/diagrams/flowchart.md。
highlight 仅用于原图明确标注为关键/核心的节点,不要用它来区分"不同类别"——类别差异用 process/external/datastore 等语义类型表达© 312362115, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 108 other files (scripts, references) in skills/diagram of 312362115/claude.
Open the folder on GitHubat commit 2d4fa49
Diagram next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Diagram this skill312362115/claude | 107 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Mermaid Diagramsjjmartres/opencode | 133 | 6 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Tbdjlevy/strif | 131 | — | ~3.5k | Automated safety check: Pass | MIT | |
| Map Architectureazalio/map-framework | 156 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Docs CIjh941213/my-cc-harness | 125 | — | ~989 | Automated safety check: Notes | None | |
| Drawio Generatorluongnv89/skills | 131 | — | ~2.5k | Automated safety check: Pass | MIT |
jjmartres/opencode
Helps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams.
jlevy/strif
Git-native issue tracking (beads), coding guidelines, knowledge injection, and spec-driven planning for AI agents.
azalio/map-framework
Opt-in proactive architecture-deepening report: ranks codebase areas by recent git hotspot and design friction, generates a ranked Markdown+Mermaid candidate report under…
jh941213/my-cc-harness
Scaffold a docs-as-code CI/CD pipeline + docs drift detection — link check, OpenAPI lint/breaking gate, mermaid validation, docs freshness check, CHANGELOG automation, docs.yaml manifest.
luongnv89/skills
Generate professional diagrams as valid draw.io XML — flowcharts, architecture, C4 models, ER diagrams, sequence diagrams, mind maps, and swimlanes.
luongnv89/skills
Generate diagrams as valid Excalidraw JSON — flowcharts, architecture, ER diagrams, mind maps, sequence diagrams, wireframes, C4 models, and more.
312362115/claude
深度调研技能:对任意命题进行系统性调研并输出专业研究报告. An agent skill from 312362115/claude.
312362115/claude
MD 文件浏览器预览:GitHub 风格渲染 + 左侧自动目录. An agent skill from 312362115/claude.
312362115/claude
通用写作技能:以"内容→组件→组合"的方式产出技术文档、产品文档、汇报材料. An agent skill from 312362115/claude.
312362115/claude
代码导读技能:帮助快速理解不熟悉的项目或模块,建立心智模型. An agent skill from 312362115/claude.
312362115/claude
数据库代码审查 + Migration 安全检查. An agent skill from 312362115/claude.
312362115/claude
依赖关系分析技能:回答"改这里会影响哪里". An agent skill from 312362115/claude.
专业图表生成技能:根据需求自动选择合适的图表类型,生成符合设计规范的 PNG 图表. An agent skill from 312362115/claude. Diagram is an agent skill from 312362115/claude.
Diagram fits situations like: tasks that involve Diagrams; tasks that involve Task management; tasks that involve Deep research.
Run `npx skills add 312362115/claude --skill diagram -a claude-code`. Or copy the skill folder (skills/diagram in 312362115/claude) into .claude/skills/diagram in your project. Claude Code loads it when a task matches its description.
Run `npx skills add 312362115/claude --skill diagram -a codex`. Or copy the skill folder (skills/diagram in 312362115/claude) into .agents/skills/diagram in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add 312362115/claude --skill diagram -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diagram, .gemini/skills/diagram, .github/skills/diagram and .opencode/skills/diagram in your project.
Going by SKILL.md and its folder, Diagram needs the command-line tools its instructions call (python).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Diagram is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 20k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Diagram: Mermaid Diagrams (jjmartres/opencode, 133 stars), Tbd (jlevy/strif, 131 stars), Map Architecture (azalio/map-framework, 156 stars) and Docs CI (jh941213/my-cc-harness, 125 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
312362115 (a GitHub user) maintains it in 312362115/claude, which has 107 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on May 14, 2026.
Source: 312362115/claude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.