/wire:dbt-dagfrom wire
Generates Mermaid flowchart diagrams of dbt model lineage. Auto-activates when asked to visualize dbt dependencies, create a DAG diagram, or show upstream/downstream model connections.
Ships in wire. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before proceeding, append a one-line entry to .wire/execution_log.md:
| YYYY-MM-DD HH:MMZ | skill | dbt-dag | dbt DAG analysis or lineage work triggered this skill | <by> | <session> | n/a | n/a | n/a |
If .wire/execution_log.md does not exist, create it with the standard header first (see specs/utils/execution_log.md). If no .wire/ directory exists in the current repo, skip this step.
Generate a Mermaid graph LR diagram of dbt model lineage for a given model or set of models. The diagram is returned as fenced markdown that renders in GitHub, Notion, and other Markdown renderers.
wh_sales__order_fact"Keywords: "lineage", "dbt DAG", "dependency diagram", "model dependencies", "upstream", "downstream", "Mermaid dbt", "dbt graph", "visualise models"
Activate when a user asks about how models connect, what a model depends on, or what would be affected by changing a model.
.sql file, use that model namewh_sales__order_fact)"Use the first available method:
get_lineage_dev MCP tool (preferred)Best for local development lineage. Returns the current local state of the project.
mcp__dbt__get_lineage_dev(model_name="wh_sales__order_fact")
get_lineage MCP toolFalls back to production lineage from dbt Cloud if get_lineage_dev is unavailable.
mcp__dbt__get_lineage(model_name="wh_sales__order_fact")
target/manifest.jsonWhen no MCP tools are available. Check file size first — if > 10 MB, skip to Method D.
# Get upstream dependencies for a model
jq --arg model "model.PROJECT.wh_sales__order_fact" '
.nodes[$model] |
{name: .name, depends_on: .depends_on.nodes}
' target/manifest.json
# Get downstream dependents
jq --arg model "model.PROJECT.wh_sales__order_fact" '
.nodes | to_entries |
map(select(.value.depends_on.nodes | index($model))) |
map(.value.name)
' target/manifest.json
Read the model's .sql file and trace ref() calls up the dependency tree. This is best-effort and may miss indirect dependencies — note any limitations in the diagram.
Use graph LR (left to right). Colour nodes by type:
| Node type | Wire naming pattern | Fill colour | Text colour |
|---|---|---|---|
| Selected model | (the requested model) | #7c3aed (purple) | #ffffff |
| Sources | source(...) calls | #3b82f6 (blue) | #ffffff |
| Staging | stg_ prefix | #b45309 (bronze) | #ffffff |
| Integration | int_ prefix | #9ca3af (silver) | #111827 |
| Marts / facts / dims | _fact / _dim suffix | #d97706 (gold) | #111827 |
| Seeds | .csv seed files | #16a34a (green) | #ffffff |
| Exposures | Looker dashboards, etc. | #ea580c (orange) | #ffffff |
| Tests | Unit/schema tests | #ca8a04 (yellow) | #111827 |
| Other / unknown | Everything else | #6b7280 (grey) | #ffffff |
```mermaid
graph LR
src_salesforce["📥 salesforce\n(source)"]:::source
stg_salesforce__accounts["stg_salesforce__accounts"]:::staging
stg_salesforce__opportunities["stg_salesforce__opportunities"]:::staging
int_core__account["int_core__account"]:::integration
wh_sales__order_fact["⭐ wh_sales__order_fact\n(selected)"]:::selected
wh_core__customer_dim["wh_core__customer_dim"]:::mart
src_salesforce --> stg_salesforce__accounts
src_salesforce --> stg_salesforce__opportunities
stg_salesforce__accounts --> int_core__account
stg_salesforce__opportunities --> int_core__account
int_core__account --> wh_sales__order_fact
int_core__account --> wh_core__customer_dim
classDef selected fill:#7c3aed,color:#ffffff,stroke:#5b21b6
classDef source fill:#3b82f6,color:#ffffff,stroke:#2563eb
classDef staging fill:#b45309,color:#ffffff,stroke:#92400e
classDef integration fill:#9ca3af,color:#111827,stroke:#6b7280
classDef mart fill:#d97706,color:#111827,stroke:#b45309
classDef seed fill:#16a34a,color:#ffffff,stroke:#15803d
classDef exposure fill:#ea580c,color:#ffffff,stroke:#c2410c
```
**Legend**: 🟣 Selected 🔵 Source 🟤 Staging ⬜ Integration 🟡 Mart/Fact/Dim 🟢 Seed 🟠 Exposure
```
mermaid code blockstg_<source>__<entity> → int_<group>__<entity> → wh_<group>__<entity>_fact / wh_<group>__<entity>_dim. The diagram should reflect this layered flow./wire:conceptual_model-generate: the conceptual model command also produces a Mermaid entity diagram. This skill produces a lineage diagram (model dependencies), which is different from an entity-relationship diagram.Adapted from https://github.com/dbt-labs/dbt-agent-skills (Apache-2.0). Modified by Rittman Analytics Ltd. See NOTICE.md and LICENSE.txt in this folder.
What SKILL.md sets; muted values are Claude Code's defaults
74 skills in this plugin
/add-analytics-instrumentationEnd-to-end analytics instrumentation workflow for a PR, branch, file, directory, or feature. Reads the code, discovers what events should be tracked, and produces a concrete instrumentation plan — all in one shot. Use this skill whenever a user wants to add analytics to a PR, asks "instrument this PR", "add tracking to this branch", "what analytics does this file need", "instrument the checkout flow", "run the full instrumentation workflow", or any request that implies going from code changes to a tracking plan. Also trigger when the user gives you a PR link, branch name, file path, or feature description and mentions analytics, events, or instrumentation. This is the main entry point for the analytics workflow — prefer it over calling the individual steps (diff-intake, discover-event-surfaces, instrument-events) separately.
/agents-schemaPublish and read warehouse metadata through dbt Labs' Agents Schema (the AGENTS schema inside Snowflake, Databricks or BigQuery, written by the agents-schema CLI from a dbt manifest, LookML, Omni, OSI, Sigma and markdown skills). Activates when the user mentions Agents Schema, agents_schema, AGENTS.ROOT, the agents-schema CLI or its GitHub workflows, warehouse-delivered skills, or asks how an AI agent should find governed context for a warehouse. Used by /wire:agents_schema-generate, -validate and -review, and for ad-hoc work against an AGENTS schema.npx claudepluginhub rittmananalytics/wire-plugin --plugin wire