- Home
- Skills
- Technical Documentation
- D2 Diagrams
More screenshots
Works with the AI Agents you already use
D2 Diagrams
Ask for a diagram and get a clean SVG that the agent has already checked and fixed.
$5
D2 Diagrams
Example session with this skill installed
Draw the architecture for our checkout. Customers come in through a CDN and a WAF to an API gateway, which calls the auth and orders services. Orders writes to Postgres, caches in Redis and publishes to Kafka. Billing consumes those events and charges Stripe. Save it in diagrams/.
- Read your context and instructions
- Compiled the d2 diagrams
Done. The diagram is at diagrams/checkout.svg, and the editable source is next to it at diagrams/checkout.d2.
Engine: ELK (TALA isn't installed on this machine, so there's no watermark to worry about).
Self-check: I opened the PNG preview and checked it before handing it over. The edges don't cross, every label is readable at README width, and the three containers (Edge, Application, Data Layer) don't overlap. Stripe is dashed and greyed out as an external service, and the charge edge is animated.
direction: right
# larger type so the diagram stays legible scaled down in the README
**.style.font-size: 24
(** -> **)[*].style.font-size: 18
classes: {
svc: {style: {border-radius: 8; shadow: true}}
ext: {style: {stroke-dash: 3; font-color: "#666666"}}
}
user: Customer {shape: person}
edge: Edge {
cdn: CDN
waf: WAF
}
app: Application {
api: API Gateway {class: svc}
auth: Auth {class: svc}
orders: Orders {class: svc}
}
data: Data Layer {
pg: PostgreSQL {shape: cylinder}
cache: Redis {shape: cylinder}
bus: Kafka {shape: queue}
}
billing: Billing {class: svc}
stripe: Stripe {class: ext}
user -> edge.cdn: HTTPS
edge.cdn -> edge.waf
edge.waf -> app.api
app.api -> app.auth: JWT
app.api -> app.orders: REST
app.orders -> data.pg: SQL
app.orders -> data.cache: cache
app.orders -> data.bus: publish
data.bus -> billing: consume
billing -> stripe: charge {style.animated: true}
Next steps
- If this is going in a GitHub README, I can re-render it with
--dark-theme 200so it follows the reader's light or dark mode. - If you have a TALA licence, I can re-render with it for tighter packing inside the containers.
- To change it, edit
checkout.d2and ask me to re-render; I'll run the same check again.
Connects securely to your tools. The creator never sees your data.
About this skill
Ask your agent for a diagram and it writes D2 source, renders it to SVG, then looks at its own render and fixes overlaps, crossed edges and cramped labels before handing it over. You get the SVG plus the .d2 source, so the diagram stays editable.
What it draws
- Architecture and system diagrams
- Flowcharts and state machines
- Sequence diagrams
- Database schemas (ERDs)
- Network and cloud topologies, and C4
How it works
- Toolchain check. Confirms the d2 CLI is installed and works out which layout engine you have. If d2 is missing, it installs it through Homebrew when you have Homebrew, and otherwise prints the install command for you to run.
- Write the source. Picks the right diagram type and structure from its pattern guide.
- Render. Uses TALA when you have a licence and ELK otherwise. It never ships a watermarked render.
- Check and repair. Renders a PNG preview, inspects it, and fixes what it finds. It repeats until the diagram is clean.
- Deliver. Gives you the SVG and the source, and offers a dark-mode version for GitHub READMEs.
What's in the package
SKILL.mdwith the full workflowscripts/setup.shandscripts/render.shfor the toolchain check and rendering- Three reference files: D2 syntax and the mistakes that compile but render wrong, layout engines, and diagram patterns
Requirements
The d2 CLI, version 0.7.0 or later (free and open source). TALA is optional and licensed separately by Terrastruct. The PNG self-check downloads a headless browser the first time it runs.
Not for data charts such as bar, line or scatter plots.
Needs the d2 CLI, version 0.7.0 or later. Not for data charts such as bar, line or scatter plots. The PNG self-check downloads a headless browser the first time it runs. TALA is optional and needs its own licence from Terrastruct; without it the skill uses ELK.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 28 days ago
Requires
Permissions
Allowed Hosts
Terminal runs the setup and render scripts. Read and Write Files cover the .d2 source, the SVG and the PNG preview. Network access is only for installing d2 through Homebrew when it's missing, the one-time headless browser download for previews, and any icon URLs you put in a diagram; you can block those icon fetches with --no-remote-assets.