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.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o convex-review.zip https://jpskill.com/download/8736.zip && unzip -o convex-review.zip && rm convex-review.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/8736.zip -OutFile "$d\convex-review.zip"; Expand-Archive "$d\convex-review.zip" -DestinationPath $d -Force; ri "$d\convex-review.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
convex-review.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
convex-reviewフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
Convex Code Review
Security Checklist
1. Argument AND Return Validators
- [ ] All public
query,mutation,actionhaveargsvalidators - [ ] All functions have
returnsvalidators - [ ] 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
ConvexErrorfor user-facing errors (not plainError) - [ ] 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.runActionuseinternal.*notapi.* - [ ]
ctx.scheduler.runAfterusesinternal.*notapi.* - [ ] Crons in
crons.tsuseinternal.*notapi.*
Search: api. in convex directory - should not be used for scheduling/running
5. Table Names in DB Calls
- [ ] All
ctx.db.get,patch,replace,deleteinclude 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.runActiononly 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
| Issue | Regex | Fix |
|---|---|---|
.filter() |
\.filter\(\(?q |
Use .withIndex() |
| Missing returns | handler:.*async without returns: |
Add returns: |
| Plain Error | throw new Error\( |
Use ConvexError |
| Missing table name | db\.(get\|patch)\([^"'] |
Add table name |
Date.now() in query |
Date\.now\(\) |
Remove from queries |
api.* scheduling |
api\.[a-z] |
Use internal.* |
Production Readiness
- Security: Validators + ConvexError + Auth checks + Internal functions
- Performance: Indexes + Bounded queries + No Date.now()
- Architecture: Helper functions + Proper action usage + "use node"
- Code Quality: Awaited promises + Table names + Return validators