Skip to content
convex-review logo

Convex Code Review

convex-review

Comprehensive Convex code review checklist for production readiness. Use when auditing a Convex codebase before deployment, reviewing pull requests, or checking for security and performance issues in Convex functions.

SKILL.md

Full skill instructions

Convex Code Review

Security Checklist

1. Argument AND Return Validators

  • All public query, mutation, action have args validators
  • All functions have returns validators
  • No v.any() for sensitive data
  • HTTP actions validate request body (Zod recommended)

Search: query({, mutation({, action({ - check each has args: AND returns:

2. Error Handling

  • Uses ConvexError for user-facing errors (not plain Error)
  • Error codes are structured: { code: "NOT_FOUND", message: "..." }
  • No sensitive info leaked in error messages

Search: throw new Error should be throw new ConvexError

3. Access Control

  • All public functions check ctx.auth.getUserIdentity() where needed
  • Uses auth helpers (requireAuth, requireRole)
  • No client-provided email/​username for authorization
  • Row-level access verified (ownership checks)

Search: ctx.auth.getUserIdentity should appear in most public functions

4. Internal Functions

  • ctx.runQuery, ctx.runMutation, ctx.runAction use internal.* not api.*
  • ctx.scheduler.runAfter uses internal.* not api.*
  • Crons in crons.ts use internal.* not api.*

Search: api. in convex directory - should not be used for scheduling/​running

5. Table Names in DB Calls

  • All ctx.db.get, patch, replace, delete include table name as first arg

Search: db.get(, db.patch( - first arg should be quoted string

Performance Checklist

6. Database Queries

  • No .filter() on queries (use .withIndex() or filter in code)
  • .collect() only with bounded results (<1000 docs)
  • Pagination for large result sets

Search: \.filter\(\(?q, \.collect\(

7. Indexes

  • No redundant indexes (by_foo + by_foo_and_bar)
  • All filtered queries use .withIndex()
  • Index names include all fields

Review: schema.ts index definitions

8. Date.now() in Queries

  • No Date.now() in query functions
  • Time filtering uses boolean fields or client-passed timestamps

9. Promise Handling

  • All promises awaited (ctx.scheduler, ctx.db.*)

ESLint: no-floating-promises

Architecture Checklist

10. Action Usage

  • Actions have "use node"; if using Node.js APIs
  • ctx.runAction only when switching runtimes
  • No sequential ctx.runMutation/ctx.runQuery (combine for consistency)

11. Code Organization

  • Business logic in helper functions (convex/​model/)
  • Public API handlers are thin wrappers
  • Auth helpers in convex/​lib/​auth.ts

12. Transaction Consistency

  • Related reads in same query/​mutation
  • Batch operations in single mutation
  • Mutations are idempotent

Quick Regex Searches

IssueRegexFix
.filter()\.filter\(\(?qUse .withIndex()
Missing returnshandler:.*async without returns:Add returns:
Plain Errorthrow new Error\(Use ConvexError
Missing table namedb\.(get|patch)\([^"']Add table name
Date.now() in queryDate\.now\(\)Remove from queries
api.* schedulingapi\.[a-z]Use internal.*

Production Readiness

  1. Security: Validators + ConvexError + Auth checks + Internal functions
  2. Performance: Indexes + Bounded queries + No Date.now()
  3. Architecture: Helper functions + Proper action usage + "use node"
  4. Code Quality: Awaited promises + Table names + Return validators

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
I
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View