---
id: gh-convex-docs
name: "convex-docs"
url: https://skills.yangsir.net/skill/gh-convex-docs
author: convex
domain: ai-dev-tools-workflow
tags: ["documentation", "version-pinning", "api-reference", "information-retrieval", "developer-tools"]
install_count: 35100
rating: 4.60 (120 reviews)
github: https://github.com/convex/agent-skills/tree/main/skills/convex-docs
---

# convex-docs

> 为项目锁定已安装框架的真实版本，并按「已接入文档工具 → 页面 Markdown / 锁定版 README → 通用搜索」的新鲜度层级取回同版本文档，必要时直接核对 node_modules 中的类型定义后再动笔写 API。该 Skill 把「事实来源」与「惯用写法」分开：先拿到当前签名与出处，再交给编码能力落地，从而避免凭记忆写出已过时接口和版本不符的构建报错。

**Stats**: 35,100 installs · 4.6/5 (120 reviews)

## Before / After 对比

### API 版本核对与文档新鲜度取数

**Before**:

凭记忆写接口是常态：开发者要手动翻版本号、在多个网页间比对签名，仍常因文档过期写出不存在的导出或已改名的参数，构建报错后还得回头排查来源，一次核对动辄二十多分钟。

**After**:

此技能先锁定已装版本，再按新鲜度层级取回同版本的页面 Markdown 或直接读 node_modules 类型定义，并把确切签名与出处一并交给后续编写，接口核对从二十几分钟压到几分钟，版本不符类报错基本消失。

| Metric | Before | After | Change |
|---|---|---|---|
| 单次 API 核对耗时 | 25分钟 | 3分钟 | -88% |
| 每周版本不符构建错误 | 6次 | 1次 | -83% |

## Readme

<!-- 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.


---
*Source: https://skills.yangsir.net/skill/gh-convex-docs*
*Markdown mirror: https://skills.yangsir.net/api/skill/gh-convex-docs/markdown*