跳到正文
Skillpedia
写作51k · #3492

markdown-mermaid-writing

它能做什么

这个工具可以帮你用 Markdown 格式编写文档,并制作名为 Mermaid 的可视化图表。它适合以清晰、易于编辑的方式描述工作流程、关系、时间线和数据结构。

适用场景

  • ✓撰写技术报告或项目 README 时。
  • ✓绘制流程图,或用图表展示想法之间的关系时。
  • ✓为项目制作可视化时间线时。

技能链接

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/markdown-mermaid-writing/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

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

可以这样问 AI

“为制作咖啡的过程创建一个 Mermaid 流程图,展示从准备材料到上桌的各个步骤。”

每周 5 个新技能,1 分钟读完。

工作原理

你用纯文本写下内容,工具会将其转换为可视化图表或格式化文档。Mermaid 图表由文本构成,因此很容易修改,也方便用版本控制管理。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Markdown and Mermaid Writing

Overview

This skill provides an optional house style for Markdown documentation with Mermaid structural diagrams. Follow the requested output format, existing repository conventions, and journal requirements first. This skill does not replace scientific analysis or plotting.

A relationship expressed as Mermaid inside a .md file is editable text that diffs cleanly in git. A compatible host renders it without a separate user build step. It renders where the host has Mermaid support; plain Markdown viewers may show only code, and platforms/extensions ship different Mermaid versions. It uses a compact source representation, though token use depends on the diagram. Exporting SVG/PNG requires a renderer; retain the diagram source alongside exported figures.

"The more you get your reports and files in .md in just regular text, which mermaid is as well as being a simple 'script language'. This just helps with any downstream rendering and especially AI generated images (using mermaid instead of just long form text to describe relationships < tokens). Additionally mermaid can render along with markdown for easy use almost anywhere by humans or AI."

— Clayton Young (@borealBytes), K-Dense Discord, 2026-02-19

When to Use This Skill

Use this skill when:

  • Writing a requested Markdown report, README, methods overview, or research note
  • Diagramming a workflow, data pipeline, schema, state machine, or conceptual relationship
  • Maintaining editable Mermaid sources and their rendered SVG/PNG exports

Use scientific plotting tools directly for measured data, uncertainty, statistical graphics, exact geometry, or publication figures that Mermaid cannot faithfully represent. Mermaid is not a required precursor to a quantitative chart or an existing SVG/code-native asset.

🎨 The Source Format Philosophy

Why text-based diagrams win

What matters Mermaid in Markdown Python / AI Image
Git diff readable ✅ text source Plotting code/SVG can also be text
Editable source ✅ Plotting scripts and vector sources are editable
Compact relationship notation Often Depends on representation
Native preview Host/version dependent Viewer/format dependent
Parseable by AI without vision ✅ ❌
Works in destination Check Mermaid support and version Check image format support
Accessible (screen readers) Check SVG metadata and text alternative Provide alt text/data table
Convertible to image later ✅ anytime — already image

The three-phase workflow

flowchart LR
    accTitle: Three-Phase Documentation Workflow
    accDescr: Markdown holds the structural diagram source. Quantitative charts come from data and plotting code; optional illustrations require a separate factual review.

    p1["📄 Phase 1<br/>Mermaid in Markdown<br/>(structural source)"]
    p2["🐍 Phase 2<br/>Python Generated<br/>(optional — data charts)"]
    p3["🎨 Phase 3<br/>AI Generated Visuals<br/>(optional — polish)"]
    out["📊 Final Deliverable"]

    p1 --> out
    data["Data and plotting code"] --> p2
    p1 -.->|"when needed"| p3
    p2 --> out
    p3 --> out

    classDef required fill:#dbeafe,stroke:#2563eb,stroke-width:2px,color:#1e3a5f
    classDef optional fill:#fef9c3,stroke:#ca8a04,stroke-width:2px,color:#713f12
    classDef output fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d

    class p1 required
    class p2,p3 optional
    class out output

Retain Mermaid for structural diagrams and data/code for quantitative charts. An AI illustration is not a quantitative conversion; verify every label and relationship against its sources.

What Mermaid can express

This skill includes 23 diagram-type guides plus a composition guide. Mermaid supports additional types; these references are a curated subset, not an exhaustive version catalogue:

Use case Diagram type File
Experimental workflow / decision logic Flowchart references/diagrams/flowchart.md
Service interactions / API calls / messaging Sequence references/diagrams/sequence.md
Data model / schema ER diagram references/diagrams/er.md
State machine / lifecycle State references/diagrams/state.md

…

常见问题

什么是 Mermaid?

Mermaid 是一种基于文本的语言,可以用来创建图表和流程图。你可以把它理解为给绘图写的一段脚本。

为什么要用文本来画图?

基于文本的图表易于编辑,可以用 Git 等版本控制系统进行追踪,人和计算机都能读懂。

能用它制作带有具体数字的科学图表吗?

Mermaid 更适合描述结构和关系。如果是包含精确数值数据的图表,最好使用专门的科学绘图工具。

详情

作者的原始描述

Writes scientific Markdown documentation and Mermaid diagrams for workflows, relationships, timelines, and schemas. Provides syntax references, document templates, accessibility guidance, and version-aware rendering checks. Use when a user requests Markdown, Mermaid, or a text-based structural diagram; quantitative scientific figures require suitable plotting tools.

repo: K-Dense-AI/scientific-agent-skills

热度

GitHub 星标
51k
排名
#3492
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能