跳到正文
Skillpedia
通用编程9.5k · #12242

convex-docs

它能做什么

这个技能确保智能体使用与你项目版本相符的 Convex 文档。适合希望代码准确、而不是凭旧示例猜测的开发者。

适用场景

  • ✓当你的智能体即将编写使用了它可能不熟悉的 Convex 功能的代码时。
  • ✓当你的项目最近更新过,代码出现了异常行为时。
  • ✓当你希望 Convex 代码与应用所用的确切版本相符时。

技能链接

https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-docs/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-docs/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“在你编写这段查询代码之前,请先查阅我所用版本的最新 Convex 文档。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会读取项目所用的 Convex 版本,然后查找相符的文档。只有在失败时,才会退而使用其他来源。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

<!-- 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.
常见问题

版本为什么重要?

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能