lineage-analyzer

Map dbt model dependencies and detect circular references from SQL files or manifest.json.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/jwest33/claude_code_plugin_dbt_snowflake_specialist --skill lineage-analyzer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lineage-analyzer
Source: https://github.com/jwest33/claude_code_plugin_dbt_snowflake_specialist/tree/main/skills/lineage-analyzer
Command: npx skills add https://github.com/jwest33/claude_code_plugin_dbt_snowflake_specialist --skill lineage-analyzer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps data teams understand data lineage by analyzing dbt dependencies, tracing upstream sources and downstream consumers, and identifying circular dependencies. It saves time during impact analysis and debugging.

Core Features & Use Cases

  • Dependency discovery via refs and sources
  • Lineage graphs in tree, detailed, or mermaid formats
  • Circular dependency detection and impact analysis

Quick Start

Run the lineage analyzer on a model, for example fct_orders, by scanning models/ and manifest.json when available. Output formats include tree, detailed, and Mermaid diagrams. For example: "Show me the lineage for fct_orders".

Frequently Asked Questions about lineage-analyzer

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

FAQPage Schema
How do I trace dbt model dependencies and understand data lineage?

Lineage analysis traces upstream sources and downstream consumers in dbt projects by parsing {{ ref }} and {{ source }} references from SQL files or manifest.json. The analyzer builds a bidirectional dependency graph to reveal complete data lineage, showing which models feed into others and where data originates.

Can I detect circular dependencies in my dbt project?

Yes. The analyzer identifies circular dependencies—cases where models reference each other in cycles—by applying cycle detection to the constructed dependency graph. This catches configuration errors that would otherwise fail silently during dbt runs.

What output formats does dbt lineage analysis support?

Lineage output is available in three formats: tree view for hierarchical structure, detailed format for complete relationship information, and Mermaid diagrams for visual graph representation. Choose the format that best fits your impact analysis or debugging workflow.

How does lineage analysis help with dbt impact analysis?

By mapping upstream and downstream relationships, impact analysis shows which models depend on a changed source or intermediate model. This reveals the blast radius of schema or logic changes before deployment, reducing debugging time and unintended downstream breakage.

Do I need a manifest.json file to run lineage analysis?

No. The analyzer scans the models/ directory and parses {{ ref }} and {{ source }} references directly from SQL files. manifest.json is optional and used when available to enhance dependency resolution, but the core lineage trace works without it.

What's the best way to visualize dbt dependencies across a large project?

Mermaid diagram output scales well for visual inspection of dependency graphs, showing the complete flow from sources through transformations to fact tables. Tree and detailed formats work better for programmatic analysis or drilling into specific lineage paths.