fetching-dbt-docs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Fetch dbt Docs

获取dbt文档

Overview

概述

dbt docs have LLM-friendly URLs. Always append
.md
to get clean markdown instead of HTML.
dbt文档提供对LLM友好的URL。请始终在URL后追加
.md
以获取整洁的markdown格式内容,而非HTML格式。

URL Pattern

URL格式

Browser URLLLM-friendly URL
https://docs.getdbt.com/docs/dbt-cloud-apis/service-tokens
https://docs.getdbt.com/docs/dbt-cloud-apis/service-tokens.md
https://docs.getdbt.com/reference/commands/run
https://docs.getdbt.com/reference/commands/run.md
浏览器URLLLM友好URL
https://docs.getdbt.com/docs/dbt-cloud-apis/service-tokens
https://docs.getdbt.com/docs/dbt-cloud-apis/service-tokens.md
https://docs.getdbt.com/reference/commands/run
https://docs.getdbt.com/reference/commands/run.md

Quick Reference

快速参考

ResourceURLUse Case
Single pageAdd
.md
to any docs URL
Fetch specific documentation
Page index
https://docs.getdbt.com/llms.txt
Find all available pages
Full docs
https://docs.getdbt.com/llms-full.txt
Search across all docs (filter by keyword first)
资源URL适用场景
单页文档在任意文档URL后添加
.md
获取特定文档内容
页面索引
https://docs.getdbt.com/llms.txt
查找所有可用页面
完整文档
https://docs.getdbt.com/llms-full.txt
跨所有文档搜索(先按关键词过滤)

Fetching a Single Page

获取单页文档

WebFetch: https://docs.getdbt.com/docs/path/to/page.md
Always add
.md
to the URL path.
WebFetch: https://docs.getdbt.com/docs/path/to/page.md
请务必在URL路径后添加
.md

Finding Pages

查找页面

Step 1: Search the Index First

步骤1:先搜索索引

Use
llms.txt
to search page titles and descriptions:
WebFetch: https://docs.getdbt.com/llms.txt
Prompt: "Find pages related to [topic]. Return the URLs."
This is fast and usually sufficient.
使用
llms.txt
搜索页面标题和描述:
WebFetch: https://docs.getdbt.com/llms.txt
Prompt: "Find pages related to [topic]. Return the URLs."
这种方式速度快,通常能满足需求。

Step 2: Search Full Docs (Only if Needed)

步骤2:搜索完整文档(仅在必要时使用)

If the index doesn't have results, use the script to search full page content:
bash
~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh <keyword>
如果索引中没有找到结果,可使用脚本搜索完整页面内容:
bash
~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh <keyword>

Examples

示例

~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh semantic_model ~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh "incremental strategy" ~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh metric dimension # OR search
~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh semantic_model ~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh "incremental strategy" ~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh metric dimension # 或搜索

Force fresh download (bypass 24h cache)

强制重新下载(绕过24小时缓存)

~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh metric --fresh


Then fetch individual pages with `.md` URLs.
~/.claude/skills/fetch-dbt-docs/search-dbt-docs.sh metric --fresh


然后使用带`.md`的URL获取单个页面。

Common Mistakes

常见错误

MistakeFix
Fetching HTML URL without
.md
Always append
.md
to docs URLs
Searching llms-full.txt firstSearch llms.txt index first, only use full docs if no results
Loading llms-full.txt entirelyUse the search script to filter, then fetch individual pages
Guessing page pathsUse llms.txt index to find correct paths
常见错误解决方法
获取未追加
.md
的HTML格式URL
始终在dbt文档URL后追加
.md
优先搜索llms-full.txt先搜索llms.txt索引,仅在无结果时再使用完整文档搜索
完整加载llms-full.txt使用搜索脚本过滤内容,再获取单个页面
猜测页面路径使用llms.txt索引查找正确路径