From convex-dev
Create a new Convex mutation function with proper validators and auth
How this command is triggered — by the user, by Claude, or both
Slash command
/convex-dev:convex-mutationThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Create Convex Mutation Create a new Convex mutation function following best practices: 1. Use the new function syntax with `mutation` from "./_generated/server" 2. Include argument validators using `v` from "convex/values" 3. Include return validators (use `v.null()` if no return) 4. Add authentication check if needed using `getAuthUserId` 5. Use proper TypeScript types with `Id<>` and `Doc<>` The mutation should be for: $ARGUMENTS Follow these rules: - ALWAYS include `args` and `returns` validators - Check authentication with `getAuthUserId` for protected mutations - Use `ctx.db.inse...
Create a new Convex mutation function following best practices:
mutation from "./_generated/server"v from "convex/values"v.null() if no return)getAuthUserIdId<> and Doc<>The mutation should be for: $ARGUMENTS
Follow these rules:
args and returns validatorsgetAuthUserId for protected mutationsctx.db.insert(), ctx.db.patch(), ctx.db.replace(), or ctx.db.delete()null explicitly if the function doesn't return a valuenpx claudepluginhub astersnake/convex-claude-plugin --plugin convex-dev/d1-create-migrationGuides interactive creation of Cloudflare D1 migrations, generating validated SQL files for adding tables, modifying schemas, indexes, data changes, or custom SQL.
/do-migrateInteractively manages Cloudflare Durable Objects migrations: create new classes, rename, delete, or transfer with validation, auto-tagging, and config backup.
/migrationGenerates timestamped up/down migration files for PostgreSQL, MySQL, SQLite, MongoDB using SQL or ORM, with run instructions and testing guidance.
/myco-anamorphDrafts canon schema migration to <new-version> via anamorph subagent: partial upgraders, tests, schema delta, migration guide. Requires governing craft path; stops before _canon.yaml update.
/d1-migrationManages Cloudflare D1 migrations: generate from schema changes, apply pending (local/remote), fix stuck ones, or check status.
/create-migrationGenerates up/down database migration files for schema changes using detected tool (Prisma, Django, Rails, etc.). Adds constraints, indexes, data logic; validates, saves to migrations dir, previews SQL.