Apply ClawHub-specific Convex conventions and route to the right managed Convex skill. Use for any change under convex/, Convex commands or deployment targeting
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-clawhub-convex-07081c865429 ,按照其中的说明把「clawhub-convex」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use the managed Convex guidance for general framework behavior and this skill for ClawHub's repository-specific boundaries.
convex/_generated/ai/guidelines.md before editing Convex code.local, dev, or
prod. Include the exact deployment when known and whether the current
function/schema code has already been pushed there.convex-performance-auditconvex-migration-helper and create-and-cleanup-migrationconvex-retentionDo not edit upstream-managed Convex skills to store ClawHub policy.
convex run:
bunx convex dev --onceclawhub-production-releasebunx convex deploy -y.bunx convex run --env-file .env.local ... returns
401 MissingAccessToken after login, omit --env-file and target the
deployment with --deployment <name> or --prod.bunx convex codegen after Convex
API/schema changes.convex/functions.ts, not
convex/_generated/server, so ClawHub's trigger wrapper runs. Type imports
can still come from convex/_generated/server.Mocked ctx tests cover pure business logic only. When behavior depends on
pagination, indexes, validators, auth identity, internal/public boundaries,
schedulers, actions calling functions, HTTP actions, storage, or OCC, also run
a real Convex path such as:
bunx convex dev --oncebunx convex run ...bun run test:pw:local-authTests that invoke a mutation through ._handler need a mock database with
normalizeId: vi.fn() for trigger-wrapper compatibility.
@convex-dev/migrations; the companion
skills own batching, dry runs, resume/progress, confirmation, validation, and
cleanup.convex/migrations.ts.convex/maintenance.ts..github/workflows/deploy.yml.Use convex-performance-audit for the detailed rules on indexes, bounded reads,
denormalization, digest tables, subscriptions, and function limits. Before
writing or reviewing a performance-sensitive query, check deployment health
when available:
bunx convex insights --details
bunx convex logs --failure
Prefer measured runtime signals over speculative restructuring.
Use convex-performance-audit for the complete workflow. Preserve these
ClawHub-specific implementations when touching their paths:
ConvexHttpClient.query() reads
unless the user needs live updates.skillSearchDigest row exists, resolve owner data with
digestToOwnerInfo(digest). Do not re-read the owner document when the
digest already contains the required owner fields.convex-helpers triggers and skip writes when derived fields did not change.delayMs between backfill batches that update reactively subscribed
tables.The skills table still has a compatibility shape for four migrated stats:
| Legacy nested field | Top-level source of truth |
|---|---|
stats.downloads | statsDownloads |
stats.stars | statsStars |
stats.installsCurrent | statsInstallsCurrent |
stats.installsAllTime | statsInstallsAllTime |
readCanonicalStat() from
convex/lib/skillStats.ts. It prefers the top-level field and falls back for
pre-migration documents.applySkillStatDeltas(). It updates both shapes in one
patch.stats.comments and stats.versions.