npx skills add https://github.com/cesarszv/obsidian-skills --skill 'Infographics Mermaid.js'Mermaid.js 传统上用于绘制技术流程图,但当将其视为声明式信息图引擎时,其真正潜力才得以释放。目标不仅仅是映射一个流程,而是创建一个视觉上吸引人、高度直观的概念表示,能瞬间吸引观众。
与其问:"我如何连接节点 A 到节点 B?" 不如问:"我如何视觉化地呈现这个概念,使其感觉像一个故事或一种物理现实?"
在表示现实世界实体时,摒弃标准的通用形状(矩形、菱形)。在简单节点内使用表情符号作为核心视觉参与者,为图表赋予生命力和关联性。
((👤)) 来表示人群中的个体。一个好的图表讲述一个故事。使用连接箭头和边标签不仅是为了表示技术关系,也是为了叙述动作。
-->,不如使用带有图标的主题过渡,如 ===>|" 🎲 等概率选择 "| 来展示变化是_如何_发生的。通过明确"弱化"不相关或背景信息并突出感兴趣的主题,来引导观众的注意力。
classDef 样式:为背景上下文使用 neutral 样式(灰显、柔和颜色),为焦点使用鲜艳、醒目的样式(selected、sampled)。不要让渲染引擎随意放置节点。强制进行空间组织,以创建整洁、类似矩阵的布局,赏心悦目。
~~~)在子图中将节点结构化为精心设计的行和列。使用 subgraph 不仅仅是为了分组,更是为了表示环境、容器或状态。
rx, ry)和不同的边框(例如,虚线表示概念池,实线表示具体结果)来为子图设置样式,赋予它们物理存在感。["👥 总人口 (N=12)"]。在解释转换或提取时,保持元素的身份。
创意过程延伸到代码本身。Mermaid 代码应该和最终输出一样结构清晰、可读性强。
~~~)在其容器内构建参与者的物理布局。accTitle 和 accDescr 以阐明图形的最终意图。虽然重点是创意,但基础必须技术上可靠。始终遵守这些结构规则:
对于分层或结构化流程,使用 flowchart TD(自上而下);对于时间线、顺序步骤或叙事转换,使用 flowchart LR(从左到右)。避免全局混合方向。
始终在图表的开头包含可访问性元数据。这不仅有助于屏幕阅读器,还能提供清晰、自文档化的意图。
accTitle:图表的简明标题。accDescr:描述图表内容和目的的完整句子。classDef)如果样式被多次使用,切勿手动设置单个节点的样式。在图表的顶部使用 classDef 定义可重用的视觉主题,并使用 :::className 应用它们。
classDef highlight fill:#bbdefb,stroke:#1e88e5,stroke-width:3px为节点使用简短、字母数字且具有语义的 ID(例如,使用 Pop01、Samp01 而不是 A、B 或 node1)。这使得在代码后面定义关系变得直观,并防止"静默"节点创建错误。
当节点标签包含特殊字符、空格或复杂格式时,始终用双引号将其括起来。
NodeID["复杂标签(带括号)"]切勿使用像 end 这样的保留字作为小写节点 ID 或标签,因为它会破坏渲染引擎。如果必须使用该词,请将其大写(End)或用引号括起来("end")。
每周安装数
0
代码仓库
首次出现
1970年1月1日
Mermaid.js is traditionally used for technical flowcharts, but its true potential unlocks when treated as a declarative infographic engine. The goal is not just to map a process, but to create a visually appealing, highly intuitive representation of a concept that engages the viewer instantly.
Instead of asking: "How do I connect node A to node B?" Ask: "How can I visually represent this concept so it feels like a story or a physical reality?"
Ditch the standard generic shapes (rectangles, diamonds) when representing real-world entities. Use emojis as the core visual actors within simple nodes to give life and relatability to the diagram.
((👤)) to represent individuals in a population.A great diagram tells a story. Use connecting arrows and edge labels not just for technical relationships, but for narrative actions.
-->, use a thematic transition with an icon like ===>|" 🎲 Equiprobable Selection "| to show how the change happens.广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Guide the viewer's attention by explicitly "muting" irrelevant or background information and highlighting the subjects of interest.
classDef styles: a neutral style (grayed out, muted colors) for background context, and vibrant, bold styles (selected, sampled) for the focal points.Do not let the rendering engine throw nodes wherever it wants. Force spatial organization to create clean, matrix-like layouts that are pleasing to the eye.
~~~) to structure nodes into deliberate rows and columns within subgraphs.Use subgraph not just to group things, but to represent environments, containers, or states.
rx, ry), and distinct borders (e.g., dashed for a conceptual pool, solid for a concrete result) to give them a physical presence.["👥 Total Population (N=12)"].When explaining transformations or extractions, maintain the identity of the elements.
The creative process extends to the code itself. The Mermaid code should be as structured and readable as the final output.
~~~) to build the physical layout of the actors within their containers.accTitle and accDescr to clarify the ultimate intent of the graphic.While the focus is on creativity, the foundation must be technically sound. Always adhere to these structural rules:
Use flowchart TD (Top-Down) for hierarchical or structural processes, and flowchart LR (Left-to-Right) for timelines, sequential steps, or narrative transformations. Avoid mixing directions globally.
Always include accessibility metadata at the very beginning of the diagram. This not only helps screen readers but provides clear, self-documenting intent.
accTitle: A concise title for the diagram.accDescr: A full sentence describing the diagram's content and purpose.classDef)Never style individual nodes manually if the style is used more than once. Define reusable visual themes using classDef at the top of the diagram and apply them using :::className.
classDef highlight fill:#bbdefb,stroke:#1e88e5,stroke-width:3pxUse short, alphanumeric, and semantic IDs for nodes (e.g., Pop01, Samp01 instead of A, B, or node1). This makes defining relationships further down the code intuitive and prevents "silent" node creation errors.
When node labels contain special characters, spaces, or complex formatting, always wrap them in double quotes.
NodeID["Complex Label (with parentheses)"]Never use reserved words like end as a lowercase node ID or label, as it will break the rendering engine. If you must use the word, capitalize it (End) or wrap it in quotes ("end").
Weekly Installs
0
Repository
First Seen
Jan 1, 1970
前端设计技能指南:避免AI垃圾美学,打造独特生产级界面
36,100 周安装
竞争对手研究指南:SEO、内容、反向链接与定价分析工具
231 周安装
Azure 工作负载自动升级评估工具 - 支持 Functions、App Service 计划与 SKU 迁移
231 周安装
Kaizen持续改进方法论:软件开发中的渐进式优化与防错设计实践指南
231 周安装
软件UI/UX设计指南:以用户为中心的设计原则、WCAG可访问性与平台规范
231 周安装
Apify 网络爬虫和自动化平台 - 无需编码抓取亚马逊、谷歌、领英等网站数据
231 周安装
llama.cpp 中文指南:纯 C/C++ LLM 推理,CPU/非 NVIDIA 硬件优化部署
231 周安装