convex-docs — скилл для Claude Code: что делает и как установить
Проверяет установленную в проекте версию Convex и подтягивает актуальную документацию в markdown вместо устаревшего кода из памяти модели.
npx skills add convex/agent-skills --skill convex-docs -a claude-codeЧто делает convex-docs
Скилл предотвращает ошибки при работе с Convex, когда модель воспроизводит переименованные методы или старые флаги CLI из памяти. Сначала агент определяет точную версию библиотеки через package.json или команду node -p "require('./node_modules/convex/package.json').version", а также фиксирует версии компонентов @convex-dev/*.
Для поиска информации скилл выстраивает иерархию свежести. Сначала он обращается к инструменту search_convex_docs, если в окружении доступен MCP-сервер. Если инструмента нет, агент запрашивает страницу docs.convex.dev/<path> в формате markdown или README нужного релиза, экономя токены контекста. Обычный поиск в сети остаётся последним вариантом с неподтверждённой версией.
Эталонным источником истины служат файлы .d.ts и поле exports прямо в node_modules/@convex-dev/<x>/. Скилл передаёт агенту проверенные факты и сигнатуры, оставляя написание кода напарнику convex-expert. Если сборка падает из-за отсутствующего экспорта, это повод проверить несоответствие версий, а не угадывать другое написание функции.
Какие задачи решает
- сверить сигнатуру API с установленной версией Convex
- получить точные флаги CLI в формате markdown
- проверить экспорты компонента в
node_modulesпо файлам.d.ts - исправить ошибки сборки из-за несовпадения версий пакетов
Примеры запросов агенту
- Проверь по документации нашей версии convex, как объявить mutation с валидацией аргументов
- Посмотри в node_modules/@convex-dev/auth актуальные экспорты для текущей версии
- Сверь флаги команды convex dev с docs.convex.dev
Как установить convex-docs
1Через Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-docs -a claude-code2Вручную: положить файлы
~/.claude/skills/convex-docs/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/convex-docs/
1Через Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-docs -a codex2Вручную: положить файлы
.agents/skills/convex-docs/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-docs -a cursor2Вручную: положить файлы
.cursor/skills/convex-docs/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install convex/agent-skills convex-docs2Вручную: положить файлы
.github/skills/convex-docs/SKILL.md1Через Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-docs -a gemini-cli2Командой платформы
gemini skills install https://github.com/convex/agent-skills --path skills/convex-docsВручную: положить файлы
.devin/skills/convex-docs/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-docs -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о convex-docs
Как установить convex-docs в Claude Code?
Выполните команду npx skills add convex/agent-skills --skill convex-docs -a claude-code.
Зачем нужен convex-docs?
Скилл заставляет агента привязываться к реально установленной версии Convex и запрашивать свежие страницы документации в markdown, защищая от устаревших вызовов API.
Как скилл проверяет правильность экспортов компонентов?
Агент напрямую инспектирует файлы .d.ts и поле exports внутри каталога node_modules/@convex-dev/<x>/. Установленные локально типы считаются авторитетнее любых веб-страниц.
Исходный текст
SKILL.md · Apache-2.0
---
name: convex-docs
description: "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."
---
<!-- 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 · Apache-2.0 · convex/agent-skills