Skip to main content
skill CX Codex

convex-reviewer — Claude Code skill: review Convex functions

Walks Convex code through auth, validator, index and reactivity checks. Useful before you ship backend functions.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add convex/agent-skills --skill convex-reviewer -a claude-code
Open on GitHub

What convex-reviewer does

The skill runs three passes over code in a convex/ directory. Security first: it confirms public functions call ctx.auth.getUserIdentity(), that resource ownership is verified before reads and writes, and that client-supplied user IDs are not trusted. Then performance: .filter() on database queries, foreign-key fields without indexes, Date.now() inside query handlers, .collect() on unbounded queries. The third pass covers code quality — args and returns validators on public functions, any types, unawaited promises, arrays in documents.

Findings come back grouped by severity: Critical, Important, Suggestion. Each one gets an explanation of why it matters plus a suggested fix. A missing auth check is Critical, since an unauthenticated public mutation risks data loss.

The checklist is Convex-specific and expects functions under convex/. Point it at a different database and the rules stop applying. Install works through npx skills add on Claude, Codex, Cursor, Gemini CLI and OpenCode; GitHub Copilot uses gh skill install instead.

What it helps with

  • check auth on public mutations before release
  • find unindexed queries and full table scans
  • catch Date.now() inside a query handler
  • confirm public functions have args and returns validators
  • sort review findings by severity instead of one flat list

Example prompts for the agent

  • review the code in convex/ before shipping, group findings by severity
  • audit my Convex functions for auth, indexes and validators
  • check convex/ for .filter() queries and Date.now() calls

How to install convex-reviewer

1Skills CLI (Vercel)

npx skills add convex/agent-skills --skill convex-reviewer -a claude-code

2Manually: put the files in place

~/.claude/skills/convex-reviewer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/convex-reviewer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about convex-reviewer

How do I install convex-reviewer in Claude?

Run npx skills add convex/agent-skills --skill convex-reviewer -a claude-code. The skill lands in ~/.claude/skills/convex-reviewer/SKILL.md.

What does convex-reviewer do?

It reviews Convex code in three passes: security and authorization, query performance, and code quality. Each finding is tagged Critical, Important or Suggestion, with the reasoning behind it.

Which platforms support the skill?

Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Copilot takes a different command: gh skill install convex/agent-skills convex-reviewer.

Source text

SKILL.md · Apache-2.0
---
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."
---

<!-- 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.

© convex · Apache-2.0 · convex/agent-skills

Similar skills

Everything for Code review and refactoring →

From the same set32

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor