convex-expert
What it does
This skill is a Convex specialist for code in the convex folder. It is for builders who want backend code that follows the platform's rules and avoids common mistakes.
When to use it
- βWhen you are writing or editing functions, schemas or indexes in a Convex project.
- βWhen you add HTTP endpoints, scheduled jobs or file storage to a Convex app.
- βWhen you need an AI chat or multi-step workflow built on Convex.
Skill link
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-expert/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βAdd a table for tasks with a function that lists each user's tasks in my Convex app.β
5 new skills a week. 1 minute to read.
How it works
The agent reads the existing schema first, writes functions in the required format with checks on inputs and outputs, uses indexes for lookups, and confirms the code deploys without errors.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
FAQ
Why does the skill read the schema first?
So new code matches the data that already exists in the project.
What rules does it follow?
It uses indexes for reads, keeps functions internal unless a client needs them, and requires input and output checks.
Does the project need to be set up first?
Yes. It works on code inside a Convex project, so the project should already exist.
Details
Original description by the author
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, resource limits, and component ecosystem that generic Claude routinely gets wrong.
repo: openclaw/clawhub
Popularity
- GitHub stars
- 9.5k
- Ranking position
- #12244
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
axiom-alerting
9.5kHelps your agent create and manage Axiom monitors and notification routes through the Axiom API, and check that alerts behave as expected.
axiom-sre
9.5kHelps your agent investigate production incidents and bugs step by step, testing each guess against Axiom logs before drawing a conclusion.
building-dashboards
9.5kHelps your agent design Axiom dashboards with fitting charts, queries and filters, starting from the decisions the dashboard must support.
controlling-costs
9.5kHelps your agent find unused data in Axiom and build dashboards and monitors that track and cut logging costs.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.