fetching-dbt-docs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFetch dbt Docs
获取dbt文档
Overview
概述
dbt docs have LLM-friendly URLs. Always append to get clean markdown instead of HTML.
.mddbt文档提供对LLM友好的URL。请始终在URL后追加以获取整洁的markdown格式内容,而非HTML格式。
.mdURL Pattern
URL格式
| Browser URL | LLM-friendly URL |
|---|---|
| |
| |
| 浏览器URL | LLM友好URL |
|---|---|
| |
| |
Quick Reference
快速参考
| Resource | URL | Use Case |
|---|---|---|
| Single page | Add | Fetch specific documentation |
| Page index | | Find all available pages |
| Full docs | | Search across all docs (filter by keyword first) |
| 资源 | URL | 适用场景 |
|---|---|---|
| 单页文档 | 在任意文档URL后添加 | 获取特定文档内容 |
| 页面索引 | | 查找所有可用页面 |
| 完整文档 | | 跨所有文档搜索(先按关键词过滤) |
Fetching a Single Page
获取单页文档
WebFetch: https://docs.getdbt.com/docs/path/to/page.mdAlways add to the URL path.
.mdWebFetch: https://docs.getdbt.com/docs/path/to/page.md请务必在URL路径后添加。
.mdFinding Pages
查找页面
Step 1: Search the Index First
步骤1:先搜索索引
Use to search page titles and descriptions:
llms.txtWebFetch: https://docs.getdbt.com/llms.txt
Prompt: "Find pages related to [topic]. Return the URLs."This is fast and usually sufficient.
使用搜索页面标题和描述:
llms.txtWebFetch: 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
常见错误
| Mistake | Fix |
|---|---|
Fetching HTML URL without | Always append |
| Searching llms-full.txt first | Search llms.txt index first, only use full docs if no results |
| Loading llms-full.txt entirely | Use the search script to filter, then fetch individual pages |
| Guessing page paths | Use llms.txt index to find correct paths |
| 常见错误 | 解决方法 |
|---|---|
获取未追加 | 始终在dbt文档URL后追加 |
| 优先搜索llms-full.txt | 先搜索llms.txt索引,仅在无结果时再使用完整文档搜索 |
| 完整加载llms-full.txt | 使用搜索脚本过滤内容,再获取单个页面 |
| 猜测页面路径 | 使用llms.txt索引查找正确路径 |