
Description
Convex Best Practices is an agent skill that describes production patterns for Convex apps, along with the rules that the Convex ESLint plugin enforces. The main rule is to read as little as possible before writing, and to read through an index. The skill asks for validators on every function's arguments and return value, indexes instead of filters in every table read, and idempotent mutations that return early when a document is already in the target state, so retries are safe. It explains that a patch can be applied without reading the document first, that independent writes should run with Promise.all rather than one after another, and that crons and the scheduler should only target internal functions.…
Highlights
- Validators on every function's arguments and returns
- Indexed reads instead of filters
- Idempotent mutations that are safe to retry
- Thin wrappers and ConvexError for client messages
- Guidance for write conflicts and slow queries
Ratings & Reviews
No ratings yet
Be the first to rate convex-best-practices.
People also visit

convex-performance-audit
Diagnose and resolve Convex performance issues across reads, writes
convex-best-practices FAQ
What does this skill teach?
Production patterns for Convex apps, such as validators, indexes, idempotent mutations and error handling.
When should I use it?
When reviewing Convex code, setting up ESLint, or fixing write conflicts and slow queries.
Why use ConvexError?
The skill says plain Error messages are redacted in production, so ConvexError is used for messages a client should read.
Is it free?
Yes. The skill is open source on GitHub.
What are the best convex-best-practices alternatives?
Popular alternatives to convex-best-practices include convex-expert, convex-functions and convex-performance-audit. See all convex-best-practices alternatives
