{"id":"1cb1a827-8ea4-4d0a-ae7e-5520ab4aa9c9","shortId":"f3NTWx","kind":"skill","title":"D2 Modern Diagram Scripting Language and CLI","tagline":"D2 is a modern diagram scripting language that turns text into diagrams. It compiles declarative text files into SVG, PNG, and PDF outputs with automatic layout, multiple themes, and support for sequence diagrams, class diagrams, and network topologies.","description":"# D2 Modern Diagram Scripting Language and CLI\n\nD2 is a modern diagram scripting language that turns text into diagrams. It compiles declarative text files into SVG, PNG, and PDF outputs with automatic layout, multiple themes, and support for sequence diagrams, class diagrams, and network topologies.\n\n## Installation\n\nUse the upstream install or setup path that matches your environment:\n- go install oss.terrastruct.com/d2@latest\n\nRequirements and caveats from upstream:\n- particularly suited for node-link diagrams with an inherent direction and ports.\n- specifically for software architecture diagrams. Requires separate install, visit the\n- **Python D2 diagram builder**: [https://github.com/MrBlenny/py-d2](https://github.com/MrBlenny/py-d2)\n\nBasic usage or getting-started notes:\n- <img width=\"400px\" src=\"./docs/assets/example.svg\" alt=\"D2 render example\" />\n- The most convenient way to use D2 is to just run it as a CLI executable to\n- produce SVGs from .d2 files.\n\n- Source: https://github.com/terrastruct/d2\n- Extracted from upstream docs: https://raw.githubusercontent.com/terrastruct/d2/HEAD/README.md\n\n## Source\n\n- [Agent Skill Exchange](https://agentskillexchange.com/skills/d2-diagram-scripting-language-cli/)","tags":["diagram","scripting","language","cli","skills","agentskillexchange","agent-skills","ai-agents","ai-tools","awesome-list","claude-code","codex"],"capabilities":["skill","source-agentskillexchange","skill-d2-diagram-scripting-language-cli","topic-agent-skills","topic-ai-agents","topic-ai-tools","topic-awesome-list","topic-claude-code","topic-codex","topic-cursor","topic-llm","topic-mcp","topic-npx-skills","topic-openclaw","topic-skills-catalog"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/agentskillexchange/skills/d2-diagram-scripting-language-cli","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add agentskillexchange/skills","source_repo":"https://github.com/agentskillexchange/skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,227 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:10:01.906Z","embedding":null,"createdAt":"2026-05-18T13:15:59.109Z","updatedAt":"2026-05-18T19:10:01.906Z","lastSeenAt":"2026-05-18T19:10:01.906Z","tsv":"'/d2@latest':107 '/mrblenny/py-d2](https://github.com/mrblenny/py-d2)':142 '/skills/d2-diagram-scripting-language-cli/)':189 '/terrastruct/d2':175 '/terrastruct/d2/head/readme.md':182 'agent':184 'agentskillexchange.com':188 'agentskillexchange.com/skills/d2-diagram-scripting-language-cli/)':187 'architectur':129 'automat':32,77 'basic':143 'builder':139 'caveat':110 'class':41,86 'cli':7,52,164 'compil':21,66 'conveni':152 'd2':1,8,46,53,137,156,170 'declar':22,67 'diagram':3,12,19,40,42,48,57,64,85,87,119,130,138 'direct':123 'doc':179 'environ':102 'exchang':186 'execut':165 'extract':176 'file':24,69,171 'get':147 'getting-start':146 'github.com':141,174 'github.com/mrblenny/py-d2](https://github.com/mrblenny/py-d2)':140 'github.com/terrastruct/d2':173 'go':103 'inher':122 'instal':91,95,104,133 'languag':5,14,50,59 'layout':33,78 'link':118 'match':100 'modern':2,11,47,56 'multipl':34,79 'network':44,89 'node':117 'node-link':116 'note':149 'oss.terrastruct.com':106 'oss.terrastruct.com/d2@latest':105 'output':30,75 'particular':113 'path':98 'pdf':29,74 'png':27,72 'port':125 'produc':167 'python':136 'raw.githubusercontent.com':181 'raw.githubusercontent.com/terrastruct/d2/head/readme.md':180 'requir':108,131 'run':160 'script':4,13,49,58 'separ':132 'sequenc':39,84 'setup':97 'skill':185 'skill-d2-diagram-scripting-language-cli' 'softwar':128 'sourc':172,183 'source-agentskillexchange' 'specif':126 'start':148 'suit':114 'support':37,82 'svg':26,71 'svgs':168 'text':17,23,62,68 'theme':35,80 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-tools' 'topic-awesome-list' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-llm' 'topic-mcp' 'topic-npx-skills' 'topic-openclaw' 'topic-skills-catalog' 'topolog':45,90 'turn':16,61 'upstream':94,112,178 'usag':144 'use':92,155 'visit':134 'way':153","prices":[{"id":"0f6d9ecf-1f3f-4efe-bf78-e831389e9e69","listingId":"1cb1a827-8ea4-4d0a-ae7e-5520ab4aa9c9","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"agentskillexchange","category":"skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:15:59.109Z"}],"sources":[{"listingId":"1cb1a827-8ea4-4d0a-ae7e-5520ab4aa9c9","source":"github","sourceId":"agentskillexchange/skills/d2-diagram-scripting-language-cli","sourceUrl":"https://github.com/agentskillexchange/skills/tree/main/skills/d2-diagram-scripting-language-cli","isPrimary":false,"firstSeenAt":"2026-05-18T13:15:59.109Z","lastSeenAt":"2026-05-18T19:10:01.906Z"}],"details":{"listingId":"1cb1a827-8ea4-4d0a-ae7e-5520ab4aa9c9","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"agentskillexchange","slug":"d2-diagram-scripting-language-cli","github":{"repo":"agentskillexchange/skills","stars":8,"topics":["agent-skills","ai-agents","ai-tools","awesome-list","claude-code","codex","cursor","llm","mcp","npx-skills","openclaw","skills-catalog"],"license":"mit","html_url":"https://github.com/agentskillexchange/skills","pushed_at":"2026-05-18T19:02:17Z","description":"The open catalog of AI agent skills — 2,000+ security-scanned skills for Claude Code, Cursor, Codex, and more.","skill_md_sha":"27e8ec7d411f2f3247961341248942efdbf78def","skill_md_path":"skills/d2-diagram-scripting-language-cli/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/agentskillexchange/skills/tree/main/skills/d2-diagram-scripting-language-cli"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"D2 Modern Diagram Scripting Language and CLI","description":"D2 is a modern diagram scripting language that turns text into diagrams. It compiles declarative text files into SVG, PNG, and PDF outputs with automatic layout, multiple themes, and support for sequence diagrams, class diagrams, and network topologies."},"skills_sh_url":"https://skills.sh/agentskillexchange/skills/d2-diagram-scripting-language-cli"},"updatedAt":"2026-05-18T19:10:01.906Z"}}