Convex Reviewer

作者 get-convex2cfe645c87f9无许可证63 个星标收录于 2026年10月8日更新于 2026年10月8日仓库6天前更新

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.

AI 生成的概览

审查 Convex 后端代码的安全性、授权、验证器、性能与模式反模式。

功能
对 convex/ 目录中的代码应用 Convex 专用检查清单,分三轮进行:安全与授权、性能、代码质量。它会核查身份验证检查、资源归属检查、索引使用、验证器以及有界查询,然后按严重程度(Critical、Important、Suggestion)分组报告发现的问题,并说明原因和修复建议。
适用场景
适用于在发布前审查或审计 Convex 函数,或需要对 Convex 的安全性、授权、验证器和性能做结构化检查时。适合 Convex 后端代码的发布前检查。
运行要求
无需脚本或工具,仅为指令型技能。需要有待审查的 convex/ 目录中的 Convex 代码。
<!-- 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

  1. 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.*.
  2. 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.
  3. 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).
  4. 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.

来源与署名

来源:get-convex/agent-skills位于skills/convex-reviewer提交2cfe645

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架