convex-docs
它能做什么
这个技能确保智能体使用与你项目版本相符的 Convex 文档。适合希望代码准确、而不是凭旧示例猜测的开发者。
适用场景
- ✓当你的智能体即将编写使用了它可能不熟悉的 Convex 功能的代码时。
- ✓当你的项目最近更新过,代码出现了异常行为时。
- ✓当你希望 Convex 代码与应用所用的确切版本相符时。
技能链接
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-docs/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在你编写这段查询代码之前,请先查阅我所用版本的最新 Convex 文档。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取项目所用的 Convex 版本,然后查找相符的文档。只有在失败时,才会退而使用其他来源。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
- PIN the version: read the installed
convexversion (node -p "require('./node_modules/convex/package.json').version"orpackage.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. - FRESHNESS HIERARCHY (cheapest-correct first, the Supabase-taught order):
(a) if a served docs tool / MCP
search_convex_docsis available, use it (it returns version-scoped, reranked answers sized to the context window); (b) else fetch the specific docs page as MARKDOWN — requestdocs.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. - VERIFY against the installed package when it matters: for a component export you're unsure exists, check
node_modules/@convex-dev/<x>/(itspackage.jsonexports, its.d.ts) — the installed types are the ground truth for THIS version, more authoritative than any doc. - 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.
- 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.tsin 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.
常见问题
版本为什么重要?
Convex 的功能会在不同版本之间变化,针对其他版本的文档可能生成无法运行的代码。
技能从哪里查找文档?
如果有文档搜索工具,它会使用该工具,然后获取相符的文档页面。
它会先尝试哪个来源?
它先尝试与版本匹配的文档搜索,然后是对应的文档页面,最后才会退回到其他来源。
详情
作者的原始描述
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.
repo: openclaw/clawhub
热度
- GitHub 星标
- 9.5k
- 排名
- #12242
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
axiom-alerting
9.5k帮你的智能体通过 Axiom API 创建和管理监控器与通知路由,并检查告警是否按预期运行。
axiom-sre
9.5k帮你的智能体逐步调查生产事故和缺陷,在得出结论之前,用 Axiom 日志验证每一个猜测。
building-dashboards
9.5k帮你的智能体从仪表盘必须支持的决策出发,设计配有合适图表、查询和筛选器的 Axiom 仪表盘。
controlling-costs
9.5k帮你的智能体在 Axiom 中找出未被使用的数据,并构建用于追踪和削减日志成本的仪表盘与监控器。