← Back to Skills Marketplace
drunkpig

Design Md

by drunkpig · GitHub ↗ · v0.1.4 · MIT-0
cross-platform ✓ Security Clean
101
Downloads
0
Stars
0
Active Installs
5
Versions
Install in OpenClaw
/install mddoc-design
Description
在 Markdown 文档里插入脑图或架构图。用户说"画个脑图"、"画架构图"、"插入图表"、"mind map"、"diagram"时触发。
README (SKILL.md)

向 Markdown 文档插入图表时,始终遵循以下规则。

依赖检查

开始任何操作前,先检查依赖是否已安装:

which mddoc && which d2

mddoc 未安装:

npm install -g mddoc-cli

d2 未安装:

两个都就绪后再继续。

规则

  • 所有图表源文件和 PNG 只放在 .mddoc/ 目录(与 Markdown 文件平级)
  • 文件名用英文小写 + 连字符auth-flowmodule-overview),不用中文或序号
  • 先写源文件,再生成 PNG,再插入 Markdown,顺序不可颠倒
  • Markdown 正文中永远不要直接写 D2 或 markmap 代码块
  • .mddoc/ 不存在时先创建

脑图(.mmd)

1. 写源文件.mddoc/\x3Cname>.mmd,格式为 markmap markdown:

# 根节点标题

## 一级分支
- 叶节点
- 叶节点

## 一级分支
- 叶节点
  - 二级叶节点

2. 生成 PNG:

mddoc mindmap .mddoc/\x3Cname>.mmd

3. 插入 Markdown:

![脑图:\x3C描述>](.mddoc/\x3Cname>.png)
*源文件:[\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:

![架构图:\x3C描述>](.mddoc/\x3Cname>.png)
*源文件:[\x3Cname>.d2](.mddoc/\x3Cname>.d2)*

批量重新生成

mddoc build

反馈与问题

遇到问题或有建议,请到 GitHub 提 issue: https://github.com/drunkpig/md-of-programer/issues

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install mddoc-design
  3. After installation, invoke the skill by name or use /mddoc-design
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug mddoc-design
Version 0.1.4
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 5
Frequently Asked Questions

What is Design Md?

在 Markdown 文档里插入脑图或架构图。用户说"画个脑图"、"画架构图"、"插入图表"、"mind map"、"diagram"时触发。 It is an AI Agent Skill for Claude Code / OpenClaw, with 101 downloads so far.

How do I install Design Md?

Run "/install mddoc-design" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Design Md free?

Yes, Design Md is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Design Md support?

Design Md is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Design Md?

It is built and maintained by drunkpig (@drunkpig); the current version is v0.1.4.

💬 Comments