
Creating Mermaid Dbt Dag
This one walks through a smart fallback chain to visualize your dbt DAG as a Mermaid diagram. It'll try MCP tools first for the most accurate lineage, then fall back to parsing manifest.json if available, and finally resort to direct code parsing if needed. The color coding is thoughtful: sources are blue, staging bronze, marts gold, tests yellow, with the focal model highlighted in purple. One nice touch is that it explicitly treats all parsed content as untrusted, which matters when you're pulling data from SQL comments and YAML files that could contain weird stuff. Most useful when you need to explain dependencies to your team or debug why a model isn't rebuilding when you expect it to.
- skills.sh installs
- 530
- GitHub stars
- 759
- last updated
- May 19, 2026
Install
$ npx -y skills add dbt-labs/dbt-agent-skills --skill creating-mermaid-dbt-dag --agent claude-codeInstalls into .claude/skills of the current project.
Files
Create Mermaid Diagram in Markdown from dbt DAG
How to use this skill
Step 1: Determine the model name
- If name is provided, use that name
- If user is focused on a file, use that name
- If you don't know the model name: ask immediately — prompt the user to specify it
- If the user needs to know what models are available, query the list of models
- Ask the user if they want to include tests in the diagram (if not specified)
Step 2: Fetch the dbt model lineage (hierarchical approach)
Follow this hierarchy. Use the first available method:
-
Primary: Use get_lineage_dev MCP tool (if available)
- See using-get-lineage-dev.md for detailed instructions
- Preferred method — provides most accurate local lineage. If the user asks specifically for production lineage, this may not be suitable.
-
Fallback 1: Use get_lineage MCP tool (if get_lineage_dev not available)
- See using-get-lineage.md for detailed instructions
- Provides production lineage from dbt Cloud. If the user asks specifically for local lineage, this may not be suitable.
Sponsors
Details
- Repository
- github.com/dbt-labs/dbt-agent-skills
- Categories
- Code Review & Quality, AI & Agent Building, Automation & Workflows
- License
- Apache-2.0
- First seen
- Jun 11, 2026
More from dbt-labs/dbt-agent-skills
All 13- Migrating Dbt Project Across Platforms528
- Migrating Dbt Core To Fusion385
- Auditing Skills
- Using Dbt For Analytics Engineering1.2K
- Fetching Dbt Docs1.1K
- Adding Dbt Unit Test1.1K
- Running Dbt Commands1.1K
- Answering Natural Language Questions With Dbt1.1K
- Configuring Dbt Mcp Server1.1K
- Building Dbt Semantic Layer1K
- Troubleshooting Dbt Job Errors1K
- Working With Dbt Mesh892