Dbt Project Analyzer

by a5c-ai

skill

Analyzes dbt projects for best practices, performance, maintainability, and generates actionable recommendations for improvement.

Skill Details

Repository Files

2 files in this skill directory


name: dbt-project-analyzer description: Analyzes dbt projects for best practices, performance, maintainability, and generates actionable recommendations for improvement. version: 1.0.0 category: Transformation skill-id: SK-DEA-003 allowed-tools: Read, Grep, Glob, Bash, WebFetch

dbt Project Analyzer

Analyzes dbt projects for best practices, performance, and maintainability following dbt Labs recommended patterns.

Overview

This skill examines dbt project structure, model dependencies, test coverage, documentation completeness, and adherence to naming conventions. It provides actionable recommendations for improving project health and maintainability.

Capabilities

  • Model dependency graph analysis - Visualize and analyze model relationships, detect circular dependencies
  • Incremental model optimization - Evaluate incremental strategies and suggest improvements
  • Materialization strategy recommendations - Recommend optimal materializations based on usage patterns
  • Test coverage analysis - Measure and report on test coverage across models
  • Documentation completeness check - Identify undocumented models, columns, and sources
  • Naming convention validation - Enforce consistent naming patterns (staging, marts, intermediate)
  • Ref/source usage validation - Detect hardcoded references and missing source definitions
  • Macro efficiency analysis - Evaluate macro usage and suggest optimizations
  • Slim CI optimization - Configure efficient CI builds with state comparison
  • Model contract validation - Verify model contracts for type safety

Input Schema

{
  "projectPath": {
    "type": "string",
    "description": "Path to the dbt project root directory",
    "required": true
  },
  "manifestJson": {
    "type": "object",
    "description": "Parsed manifest.json from target/ directory (optional, will be loaded if not provided)"
  },
  "catalogJson": {
    "type": "object",
    "description": "Parsed catalog.json from target/ directory (optional)"
  },
  "runResults": {
    "type": "object",
    "description": "Parsed run_results.json for performance analysis (optional)"
  },
  "analysisDepth": {
    "type": "string",
    "enum": ["quick", "standard", "deep"],
    "default": "standard",
    "description": "Depth of analysis to perform"
  },
  "focusAreas": {
    "type": "array",
    "items": {
      "type": "string",
      "enum": ["performance", "testing", "documentation", "naming", "incremental", "dependencies"]
    },
    "description": "Specific areas to focus analysis on (all if not specified)"
  }
}

Output Schema

{
  "healthScore": {
    "type": "number",
    "description": "Overall project health score (0-100)"
  },
  "issues": {
    "type": "array",
    "items": {
      "severity": "error|warning|info",
      "category": "string",
      "model": "string",
      "message": "string",
      "recommendation": "string",
      "line": "number"
    }
  },
  "metrics": {
    "testCoverage": {
      "type": "number",
      "description": "Percentage of models with tests"
    },
    "docCoverage": {
      "type": "number",
      "description": "Percentage of models/columns documented"
    },
    "incrementalRatio": {
      "type": "number",
      "description": "Percentage of eligible models using incremental"
    },
    "avgModelDepth": {
      "type": "number",
      "description": "Average depth in DAG"
    },
    "totalModels": {
      "type": "number"
    },
    "totalTests": {
      "type": "number"
    }
  },
  "recommendations": {
    "type": "array",
    "items": {
      "priority": "high|medium|low",
      "category": "string",
      "description": "string",
      "effort": "string",
      "impact": "string"
    }
  },
  "dependencyGraph": {
    "type": "object",
    "description": "Simplified dependency graph for visualization"
  }
}

Usage Examples

Basic Project Analysis

# Invoke skill for standard analysis
/skill dbt-project-analyzer --projectPath ./my-dbt-project

Deep Analysis with Focus Areas

{
  "projectPath": "./analytics",
  "analysisDepth": "deep",
  "focusAreas": ["performance", "testing", "incremental"]
}

CI Integration Analysis

{
  "projectPath": "./dbt_project",
  "manifestJson": "./target/manifest.json",
  "runResults": "./target/run_results.json",
  "focusAreas": ["performance"]
}

Analysis Rules

Naming Conventions

Layer Pattern Example
Staging stg_<source>__<entity> stg_stripe__payments
Intermediate int_<entity>_<verb> int_payments_pivoted
Marts fct_<entity> or dim_<entity> fct_orders, dim_customers

Test Coverage Requirements

Severity Condition
Error No unique/not_null test on primary key
Warning < 50% columns have tests
Info Missing relationship tests

Materialization Guidelines

Model Type Recommended Reason
Staging View or Ephemeral Source transformations, low compute
Intermediate Ephemeral Reduce warehouse clutter
Marts Table or Incremental End-user queries, performance
Large tables (>1M rows) Incremental Reduce build time

Integration Points

MCP Server Integration

This skill integrates with the official dbt MCP server for enhanced capabilities:

  • dbt-labs/dbt-mcp - Project metadata discovery, model information, semantic layer querying
  • dbt Remote MCP Server - Cloud-hosted dbt MCP with secure endpoint access

Applicable Processes

  • dbt Project Setup (dbt-project-setup.js)
  • dbt Model Development (dbt-model-development.js)
  • Metrics Layer (metrics-layer.js)
  • Incremental Model Setup (incremental-model.js)

References

Version History

  • 1.0.0 - Initial release with core analysis capabilities

Related Skills

Attack Tree Construction

Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.

skill

Grafana Dashboards

Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.

skill

Matplotlib

Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.

skill

Scientific Visualization

Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.

skill

Seaborn

Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.

skill

Shap

Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model

skill

Pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

skill

Query Writing

For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations

skill

Pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

skill

Scientific Visualization

Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.

skill

Skill Information

Category:Skill
Version:1.0.0
Allowed Tools:Read, Grep, Glob, Bash, WebFetch
Last Updated:1/24/2026