Install any skill in seconds. Free to start, no credit card required.
Get Started Free →waynesutton/convex-best-practices
Guidelines for building production-ready Convex apps covering function organization, query patterns, validation, TypeScript usage, error handling, and the Zen of Convex design philosophy
Passed 21 of 22 test cases with the skill, and 9 of 22 without it.
and 11 more in the full report
12 fixed9 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
This benchmark measured an earlier version of the skill.
A newer attempt on gemini-3.6-flash on 10/3/2026 did not produce a publishable comparison (not comparable). The snapshot above is the previously measured run.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a Convex query function that fetches a document by ID from the projects table.
| Checked | Without skill | With skill |
|---|---|---|
| Calls ctx.db.get with the document ID argument | Passed | Passed |
| Defines explicit returns validator for the query | Missed | Passed |
The instructions your model reads when the skill loads.
The patterns that keep a Convex app fast and correct in production. The rule that matters most: read as little as possible before you write, and read through an index.
args and returns, with returns: v.null() when nothing comes back.withIndex against an index in convex/schema.ts.ctx.db.patch(id, fields) throws if the doc is missing; you rarely need the old value.Promise.all for independent writes. Do not await them one at a time.internal.* only. Crons and ctx.scheduler run without a client, so public targets skip auth.ctx.ConvexError for anything a client should read. Plain Error messages are redacted in production.// convex/tasks.ts
import { query, mutation } from "./_generated/server";
import { v, ConvexError } from "convex/values";
const taskValidator = v.object({
_id: v.id("tasks"),
_creationTime: v.number(),
userId: v.id("users"),
title: v.string(),
status: v.union(v.literal("open"), v.literal("done")),
});
export const listOpen = query({
args: { userId: v.id("users") },
returns: v.array(taskValidator),
handler: async (ctx, args) => {
return await ctx.db
.query("tasks")
.withIndex("by_user_and_status", (q) =>
q.eq("userId", args.userId).eq("status", "open"),
)
.order("desc")
.take(100);
},
test cases passed, vs 9 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.