d2moderndiagramscriptinglanguageandcli
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "d2moderndiagramscriptinglanguageandcli" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-e252546486adc0c56cb007bfafcfebbe264866aba9e2cbaddb92b7c69cdd5a1b. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/d2-diagram-scripting-language-cli before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
D2 is a modern diagram scripting language that compiles declarative text into SVG, PNG, and PDF outputs. It supports automatic layout, multiple themes, and diagram types such as sequence diagrams, class diagrams, and network topologies.
Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: "D2 Modern Diagram Scripting Language and CLI"
slug: "d2-diagram-scripting-language-cli"
version: "1.0.0"
displayName: "D2 Modern Diagram Scripting Language and CLI"
summary: "D2 是一种现代的图表脚本语言,可将文本转换为图表。它将声明式文本文件编译为 SVG、PNG 和 PDF 输出,具有自动布局、多种主题以及对序列图、类图和网络拓扑的支持。"
license: "MIT"
description: "D2 是一种现代的图表脚本语言,可将文本转换为图表。它将声明式文本文件编译为 SVG、PNG 和 PDF 输出,具有自动布局、多种主题以及对序列图、类图和网络拓扑的支持。"
github_stars: 23316
verification: "security_reviewed"
source: "https://github.com/1991513ccie-png/skills"
category: "Developer Tools"
framework: "Multi-Framework"
tool_ecosystem:
github_repo: "1991513ccie-png/skills"
github_stars: 23316
npm_package: "@terrastruct/d2"
npm_weekly_downloads: 14050D2 现代图表脚本语言和 CLI
D2 是一种现代的图表脚本语言,可将文本转换为图表。它将声明式文本文件编译为 SVG、PNG 和 PDF 输出,具有自动布局、多种主题以及对序列图、类图和网络拓扑的支持。
安装
使用与您的环境匹配的上游安装或设置路径:
- go install oss.terrastruct.com/d2@latest
来自上游的要求和注意事项:
- 特别适用于具有固有方向和端口的节点链接图。
- 专门用于软件架构图。需要单独安装,请访问
- Python D2 图表构建器: [https://github.com/1991513ccie-png/skills)
基本用法或入门笔记:
-
<img width="400px" src="./docs/assets/example.svg" alt="D2 render example" />
-
使用 D2 最方便的方法就是将其作为 CLI 可执行文件运行以
-
从 .d2 文件生成 SVG。
-
Extracted from upstream docs: https://raw.githubusercontent.com/terrastruct/d2/HEAD/README.md
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- D2 作为现代图表脚本语言,为开发者和架构师提供了文本转图表的高效解决方案,具有明确的实用价值。
- 支持多种输出格式(SVG、PNG、PDF)和图表类型(序列图、类图、网络拓扑),满足多样化的图表生成需求。
Highlights
- description 字段清晰准确地描述了 D2 的核心功能和特性,触发词精准完整,边界清晰。
Areas to improve
-
缺少 When to Use/示例章节 Reported severity: Minor
文档缺少明确的 'When to Use' 使用场景说明和具体的端到端示例(如 .d2 文件内容和生成命令)。
Recommendation: 建议补充 'When to Use' 章节,说明 D2 的典型使用场景和优势。同时,提供一个完整的端到端示例,包括一个简单的 .d2 文件内容和相应的生成命令,以帮助用户快速上手。
-
文档结构可优化 Reported severity: Minor
主体部分有章节划分,但缺少明确的 Phase/步骤划分和出口条件,流程不够清晰。
Recommendation: 建议将安装和使用的流程划分为更清晰的步骤(Phase),并为每个步骤提供明确的出口条件或下一步指引,提升文档的可读性和指导性。
Highlights
- frontmatter 信息完整,包含了 Skill 的基本信息、来源、分类和工具生态等关键元数据。
Areas to improve
-
主要异常未处理 Reported severity: Major
安装和使用流程中未覆盖主要异常情况,如安装失败、依赖缺失、不同操作系统差异等。
Recommendation: 建议补充常见问题的排查指南,例如安装失败时的解决方案、不同操作系统的安装注意事项、依赖项检查等,以提高 Skill 的鲁棒性。
Highlights
- 提供了明确的安装命令 (go install) 和上游要求,工具来源清晰可靠。
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
- raw.githubusercontent.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.