Convex Docs

作者 get-convex2cfe645c87f9无许可证63 个星标收录于 2026年10月8日更新于 2026年10月8日仓库6天前更新

Pull version-current Convex docs for the version this project uses — pin the installed version, fetch page-as-markdown or check node_modules types, freshness hierarchy — instead of writing a possibly-stale API from memory.

AI 生成的概览

获取与项目所用版本一致的 Convex 文档及已安装包类型,避免凭记忆编写过时 API。

功能
该技能为 Convex 开发定义了一套时效性工作流:先锁定已安装的 convex 及 @convex-dev 组件版本,再按最省成本的正确顺序获取文档(托管文档工具、页面 markdown 或锁定版本的 README,最后才是一般网络搜索)。对于不确定的组件导出,它会对照 node_modules 中已安装包的 exports 与类型声明进行核实,并注明所用事实来自哪个页面和版本。它只提供最新事实,惯用代码的编写仍交由配套的 convex-expert 知识完成。
适用场景
适用于编写或修正可能依赖近期变更的导出、CLI 参数或被重命名 API 的 Convex 代码。也用于处理版本不匹配的构建错误,此时应重新锁定版本并获取当前 API,而不是猜测拼写。
运行要求
需要访问项目的 node_modules 或 package.json 以读取已安装版本,并需要网络访问以获取 Convex 文档页面或组件 README。托管文档工具或 MCP 的 search_convex_docs 端点可选但优先。不附带脚本,仅为说明性内容。
<!-- GENERATED from convex-agents content/capabilities/convex-docs.json — do not edit by hand. -->

Pull version-current Convex docs

convex-expert carries baked, plugin-versioned knowledge — excellent for stable idioms, but it goes stale exactly where it hurts: a component that gained a new export, a CLI flag that changed, an API renamed between versions. This capability is the freshness discipline layered on top: pin to the project's real version, fetch the live page cheaply as markdown, and never write an unfamiliar API from memory when the current source is one fetch away.

Workflow

  1. PIN the version: read the installed convex version (node -p "require('./node_modules/convex/package.json').version" or package.json), and the versions of any @convex-dev/* components in play. The docs you trust must match THESE versions — version skew is the single largest source of wrong Convex code.
  2. FRESHNESS HIERARCHY (cheapest-correct first, the Supabase-taught order): (a) if a served docs tool / MCP search_convex_docs is available, use it (it returns version-scoped, reranked answers sized to the context window); (b) else fetch the specific docs page as MARKDOWN — request docs.convex.dev/<path> and prefer a .md/markdown form when the site serves one (far fewer tokens than HTML), or the component's README at the pinned version; (c) only then fall back to a general web search, and treat its version as unverified. Do NOT skip to writing the API from memory when currentness is in doubt.
  3. VERIFY against the installed package when it matters: for a component export you're unsure exists, check node_modules/@convex-dev/<x>/ (its package.json exports, its .d.ts) — the installed types are the ground truth for THIS version, more authoritative than any doc.
  4. USE the fetched fact narrowly: apply the current signature/flag, cite where it came from (page + version), and hand the actual code back to convex-expert to write idiomatically. convex-docs supplies the fresh fact; convex-expert supplies the idiom.
  5. On a version-mismatch build error (an export/flag that 'should' exist but doesn't): treat it as a currentness question — pin the version, fetch the current API, and correct — rather than guessing a different spelling.

Rules

  • Never write an unfamiliar or possibly-renamed Convex/component API from model memory when currentness is in doubt — pin the version and fetch the current source first.
  • The installed package's own exports/.d.ts in node_modules is the ground truth for this version — more authoritative than any doc page.
  • Follow the freshness hierarchy: served docs tool → page-as-markdown / pinned README → general web (unverified) — cheapest-correct first, fewest tokens.
  • Prefer markdown over HTML doc pages — far fewer tokens for the same content.
  • Supply the fresh FACT; hand idiomatic code back to convex-expert. This is a freshness layer, not a replacement for the baked knowledge.
  • A version-mismatch build error is a currentness question, not a spelling guess — re-pin and re-fetch.

来源与署名

来源:get-convex/agent-skills位于skills/convex-docs提交2cfe645

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架