d2-config

Manage D2 diagram settings and verify the configuration via a menu.

56|5|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/diegomarino/claude-toolshed --skill d2-config
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: d2-config
Source: https://github.com/diegomarino/claude-toolshed/tree/main/plugins/d2/skills/d2-config
Command: npx skills add https://github.com/diegomarino/claude-toolshed --skill d2-config

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the management of D2 diagram configurations, allowing users to easily adjust settings like themes, layout engines, and output formats, or to perform a health check of the D2 plugin's dependencies.

Core Features & Use Cases

  • Interactive Configuration: Modify D2 settings through a user-friendly menu.
  • Dependency Health Check: Verify that D2 and its rendering dependencies (like Playwright for PNG) are correctly installed and functional.
  • Use Case: You want to change the default theme of your D2 diagrams to a darker palette and ensure that PNG rendering is set up correctly before generating a batch of diagrams.

Quick Start

Run the d2-config skill to view and change the current D2 plugin settings.

Frequently Asked Questions about d2-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I change the default theme and layout engine for D2 diagrams?

To change the default theme and layout engine for D2 diagrams, run the interactive configuration menu to adjust settings and store them in the `.claude/d2.json` file. This allows you to modify themes, layout engines, sketch mode, and output formats quickly.

Why does PNG rendering fail when exporting D2 diagrams?

PNG rendering fails when exporting D2 diagrams if rendering dependencies like Playwright are missing or incorrectly installed. Run a health check to verify the D2 binary, rendering capabilities, and PNG support to identify and resolve missing dependencies.

Can I verify if D2 and its rendering dependencies are installed correctly?

Yes, you can verify if D2 and its rendering dependencies are installed correctly by running a health check. This diagnostic evaluates the D2 binary, checks rendering capabilities, and confirms whether PNG support through Playwright is functional.

What is the best way to manage D2 diagram configuration settings across projects?

The best way to manage D2 diagram configuration settings across projects is using an interactive menu to adjust themes and output formats. The configurations are stored centrally in a `.claude/d2.json` file, ensuring consistent diagram generation settings.

Does D2 configuration support sketch mode and different output formats?

D2 configuration supports sketch mode and different output formats. You can enable sketch mode and specify your desired output format directly through the interactive configuration menu, with all preferences saved to the `.claude/d2.json` file.

Do I need Playwright installed to use PNG output in D2?

Yes, you need Playwright installed to use PNG output in D2. Playwright is a required rendering dependency for PNG support; you can run a health check to confirm it is correctly installed and functional before generating diagrams.