智能体工作流

creating-mermaid-dbt-dag

dbt-labs/dbt-ag…t-skills

Generates a Mermaid flowchart diagram of dbt model lineage using MCP tools, manifest.json, or direct code parsing as fallbacks. Use when visualizing dbt model lineage and dependencies as a Mermaid diagram in markdown format.

  • 529 次安装
  • 747 星标
  • 收录于

安装命令

npx skills add https://github.com/dbt-labs/dbt-agent-skills --skill creating-mermaid-dbt-dag

SKILL.md

Create Mermaid Diagram in Markdown from dbt DAG

How to use this skill

Step 1: Determine the model name

  1. If name is provided, use that name
  2. If user is focused on a file, use that name
  3. 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
  4. 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:

  1. 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.