convex-database

Design Convex database schemas with indexes, validators, and reactive queries.

59|12|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/etylsarin/opencastle --skill convex-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-database
Source: https://github.com/etylsarin/opencastle/tree/main/src/orchestrator/plugins/convex
Command: npx skills add https://github.com/etylsarin/opencastle --skill convex-database

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex development introduces specialized patterns for schema design, reactive queries, transactional mutations, and side-effect handling that are easy to misuse without clear guidance. This Skill captures proven Convex best practices to prevent race conditions, incorrect use of actions versus mutations, and poor index or pagination design that can harm real-time performance and correctness.

Core Features & Use Cases

  • Schema-first patterns: guidance for defining tables, indexes, and validators to ensure consistent data models.
  • Reactive query and real-time patterns: recommendations for using queries, subscriptions, and paginated real-time feeds in web and mobile apps.
  • Transactional mutations and actions: rules for ACID mutations, using actions for side effects, and avoiding awaiting queries inside mutations.
  • Deployment and maintenance: CLI workflows for local development, deployment, data import/export, and schema migrations.
  • Use Case: Build a collaborative task tracker where users, projects, and tasks sync in real time, mutations remain transactional, and file uploads are handled by actions.

Quick Start

Ask the convex-database skill to design a Convex schema for a collaborative task app with users, projects, and tasks and provide queries and mutations for listing, creating, and updating tasks.

Frequently Asked Questions about convex-database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a reactive Convex database schema for a real-time app?

Design reactive Convex schemas by defining tables, indexes, and validators to ensure consistent data models for real-time web and mobile applications. This schema-first approach prevents race conditions and poor index design while maintaining reactive query performance.

When should I use Convex actions versus mutations for side effects?

Use Convex actions for side-effect handling and mutations for ACID transactional data writes. This separation prevents incorrect use of awaiting queries inside mutations, ensuring transactional correctness and avoiding race conditions in real-time applications.

What's the best way to implement paginated real-time queries in Convex?

Implement paginated real-time queries in Convex by using reactive query patterns and real-time subscriptions. This approach provides live data feeds for web and mobile apps without harming real-time performance caused by poor pagination design.

How do I deploy a Convex backend using the CLI?

Deploy a Convex backend using CLI workflows for local development, deployment, data import/export, and schema migrations. These CLI-driven deployment workflows maintain database consistency and manage schema updates across application environments.

Does Convex support transactional mutations for collaborative task tracking?

Convex supports transactional mutations for collaborative task tracking where users, projects, and tasks sync in real time. Mutations remain ACID-compliant while file uploads and other side effects are handled separately by actions.

Why do my Convex mutations cause race conditions during real-time updates?

Convex mutations cause race conditions when awaiting queries inside mutations or misusing actions versus mutations. Apply schema-first patterns with proper indexes and validators to ensure consistent, transactional data models and reactive query correctness.