.agents/skills/convex-guidelines/SKILL.md
Comprehensive Convex framework guidelines covering function syntax, validators, queries, mutations, actions, schema design, TypeScript patterns, pagination, and file storage. Use when writing or modifying Convex functions, defining schemas, or working with the Convex backend.
npx skillsauth add FabioFiorita/tastik convex-guidelinesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive reference for working with the Convex backend framework.
Convex functions use a specific syntax and conventions:
import { query, mutation } from "./_generated/server";
import { v } from "convex/values";
export const getItem = query({
args: { id: v.id("items") },
handler: async (ctx, args) => {
return await ctx.db.get(args.id);
},
});
export const createItem = mutation({
args: { name: v.string(), description: v.string() },
returns: v.null(),
handler: async (ctx, args) => {
await ctx.db.insert("items", args);
return null;
},
});
Id<'table'>, as const, typed arrays/recordsFor detailed information on specific topics, see:
import { api, internal } from "./_generated/api";
// In a mutation, call a query
const data = await ctx.runQuery(api.items.getItem, { id });
// In an action, call an internal mutation
const result = await ctx.runMutation(internal.items.updateInternal, { id });
import { paginationOptsValidator } from "convex/server";
export const listItems = query({
args: { paginationOpts: paginationOptsValidator },
handler: async (ctx, args) => {
return await ctx.db
.query("items")
.order("desc")
.paginate(args.paginationOpts);
},
});
// Define in schema.ts
defineTable("items")
.index("by_user_and_created", ["userId", "_creationTime"])
// Use in query
export const getUserItems = query({
args: { userId: v.id("users") },
handler: async (ctx, args) => {
return await ctx.db
.query("items")
.withIndex("by_user_and_created", (q) => q.eq("userId", args.userId))
.collect();
},
});
Use this skill when:
tools
Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices.
development
Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
tools
Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed.
development
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.