Convex 代码审查
convex-reviewer
Convex 代码审查——对 convex/ 目录中的代码进行安全、认证、验证器、性能和模式检查。用于在发布前审查或审计 Convex 函数。
- License 许可
- MIT
- 所属仓库
- openclaw/clawhub
- 最近更新
- 2026-11-15
- Stars
- ★ 9.6k
- Forks
- 1.5k
01 前言 Front Matter
- name
- convex-reviewer
- description
- Convex code reviewer — security, auth, validators, performance, and pattern checks for code in a convex/ directory. Use to review or audit Convex functions before shipping.
03 SKILL.md 正文
<!-- GENERATED from convex-agents content/capabilities/convex-reviewer.json — do not edit by hand. -->
Convex Code Reviewer
Structured review of Convex code for security, authorization, validators, performance, and schema design. Applies a Convex-specific checklist and flags anti-patterns with severity (Critical / Important / Suggestion).
Workflow
- First pass — Security: verify all public functions check ctx.auth.getUserIdentity(), verify resource ownership before reads/writes, confirm no client-provided user IDs are trusted, confirm scheduled functions target internal.* not api.*.
- Second pass — Performance: confirm no .filter() on DB queries (withIndex required), verify all foreign-key fields have indexes, confirm no Date.now() in query handlers, confirm .collect() is not used on unbounded queries.
- Third pass — Code quality: confirm args and returns validators on every public function, no any types, promises are awaited, arrays in documents are bounded (<8192 elements).
- Report findings grouped by severity; explain why each issue matters and suggest a fix.
Rules
- Flag missing auth checks as Critical — any unauthenticated public mutation is a data-loss risk.
- Flag .filter() on DB queries as Important — it is a full table scan.
- Flag Date.now() in query handlers as Important — it breaks reactivity.
- Flag missing args or returns validators as Important.
- Flag scheduling to api.* (not internal.*) as Important.
- Always explain why a change is needed, not just what to change.
04 同仓库更多 Skills
notes
Turn user-provided notes into a concise agenda.
hosted-research
Read approved reference material for the hosted proof.
Convex 部署性能诊断
convex-advisor
读取 Convex 部署的 72 小时洞察数据(读取限制、OCC 争用),在代码中逐一定位每个事件的根因,报告有证据支撑的性能/成本问题及修复方案。
Convex 应用能力扩展
convex-add
向当前 Convex 应用添加功能——查阅所提供服务的 Convex 能力目录以获取始终最新的流程(计费、定时任务、认证、智能体、搜索等);若不可用则回退到内置托管或 @convex-dev 组件搜索。当用户运行 /add,或要求向现有 Convex 应用添加托管/发布功能或任何后端能力时触发。
Convex 域名购买与绑定
convex-acquire-domain
通过 Convex 为当前 Convex 应用查找并购买域名,然后进行绑定(实验室环境;消费操作)。
Axiom 成本优化分析
controlling-costs
分析 Axiom 查询模式以找出未使用的数据,随后构建仪表盘和监控以实现成本优化。适用于降低 Axiom 成本、查找未使用的列或字段值、识别数据浪费,或跟踪数据摄取支出。