Convex Best Practices
Teaches Claude production-grade Convex patterns: function organization, arg/return validators, index-based queries, ConvexError handling, and OCC-safe mutations.
Dev & CodingIntermediate★ 404⑂ 32AI score 8/10Last updated: Feb 6, 2026
What it does
A rules-and-patterns skill for building apps on Convex, the reactive backend platform.
- Function organization: domain files (
users.ts,tasks.ts), public vsinternalMutation - Validation: always declare both
argsandreturnsvalidators - Query performance: schema indexes plus
withIndexinstead offilter - Error handling:
ConvexErrorwith structured code/message for clients - Write-conflict avoidance (OCC): idempotent mutations, patch without a prior read,
Promise.allfor independent updates - Safety rails: never runs
npx convex deployor git commands unless told to - Points to
@convex-dev/eslint-pluginand its four build-time rules, plus official docs andllms.txt
Who it's for
- Developers shipping Convex + TypeScript backends
- Teams tired of AI-generated Convex code missing return validators or abusing
filter - Anyone chasing down Convex write-conflict (error #1) issues
Examples
- "Scaffold CRUD for the tasks table" →
list/create/update/removewith return validators and aby_userindex - "This mutation keeps hitting write conflicts" → refactored to an idempotent early-return + direct patch
- "This query is slow" → replaces
filterwith a schema index andwithIndex
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/waynesutton/convexskills/HEAD/skills/convex-best-practices/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/convex-best-practices folder from the GitHub repo waynesutton/convexskills into my ~/.claude/skills/convex-best-practices/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/waynesutton/convexskills.git /tmp/convexskills && mkdir -p ~/.claude/skills && cp -r /tmp/convexskills/skills/convex-best-practices ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/waynesutton/convexskills.git /tmp/convexskills - Ensure the skills folder exists:
mkdir -p ~/.claude/skills - Copy the skill in:
cp -r /tmp/convexskills/skills/convex-best-practices ~/.claude/skills/ - Restart Claude Code inside your Convex project and ask something like "review these Convex functions against best practices".
- Optional: add build-time checks with
npm i @convex-dev/eslint-plugin --save-devand the recommended config ineslint.config.js.
View source on GitHub ↗License: Apache-2.0