← 返回 Skills 市场
101
总下载
0
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install mddoc-design
功能描述
在 Markdown 文档里插入脑图或架构图。用户说"画个脑图"、"画架构图"、"插入图表"、"mind map"、"diagram"时触发。
使用说明 (SKILL.md)
向 Markdown 文档插入图表时,始终遵循以下规则。
依赖检查
开始任何操作前,先检查依赖是否已安装:
which mddoc && which d2
若 mddoc 未安装:
npm install -g mddoc-cli
若 d2 未安装:
- macOS:
brew install d2 - Windows:
winget install terrastruct.d2 - Linux / 其他:参考 https://d2lang.com/tour/install
两个都就绪后再继续。
规则
- 所有图表源文件和 PNG 只放在
.mddoc/目录(与 Markdown 文件平级) - 文件名用英文小写 + 连字符(
auth-flow、module-overview),不用中文或序号 - 先写源文件,再生成 PNG,再插入 Markdown,顺序不可颠倒
- Markdown 正文中永远不要直接写 D2 或 markmap 代码块
.mddoc/不存在时先创建
脑图(.mmd)
1. 写源文件 → .mddoc/\x3Cname>.mmd,格式为 markmap markdown:
# 根节点标题
## 一级分支
- 叶节点
- 叶节点
## 一级分支
- 叶节点
- 二级叶节点
2. 生成 PNG:
mddoc mindmap .mddoc/\x3Cname>.mmd
3. 插入 Markdown:

*源文件:[\x3Cname>.mmd](.mddoc/\x3Cname>.mmd)*
架构图(.d2)
1. 写源文件 → .mddoc/\x3Cname>.d2,格式为 D2 语言:
direction: right
client: 客户端 {shape: rectangle}
gateway: API Gateway {shape: rectangle}
db: Database {shape: cylinder}
client -> gateway -> db
2. 生成 PNG:
mddoc arch .mddoc/\x3Cname>.d2
3. 插入 Markdown:

*源文件:[\x3Cname>.d2](.mddoc/\x3Cname>.d2)*
批量重新生成
mddoc build
反馈与问题
遇到问题或有建议,请到 GitHub 提 issue: https://github.com/drunkpig/md-of-programer/issues
安全使用建议
This skill appears to do what it says: create diagram source files in a local .mddoc folder, render them with mddoc/d2, and insert PNG links into Markdown. Before installing or running: (1) ensure you trust the npm package mddoc-cli (review its npm page/repo) if you plan to run npm install -g; consider installing locally instead of globally; (2) confirm you want the agent to run Bash commands that will create/modify files under your project (back up important docs); (3) if you cannot or do not want to install system tools, decline installation—no credentials are requested by the skill.
功能分析
Type: OpenClaw Skill
Name: mddoc-design
Version: 0.1.4
The skill bundle provides instructions for an AI agent to generate mind maps and architecture diagrams within Markdown documents using 'mddoc-cli' and 'd2'. While it includes commands to install dependencies globally (npm install -g mddoc-cli), these actions are transparently documented and directly support the stated functionality. No evidence of data exfiltration, obfuscation, or malicious intent was found in SKILL.md or the associated metadata.
能力评估
Purpose & Capability
Name/description match the runtime instructions. Requested binaries (mddoc, d2) are exactly what the SKILL.md uses to render mind maps and D2 diagrams, and required files are constrained to a project-local .mddoc directory.
Instruction Scope
Instructions tell the agent to create source files in .mddoc/, generate PNGs, and insert Markdown links—this is within scope. The SKILL.md also includes commands that install tools (npm install -g mddoc-cli, brew/winget links) and instructs use of Bash/Read/Write; those are expected but allow the agent to run network-backed installers and modify project files, so review installs/changes before running.
Install Mechanism
There is no packaged install spec (instruction-only). The doc recommends installing mddoc via npm -g and d2 via package managers or the official site. These are standard, but global npm installs execute code from the npm registry and require network and possibly elevated permissions—consider preferring a local install or auditing the npm package first.
Credentials
The skill requires no environment variables, credentials, or config paths beyond writing/reading project files in .mddoc; this matches the stated functionality.
Persistence & Privilege
always is false and the skill does not request persistent system-wide settings or modify other skills' configurations. It operates at project level (.mddoc) and does not demand elevated persistent privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install mddoc-design - 安装完成后,直接呼叫该 Skill 的名称或使用
/mddoc-design触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.4
添加 GitHub issue 反馈链接
v0.1.3
移除 curl|sh 安装命令,改为官方文档链接
v0.1.2
简化依赖检查,统一要求安装 mddoc 和 d2
v0.1.1
添加依赖安装说明
v0.1.0
Initial release of design-md skill.
- Enables inserting mind maps and architecture diagrams into Markdown documents via user prompts.
- Strictly organizes all diagram source files and PNGs in a hidden .mddoc/ directory.
- Enforces English, hyphenated file naming and a precise workflow: write source → generate PNG → insert into Markdown.
- Supports two diagram types: mind maps (.mmd, markmap format) and architecture diagrams (.d2, D2 format).
- Provides command-line instructions for generating and batch regenerating diagram images.
- Never includes raw diagram source code directly in the Markdown body.
元数据
常见问题
Design Md 是什么?
在 Markdown 文档里插入脑图或架构图。用户说"画个脑图"、"画架构图"、"插入图表"、"mind map"、"diagram"时触发。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 101 次。
如何安装 Design Md?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install mddoc-design」即可一键安装,无需额外配置。
Design Md 是免费的吗?
是的,Design Md 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Design Md 支持哪些平台?
Design Md 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Design Md?
由 drunkpig(@drunkpig)开发并维护,当前版本 v0.1.4。
推荐 Skills