convex-reviewer

Reviews Convex functions for security, auth, validators, and performance anti-patterns.

9.4k|1.5k|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/openclaw/clawhub --skill convex-reviewer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-reviewer
Source: https://github.com/openclaw/clawhub/tree/main/.agents/skills/convex-reviewer
Command: npx skills add https://github.com/openclaw/clawhub --skill convex-reviewer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex backend code can ship with missing auth checks, unindexed queries, and validator gaps that cause data leaks or slow queries. This Skill applies a structured Convex-specific review checklist so these issues are caught before deployment.

Core Features & Use Cases

  • Security Audit: Verifies every public function checks ctx.auth.getUserIdentity(), confirms resource ownership before reads/writes, and flags client-provided user IDs.
  • Performance Review: Detects .filter() on database queries, missing indexes on foreign keys, Date.now() in query handlers, and unbounded .collect() calls.
  • Code Quality Checks: Confirms args and returns validators on public functions, no any types, awaited promises, and bounded arrays.
  • Use Case: Before merging a pull request that adds new Convex mutations, run this review to get findings grouped by severity (Critical / Important / Suggestion) with explanations and suggested fixes.

Quick Start

Review the code in my convex/ directory for security, performance, and validator issues before I ship it.

Frequently Asked Questions about convex-reviewer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Convex functions for security issues?

Run a structured review that verifies every public function calls ctx.auth.getUserIdentity(), checks resource ownership before reads and writes, and never trusts client-provided user IDs. Missing auth checks on public mutations are flagged as Critical since they risk data loss.

What are common Convex performance anti-patterns?

The main anti-patterns are using .filter() on database queries (a full table scan), missing indexes on foreign-key fields, calling Date.now() inside query handlers which breaks reactivity, and using .collect() on unbounded queries.

Why should scheduled Convex functions target internal instead of api?

Scheduled functions should target internal.* rather than api.* because api functions are publicly exposed to clients. Scheduling to internal functions keeps privileged logic inaccessible from outside and is flagged as Important during review.

Does Convex require args and returns validators on functions?

Yes, every public Convex function should define args and returns validators. Missing validators are flagged as Important because they weaken type safety and allow unvalidated data into mutations and queries.

When should I run a Convex code review?

Run it before shipping or merging changes to a convex/ directory, especially after adding new public mutations or queries. It catches auth gaps, unindexed queries, and validator omissions early, grouped by severity with suggested fixes.