Community研究与数据分析github.com

先读文档再动手

在集成、升级、调试或涉及第三方 API、库、框架、CLI、云服务、模型/提供商 SDK 等场景下,强制先通过网络搜索当前官方文档并阅读,然后才编码,避免依赖记忆猜测。

先读文档再动手 是什么?

该技能的核心准则是:当问题可以通过权威文档回答时,绝不依赖猜测。它适用于所有涉及第三方 API、库、框架、CLI、云服务、模型/提供商 SDK、快速变化的产品行为、用户对最新/当前/官方行为的请求、不熟悉的仓库文档/规范,以及可能导致 API 漂移的错误或高风险的认证、安全、计费、数据、迁移、部署、合规或隐私行为的场景。技能通过一系列“文档优先触发器”来识别何时必须查阅文档,并定义了什么是权威文档(如官方产品文档、本地仓库文档、包注册元数据等),同时避免将 Stack Overflow、旧博客文章或模型记忆作为主要来源。其工作流程包括:确定确切的技术表面、搜索当前官方文档、阅读、提取关键事实、基于事实实现、验证,并在最终答案中注明所查阅的文档。该技能适用于 Claude Code、Cursor、Codex 等 AI 编码代理,帮助开发者确保其实现基于最新、最准确的官方信息,减少因依赖过时记忆或猜测而导致的错误。

兼容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/BuilderIO/skills/tree/main/skills/read-the-damn-docs

Installed? Explore more 研究与数据分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

先读文档再动手 是做什么的?

不要猜测当权威文档能够回答问题。最常见的正确做法是网络搜索当前官方文档,打开相关页面,在编码前阅读它们。对于 API、版本、提供商行为、配置、限制、生命周期钩子或安全敏感流程,答案应基于文档实际所述内容。

文档优先触发器

当以下任一条件成立时,先阅读文档再继续:

  • 用户要求“最新”、“当前”、“官方”、“支持”、“最佳实践”、“推荐”、“今天”、“现在”或“查一下”。
  • 所需的文档不在仓库中或由用户提供。应在网上搜索官方文档,而不是指望模型记忆是最新的。
  • 任务涉及添加、升级、配置或导入一个包、SDK、框架、插件、CLI、模型、云资源或提供商集成。
  • API 变化迅速或版本敏感:AI SDK、OpenAI/Anthropic/Google API、Next.js、React、Tailwind、Vite、Nitro、Drizzle、Prisma、Stripe、GitHub、Slack、Notion、浏览器 API、部署平台、认证库等。
  • 实现依赖于认证、OAuth 作用域、权限、密钥、Webhook、计费、支付、PII、加密、数据保留、迁移、重试、速率限制、配额、缓存、部署或合规。
  • 错误提到弃用、未知选项、缺少导出、无效配置、不支持的字段、更改的默认值或版本不匹配。
  • 仓库中有本地文档、ADR、生成的模式、OpenAPI 规范、路由/动作注册表、设计系统文档或包级 README 可能定义契约。
  • 选择难以撤销:公共线路格式、数据库模式、迁移策略、持久化 ID、事件名称、客户可见行为或外部自动化契约。
  • 你发现自己即将写下“通常”、“可能”、“我认为”、“凭记忆”,或从模型记忆中复制用于外部 API 的代码。

哪些算作文档

使用最权威的可用来源:

  • 本地仓库文档、规范、ADR、模式、生成类型、包 README 和针对项目特定行为的测试。
  • 针对第三方行为的官方产品文档、API 参考、迁移指南、变更日志、发布说明以及 SDK 源/类型。当你没有确切的 URL 时,通过网络搜索找到它们。
  • 用于版本的包注册元数据。在添加依赖项之前,运行 npm view <pkg> version、pnpm view <pkg> version 或生态系统等效命令,然后阅读该主版本的文档。
  • 当官方文档不完整时的源代码或类型定义。将其视为证据,而不是传说。

如果存在官方文档,避免将 Stack Overflow、旧博客文章、随机片段和记忆作为主要来源。仅在权威契约已知后,使用社区来源来调试症状。

必需工作流程

  1. 确定确切的技术表面:包名、已安装版本、目标版本、提供商端点、CLI 命令、配置文件、本地辅助工具、模式或产品功能。
  2. 除非相关文档已在本地或用户提供了 URL,否则网络搜索当前官方文档。使用有针对性的搜索,如 <产品> <功能> 官方文档、<包> 迁移指南 或 <提供商> API 参考。
  3. 打开并阅读最接近该技术表面的文档。对于内部代码,优先使用本地文档,然后是官方上游文档。对于新包,在编写导入、配置或安装命令之前验证最新版本。
  4. 提取任务所需的几个事实:选项名称、导入方式、生命周期规则、默认行为、重大变更、限制、权限以及当前主版本的示例。
  5. 基于这些事实实现或回答。如果文档与现有代码冲突,检查本地代码路径并指出差异。
  6. 通过最小的有用检查进行验证:类型检查、测试、构建、CLI 空运行、API 模式验证或本地复现。
  7. 在最终答案中,当证据影响建议或实现时,注明所查阅的文档或本地文件。

必须触发文档阅读的示例

  • “向此应用添加 Tailwind。”在创建配置文件或假设旧的 PostCSS 设置之前,从网络上检查当前的 Tailwind 主版本及其安装文档。
  • “使用 AI SDK 流式传输响应。”在编码之前验证当前的 AI SDK 主版本、导入方式、提供商包名称、流式辅助函数以及来自官方文档的服务器/运行时示例。
  • “设置 Stripe Webhook。”在编码之前阅读 Stripe 当前的签名验证、事件重试、端点密钥和框架主体解析文档。
  • “修复这个 Next.js 缓存错误。”在假设缓存失效语义之前,阅读已安装的 Next.js 主版本和路由器模式的文档。
  • “添加 Drizzle 迁移。”在生成文件之前阅读当前的 Drizzle kit 文档和现有仓库的迁移约定。
  • “创建一个 GitHub Action。”在编码之前阅读官方 Actions 语法和权限文档,特别是关于 pull_request、workflow_run、OIDC、令牌和制品。
  • “为什么这个 OAuth 流程失败?”在修改代码之前阅读提供商的 scopes、重定向 URI、PKCE、令牌刷新和应用验证文档。
  • “使用此仓库的 plan/comment/action 系统。”在发明端点或属性之前阅读本地文档、路由/动作注册表、模式和测试。
  • “升级 Vite/Nitro/React。”在编辑配置或导入之前阅读确切目标主版本的迁移指南。
  • “我们应该使用哪个模型?”在推荐之前阅读当前提供商模型文档、定价/限制页面和 SDK 示例。

何时快速阅读本地文档即可

不要为每个微小的修改浏览整个网络。当答案已在仓库中时(现有辅助工具用法、附近的测试、类型化接口、生成的客户端、ADR 或包 README),文档查阅可以是本地的且简短的。但如果任务依赖于外部工具、包、提供商或当前产品行为,网络搜索通常是正确的第一步。对于简单的语言语法、拼写错误修复、格式化或没有外部契约的独立代码,正常处理即可。

如果文档不可用

如果网络访问、认证或缺少本地文件阻止了阅读文档,在依赖记忆之前明确说明这一点。缩小不确定性范围,如果可能则检查源代码或类型,并避免将结果呈现为确认的最新信息。

Individual skills in this repo

This repo contains 10 individual skills — each has its own dedicated page.

BuilderIO/adding-a-skill

Use in the BuilderIO/skills repo whenever adding, updating, publishing, documenting, validating, or wiring a public skill. Covers the repo-local skill files, root catalog docs, plugin metadata, @agent-native/skills dynamic install path, optional managed AGENTS/CLAUDE instruction blocks in ../agent-native/framework, and generated/synced Plan skill gotchas.

BuilderIO/agent-watchdog

Use when asked to watch, babysit, audit, review, compare, or fix another agent's work from a Codex session ID, Claude Code session/transcript, chat/thread link, PR, branch, log, or pasted run summary. Monitor until the other agent is done or blocked, reconstruct what the user asked, inspect what the agent actually changed and verified, report gaps, and optionally make scoped fixes when the user authorizes repair.

BuilderIO/efficient-fable

Use when running Claude Fable on codebase-heavy or token-heavy work and the user wants Fable to orchestrate research, coding, and testing while cheaper subagents do bounded heavy lifting.

BuilderIO/efficient-frontier

Apply the same orchestration as `/efficient-fable` to any high-cost frontier model: delegate research, coding, and testing to cheaper subagents while keeping planning, synthesis, and final review with the expensive model.

BuilderIO/plan-arbiter

Use when asked to compare, cross-review, merge, judge, choose, or arbitrate competing plans from multiple agents such as Codex and Claude Code; when given two or more proposed plans, session IDs, transcripts, plan documents, PR descriptions, or pasted strategies; or when the user wants one recommended execution plan after agents review each other's proposals.

BuilderIO/plow-ahead

Use when the user explicitly wants autonomous progress without routine clarification stops: "plow ahead", "do not stop", "use your best judgment", "keep going until done", "finish while I am away", "do not ask questions unless truly blocked", or similar. Convert ordinary ambiguity into stated assumptions, proceed through implementation and validation, stop only for true blockers, and end with a clear recap of decisions, changes, verification, and residual risk.

BuilderIO/quick-recap

Use when adding or following the red/yellow/green final status block convention for agent responses, especially by installing managed AGENTS.md or CLAUDE.md instructions.

BuilderIO/stay-within-limits

Use when long-running or parallel agent work must respect 5-hour and weekly usage limits by checking usage between waves, pausing near the cap, and resuming only when the window is clear.

BuilderIO/visual-plan

Turn ordinary text plans into rich interactive visual plans with diagrams, file maps, annotated code, open questions, and UI/prototype review when useful.

BuilderIO/visual-recap

Turn a PR, branch, commit, or git diff into an interactive visual recap with diagrams, file maps, API/schema summaries, annotated diffs, and focused review notes.

相关技能