dbt-doctor

作者 Astoriel已验证

AI-driven quality & governance MCP Server for dbt projects. Audit coverage, profile data, detect schema drift, and auto-generate documentation — all through natural language with your AI assistant.

132
Stars
4
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/Astoriel/dbt-doctor

快速入门

使用 dbt-doctor 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

dbt-doctor logo

AI-driven quality and governance MCP Server for dbt projects.

Audit coverage, profile data, detect schema drift, and auto-generate documentation—all through natural language with an AI assistant.

CI PyPI version Python 3.10+ MIT License


Project status

Active alpha. Snapshot date: 2025-12-25. See STATUS.md and KNOWN_LIMITATIONS.md for what is working today, what is planned, and what is not claimed.

What is dbt-doctor?

dbt-doctor is a Model Context Protocol (MCP) server that provides your AI coding assistant with deep context regarding your dbt project's health. Instead of manually running CLI commands and analyzing outputs, you can interact with your AI:

  • "What's the overall health of my dbt project?"
  • "Profile the fct_orders model and suggest appropriate tests."
  • "Auto-document the models that have the lowest test coverage."

The tool handles the heavy operations—reading the manifest, profiling your data warehouse, detecting schema drift, and writing back to schema.yml files—without requiring you to leave the chat.

Note: This tool is designed to complement the official dbt-labs/dbt-mcp. While dbt-labs/dbt-mcp focuses on running dbt commands, dbt-doctor focuses on auditing, profiling, and documentation.

Key Features

Project Auditing

Evaluate your project with a 0–100% score based on documentation, testing, and naming conventions. Access a ranked list of models lacking coverage to prioritize your efforts.

Data Profiling

Perform efficient single-pass column statistics—including NULL rates, cardinality, min/max values, and uniqueness—using one batched SQL query per table to avoid slow row-by-row scanning.

Schema Drift Detection

Compare the current state of your data warehouse against the definitions in your manifest.json. Instantly identify added, removed, or type-changed columns.

Intelligent Test Suggestions

Translate profiling statistics into actionable dbt test recommendations. For example, a uniquely populated column without nulls will prompt suggestions for not_null and unique tests, while low cardinality will suggest accepted_values with predefined options.

Non-Destructive YAML Writing

Update schema.yml files using ruamel.yaml to retain hand-written comments, existing tests, and formatting. The tool only appends missing information and preserves your manual configurations.

End-to-End Documentation Generation

Execute a complete workflow in a single conversational turn: profile a model, suggest tests, preview changes, and write to schema.yml.


Included MCP Tools

CategoryToolDescription
Contextlist_modelsOverview of all models and their coverage status
Contextget_model_detailsDetailed model information including SQL, columns, lineage, and tests
Auditaudit_projectProject health score and naming convention violations
Auditcheck_test_coverageModels ranked by their test coverage percentage
Auditanalyze_dagDetection of orphan models and high fan-out nodes
Auditget_project_healthSingle-call dashboard summarizing project status
Profilingprofile_modelBatched column statistics
Profilingexecute_queryRead-only SQL execution against your warehouse
Profilingdetect_schema_driftComparison of database columns against manifest definitions
Generationsuggest_testsTranslation of profile data into dbt test recommendations
Generationupdate_model_yamlSafe merging of documentation and tests to schema.yml
Generationgenerate_model_docsComplete end-to-end documentation workflow

Quick Start

Installation

pip install dbt-doctor

Configuration (Claude Desktop)

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "dbt-doctor": {
      "command": "dbt-doctor",
      "args": ["--project-dir", "/absolute/path/to/your/dbt/project"]
    }
  }
}

Configuration (Cursor)

Add the following to your .cursor/mcp.json:

{
  "mcpServers": {
    "dbt-doctor": {
      "command": "dbt-doctor",
      "args": ["--project-dir", "/absolute/path/to/your/dbt/project"]
    }
  }
}

Prerequisite: Run dbt compile prior to usage to ensure target/manifest.json is available for dbt-doctor to parse.


Architecture

dbt-doctor architecture

The application connects the AI Assistant with your dbt project and database through the MCP protocol. It features a read-only analysis layer combined with a secure generation toolkit that merges changes seamlessly into your existing YAML schemas.


Security Design

  • Read-only execution: All execute_query operations operate within a read-only transaction. Write processes are restricted at the database connector level.
  • SQL validation: Table and column identifiers are strictly validated against a whitelist to prevent injection.
  • Stateless connections: Data warehouse credentials are instantiated per connection and are never cached in memory.
  • Preview before commit: The document generation process provides a difference preview prior to rewriting schema.yml, ensuring you retain control over modifications.

Related Projects

ProjectDescription
dbt-labs/dbt-mcpOfficial MCP focused on dbt command execution
dbt-coverageCLI tool for coverage reporting without AI integration
dbt-project-evaluatordbt package for project evaluation, requiring installation per project

dbt-doctor uniquely consolidates auditing, profiling, drift detection, and AI-driven YAML updates into a single server interface.


License

MIT — see the LICENSE file.

常见问题

What is dbt-doctor?

dbt-doctor is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Astoriel. AI-driven quality & governance MCP Server for dbt projects. Audit coverage, profile data, detect schema drift, and auto-generate documentation — all through natural language with your AI assistant. It has 132 GitHub stars.

Is dbt-doctor safe to use?

Yes. dbt-doctor passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install dbt-doctor?

Clone the repository with "git clone https://github.com/Astoriel/dbt-doctor" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is dbt-doctor written in?

dbt-doctor is primarily written in Python. It is open-source under Astoriel on GitHub, so you can review or fork the full source.

Are there alternatives to dbt-doctor?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh dbt-doctor against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情