← 返回
未分类 中文

Md Of Programer

Insert mind maps and architecture diagrams into Markdown documents. Triggered when the user says "draw a mind map", "draw an architecture diagram", "insert a...
将思维导图和架构图插入到 Markdown 文档中。当用户说“绘制思维导图”、“绘制架构图”、“插入……”时触发。
drunkpig drunkpig 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 313
下载
💾 0
安装
1
版本
#latest

概述

When inserting diagrams into a Markdown document, always follow the rules below.

Dependency Check

Before doing anything, check that dependencies are installed:

which mddoc && which d2

If mddoc is not installed:

npm install -g mddoc-cli

If d2 is not installed:

  • macOS: brew install d2
  • Windows: winget install terrastruct.d2
  • Linux / others: see https://d2lang.com/tour/install

Make sure both are available before continuing.

Rules

  • All diagram source files and PNGs go only in the .mddoc/ directory (alongside the Markdown file)
  • File names must use lowercase English + hyphens (auth-flow, module-overview) — no spaces or numbers
  • Always write the source file first, then generate the PNG, then embed into Markdown — in that order
  • Never write D2 or markmap code blocks directly in the Markdown body
  • Create .mddoc/ if it does not exist

Mind Map (.mmd)

1. Write the source file.mddoc/.mmd in markmap markdown format:

# Root node

## Branch one
- Leaf node
- Leaf node

## Branch two
- Leaf node
  - Child leaf

2. Generate PNG:

mddoc mindmap .mddoc/<name>.mmd

3. Embed in Markdown:

![Mind map: <description>](.mddoc/<name>.png)
*Source: [<name>.mmd](.mddoc/<name>.mmd)*

Architecture Diagram (.d2)

1. Write the source file.mddoc/.d2 in D2 language:

direction: right

client: Client {shape: rectangle}
gateway: API Gateway {shape: rectangle}
db: Database {shape: cylinder}

client -> gateway -> db

2. Generate PNG:

mddoc arch .mddoc/<name>.d2

3. Embed in Markdown:

![Architecture: <description>](.mddoc/<name>.png)
*Source: [<name>.d2](.mddoc/<name>.d2)*

Regenerate All Diagrams

mddoc build

Feedback

Issues and suggestions → https://github.com/drunkpig/md-of-programer/issues

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-07 19:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 909 📥 207,393
content-creation

Marketing Skills

jchopard69
{"answer":"获取23个营销模块,包含CRO、SEO、文案、分析、发布、广告及社媒的清单、框架与现成交付物。"}
★ 143 📥 30,913
content-creation

humanizer-zh

liuxy951129-cpu
去除文本中的 AI 生成痕迹。适用于编辑或审阅文本,使其听起来更自然、更像人类书写。 基于维基百科的"AI 写作特征"综合指南。检测并修复以下模式:夸大的象征意义、 宣传性语言、以 -ing 结尾的肤浅分析、模糊的归因、破折号过度使用、三段
★ 62 📥 29,549