convex-core

Guide Convex development with function syntax, validators, schema, and query patterns.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/Geolize/convex-skills --skill convex-core-geolize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-core
Source: https://github.com/Geolize/convex-skills/tree/main/skills/convex-core
Command: npx skills add https://github.com/Geolize/convex-skills --skill convex-core-geolize

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and best practices for core Convex development, ensuring efficient and robust application building.

Core Features & Use Cases

  • Function Syntax: Enforces the correct, modern syntax for queries, mutations, and actions with validators.
  • Schema & Indexing: Guides defining database schemas and optimizing queries with proper indexing.
  • Query & Mutation Patterns: Demonstrates best practices for data retrieval and manipulation.
  • Use Case: When building a new feature that requires fetching user data and then updating a message, this Skill ensures you use the correct query and mutation patterns with appropriate validators and indexing for performance.

Quick Start

Use the convex-core skill to define a new user table with an email index.

Frequently Asked Questions about convex-core

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

FAQPage Schema
How do I define a database schema with indexes in Convex?

To define a Convex database schema, use the `defineTable` function and chain `.index()` fields to specify indexed columns. This enforces data validation and optimizes query performance by allowing efficient data retrieval patterns.

What is the correct syntax for Convex queries and mutations with validators?

Convex queries and mutations use the `query` and `mutation` functions, passing an arguments object with `args` for input validation. Validators ensure type safety at runtime, enforcing correct data shapes for optimal performance and maintainability.

How do I optimize Convex queries using withIndex?

Optimize Convex queries by chaining `.withIndex()` to the database query builder, passing the index name and a filter expression. This leverages database indexes to retrieve data efficiently instead of scanning full tables.

When should I use validators in my Convex functions?

Use validators in Convex functions whenever accepting arguments to enforce runtime type checking and data integrity. They prevent invalid data from entering your database and ensure your queries and mutations process correctly typed inputs.

Does this Skill cover best practices for convex TypeScript files?

Yes, this Skill provides comprehensive guidelines specifically for `convex/**/*.ts` files. It ensures adherence to Convex's recommended patterns for function syntax, schema definition, and database operations to achieve optimal performance.