Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
中文简介正在准备中。当前显示原文说明。
Use when optimizing Convex database read bandwidth, documents-read cost, query indexes, full-table scans, function-level usage dashboard findings, or code that uses .filter(), unbounded .collect(), N+1 reads, or expensive reactive Convex queries.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Reduce Convex database bandwidth and read amplification while preserving query
correctness. This skill is narrower than convex-performance-audit: use it
when the signal is specifically high database read bandwidth, high documents
read, full-table scans, index design, or expensive query syntax.
convex/**/*.ts, read convex/_generated/ai/guidelines.md..agents/rules/convex.md and .agents/rules/development-commands.md
before changing schema or Convex functions.npx convex insights --details when
supported, or audit the code directly and state that the ranking is
code-derived rather than usage-derived.Start from the Convex usage dashboard database bandwidth section:
convex/.useQuery, usePaginatedQuery,
fetchAuthQuery, or route loaders so you understand call frequency.A high documents-read/documents-returned ratio usually means a full-table scan, unbounded read, or read-after-filter pattern.
Search for these first:
rg -n "\\.filter\\(|\\.collect\\(\\)|collect\\(\\)\\.length|for \\(.*await ctx\\.db\\.get|ctx\\.db\\.query" convex
Flag these patterns:
ctx.db.query("table").filter(...)ctx.db.query("table").collect() followed by JavaScript .filter(...)collect().length for counts.collect() on user-facing or reactive pathsctx.db.get(...) inside loops when the loop can growuseQuery data that only needs a point-in-time server readApply the smallest high-impact fix first.
.take(n) or .paginate(...).collect().length with maintained counters or aggregate documents.When an index or denormalized field depends on old data being backfilled, use the migration helper workflow instead of assuming old documents have the new shape.
Schema:
messages: defineTable({
channelId: v.id("channels"),
body: v.string(),
}).index("by_channelId", ["channelId"]),
Query:
const messages = await ctx.db
.query("messages")
.withIndex("by_channelId", (q) => q.eq("channelId", channelId))
.take(50);
Use Convex index syntax exactly:
.index("by_fieldName", ["fieldName"])..index("by_organizationId_and_status", ["organizationId", "status"])..withIndex(), compare indexed fields with q.eq("fieldName", value),
not q.eq(q.field("fieldName"), value).by_org and
by_org_and_status unless the single-field index is needed for _creationTime
ordering..withSearchIndex(...) for text search instead of scanning and filtering.For every rewritten query, verify:
Run the smallest checks that cover the change:
npx convex dev --once for schema and generated API changes.cd web-app && npm run typecheck for TypeScript correctness.cd mobile-app && npx tsc --noEmit when mobile imports generated APIs.cd mobile-app && npm run lint when mobile style-sensitive files changed.Update docs or release notes only when this repo already has a matching changelog/release-note convention for the touched area.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
中文简介正在准备中。当前显示原文说明。
Routes general Convex requests to the right project skill. Use when the user asks which Convex skill to use or gives an underspecified Convex app task.
中文简介正在准备中。当前显示原文说明。
Build reusable Convex components with isolated tables and app-facing wrappers. Use for defineComponent, app.use, ComponentApi, or shared backend modules.
中文简介正在准备中。当前显示原文说明。
Plan safe Convex schema and data migrations. Use for widen-migrate-narrow rollouts, backfills, breaking field changes, table splits, or failed schema deploys.
中文简介正在准备中。当前显示原文说明。
Audit Convex performance for hot reads, write contention, subscriptions, function limits, OCC conflicts, latency, read amplification, and expensive reactive queries.
中文简介正在准备中。当前显示原文说明。
Creates or adds Convex to an app. Use for new Convex projects, npm create convex@latest, frontend setup, env vars, or the first npx convex dev run.
中文简介正在准备中。当前显示原文说明。