convex-schema-validator

Define and validate Convex database schemas with strict typing and index configuration.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/not-ani/elevated-school-takehome --skill convex-schema-validator-not-ani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-schema-validator
Source: https://github.com/not-ani/elevated-school-takehome/tree/main/.agents/skills/convex-schema-validator
Command: npx skills add https://github.com/not-ani/elevated-school-takehome --skill convex-schema-validator-not-ani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex Schema Validator provides precise typing, robust index configuration, and clear migration guidance to prevent schema drift and data loss in Convex projects.

Core Features & Use Cases

  • Enforces strict typing for tables, fields, and relations in Convex schemas.
  • Supports index configuration and discriminated unions to optimize queries and data integrity.
  • Guides migrations, optional fields, and backfilling strategies to evolve schemas safely.

Quick Start

Create a sample convex/schema.ts based on the examples and run the validator to verify typing, index definitions, and migrations.

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 strict typing?

You validate a Convex schema by defining tables, fields, and relations with strict typing in a schema.ts file. This configuration enforces data structure, preventing schema drift and data loss in Convex projects.

How do I configure indexes in a Convex schema to optimize queries?

Configuring indexes in a Convex schema involves defining index configurations within your table definitions. This optimizes query performance and maintains data integrity when querying across fields like users and tasks.

What is the best way to handle schema migrations and backfills in Convex?

Handling Convex schema migrations involves applying strategies for adding new fields, backfilling data, and managing optional fields. This evolves schemas safely without losing data during structural changes.

Can I use discriminated unions and optional fields in Convex schemas?

Yes, you can use discriminated unions and optional fields in Convex schemas. The validator supports these features to optimize queries and ensure robust data integrity for flexible table definitions.

Why does my Convex schema validation fail when adding new fields to existing tables?

Convex schema validation may fail when adding new fields if proper migration and backfilling strategies are not applied. You must configure new fields as optional or provide backfills to evolve schemas safely without type errors.