convex-schema-validator

Define and validate Convex database schemas with defineSchema and defineTable.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/humaie-dev/csv-detox --skill convex-schema-validator-humaie-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-schema-validator
Source: https://github.com/humaie-dev/csv-detox/tree/main/.agents/skills/convex-schema-validator
Command: npx skills add https://github.com/humaie-dev/csv-detox --skill convex-schema-validator-humaie-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables teams to define and enforce precise Convex database schemas, ensuring type-safe data models, consistent migrations, and reliable query behavior across projects.

Core Features & Use Cases

  • Schema definition with defineSchema and defineTable to express tables, fields, optionality, and complex types (including unions and discriminated unions).
  • Index and migration guidance to maintain performance and data integrity during schema changes.
  • Validation workflows and practical examples for real-world Convex applications.

Quick Start

Define a basic Convex schema and run the validator to confirm types, indexes, and migration rules before deploying.

Frequently Asked Questions about convex-schema-validator

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

FAQPage Schema
How do I define and validate a Convex database schema with TypeScript?

You can validate a Convex schema by using defineSchema and defineTable to express fields, optionality, and complex types. This process ensures correct typing, indexing, and migration rules before you deploy.

How does Convex handle schema migrations when changing data models?

Convex schema migrations maintain data integrity during schema changes by applying validation workflows. This ensures consistent migrations and reliable query behavior when you modify tables, indexes, or optional fields.

Can I use discriminated unions and nullable fields in a Convex schema?

Yes, Convex schemas support complex types including discriminated unions, optional, and nullable fields. Defining these with defineTable ensures type-safe data models and reliable query behavior across your project.

What is the best way to configure indexes in a Convex database schema?

The best way to configure indexes is during schema definition using defineTable. Proper index configuration maintains query performance and data integrity, which the validator checks before deployment.

Why does my Convex schema validation fail when adding optional fields?

Convex schema validation may fail if optional or nullable fields are not properly defined within defineTable. Applying the correct validation workflows ensures type-safe data modeling and prevents migration issues.