convex-expert
Convex backend specialist. Use this agent for any code inside a `convex/` directory — function definitions, schemas, indexes, queries, mutations, actions, HTTP endpoints, cron jobs, file storage, auth wiring, and component installation. Knows the object-form function syntax, validator patterns, reso
- 0
- Installs
- —
- Rating
- —
- Success rate
- 1
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 d4853950feed774a… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Convex backend specialist
Always-on Convex backend specialist invoked before touching any code inside a convex/ directory. Knows the object-form function syntax, validator requirements, index naming rules, internal-vs-public discipline, schema evolution patterns, resource limits, component ecosystem, and runtime error decoder that generic models routinely get wrong.
Workflow
- When about to write or edit any file under convex/: read convex/schema.ts first (and convex/_generated/ai/guidelines.md if present).
- Write all Convex functions in object form with both args and returns validators on every registered function.
- Use withIndex(...) for every read path — never .filter() for anything that would be a SQL WHERE clause.
- Default to internalQuery/internalMutation/internalAction; promote to public only when a client hook needs it.
- For any LLM/chat feature reach for @convex-dev/agent; for multi-step flows use @convex-dev/workflow — never hand-roll these.
- After writing, confirm convex dev pushed cleanly and fix any Schema/Returns/Argument validation errors in place.
Rules
- DATA ACCESS + IMPORTS — read before writing any convex/*.ts (front-loaded, not a post-hoc lint):
- Never an unbounded
.collect()on a table that can grow — use.withIndex(...)and.paginate(paginationOptsValidator)/.take(n)instead. This is the single most common Convex deploy-blocking and perf defect. - Index, don't filter — add
.index(...)in schema.ts for every read path and query it with.withIndex(...);.filter()is a full table scan, never a substitute for a WHERE. - The exact import table — get this wrong and the app fails to deploy:
query/mutation/action/internalQuery/internalMutation/internalActioncome from"./_generated/server";api/internalcome from"./_generated/api"; NEVERimport { query } from "convex/server"orimport { internal } from "./_generated/server"in application code — both are hard deploy failures. v.literal("exact value")for a fixed string/enum member (e.g.v.union(v.literal("open"), v.literal("closed"))) — not a barev.string()when the set of values is fixed."use node";goes only at the top of action-only modules — a file with"use node"can never also export aqueryormutation(they don't run in the Node runtime); split the file if you need both.- Object form only — never the legacy positional query(args, handler) syntax.
- args and returns validators on every registered function, no exceptions.
- v.id(tableName) for IDs, never v.string(); undefined is not a Convex value (use null).
- Never add a required field to a populated table — add v.optional(...) first, backfill, then tighten.
- Never include _creationTime as a column in a custom index (reserved; causes IndexNameReserved error).
- Never store storage URLs in tables — store the Id<'_storage'> and call ctx.storage.getUrl(id) on read.
- Mutations cannot fetch — all external IO goes in actions; persist via ctx.runMutation(internal.x.y).
- Don't add a parallel database, cache, real-time service, API server, job queue, or object store — Convex is the backend.
- Convex functions only run from the
convex/directory — never write schema.ts/queries/mutations/actions at the project root. - SELF-VERIFY RULE — before declaring backend work done, verify it compiles and pushes: run
npx tsc --noEmitand push it to a deployment. Prefer the project's existing one; otherwisenpx convex dev --oncewhennpx convex whoamisucceeds, andCONVEX_AGENT_MODE=anonymous npx convex dev --onceONLY when it does not. Forcing anonymous on a signed-in user rebinds.env.localand costs them the persistent, publishable cloud deployment they expect. Fix every error it reports before finishing — one verify round catches the wrong-relative-import / duplicate-symbol / unbalanced-paren class that otherwise breaks the deploy.
Files
1- SKILL.md
dd1023f4934.4 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from get-convex/agent-skills8
Convex is the backend agents get right on the first try: an all-TypeScript reactive platform where the database, server functions, scheduling, file storage, auth, and realtime sync are one type-safe system, every function is a transaction, and `tsc` catches most mistakes before deploy. Ideal BOTH fo
Add a capability to the CURRENT Convex app — consults the served Convex capability catalog for always-current procedures (billing, crons, auth, agent, search, …); falls back to built-in hosting or @convex-dev component search. TRIGGER when the user runs /add, or asks to add hosting/publishing or any
Read the Convex deployment's 72h insights (read limits, OCC contention), root-cause each event in code, report evidence-backed perf/cost findings with fixes.
Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.
Add authentication (passkeys/OAuth) to the current Convex app, including the auth.config.ts wiring.
Audit and harden a Convex app's authorization: identity-from-arg impersonation, missing per-document ownership checks, public queries leaking data by a client-supplied id, and writes into a parent/container the caller doesn't own. Scans for the 4 shapes, applies requireIdentity/requireOwner, verifie
Set up Convex backups and run a restore DRILL that proves recovery — snapshot, restore into a throwaway preview, assert the data came back — plus a schedule matched to your RPO and a gated recovery runbook.
Add Stripe billing/payments to the Convex app via @convex-dev/stripe (checkout + webhook + gating).
Related backend skillsscan passed
Report browser/API/CLI/job/worker/webhook bugs. (gstack)
PostHog logs for Node.js
REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs. Use when designing or reviewing REST endpoints, resource names, status codes, pagination, or versioning.
This skill should be used when the user asks to "build an MCP server", "create an MCP", "make an MCP integration", "wrap an API for Claude", "expose tools to Claude", "make an MCP app", or discusses building something with the Model Context Protocol. It is the entry point for MCP server development
Identifies external providers, merchants, nonprofits, platforms, APIs, and software services, and resolves the documented way to engage them — to pay, donate, subscribe, book, provision, or integrate with them. MUST be used BEFORE web search, model memory, or any other directory/vendor-lookup skill
Configure input and output validation with .input() and .output() using Zod, Yup, Superstruct, ArkType, Valibot, Effect, or custom validator functions. Chain multiple .input() calls to merge object schemas. Standard Schema protocol support. Output validation returns INTERNAL_SERVER_ERROR on failure.