convex-development

Enforce type-safe Convex queries, mutations, and access control patterns.

Updated Jan 10, 2026
One-click install
npx skills add https://github.com/janekm/reviews --skill convex-development-janekm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-development
Source: https://github.com/janekm/reviews/tree/main/.claude/skills/convex-development
Command: npx skills add https://github.com/janekm/reviews --skill convex-development-janekm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides standardized Convex development patterns to ensure consistent, secure, and maintainable code when building queries, mutations, and actions.

Core Features & Use Cases

  • Function Syntax (REQUIRED): Use the new function syntax with explicit validators to enforce type-safety.
  • Return Validators: Always declare returns validators for all mutations and queries.
  • Query with Index: Prefer indexed queries over broad filters to optimize performance.
  • Authentication & Authorization: Use getCurrentUser pattern and role checks for protected mutations.
  • Computed Fields & Activity Tracking: Extend query results with computed fields and record user activity.
  • Anti-Patterns & Best Practices: Avoid common mistakes such as missing returns or ad-hoc casting.

Quick Start

Use the Convex development patterns in this skill to start implementing a new protected endpoint, e.g., a mutation adding an item with proper validators and an index-based query.

Frequently Asked Questions about convex-development

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

FAQPage Schema
How do I enforce type-safe queries and mutations in Convex?▼

Use the required function syntax with explicit validators for arguments and returns. This enforces type-safety in Convex by validating schemas and preventing runtime errors caused by invalid inputs or outputs.

What is the best way to handle authorization in Convex mutations?▼

Use the getCurrentUser pattern combined with hasMinRole checks. This standardizes access control for protected mutations, ensuring only authorized users execute sensitive Convex operations.

How do I optimize Convex queries for better performance?▼

Prefer indexed queries over broad filters. Using index-based queries in Convex ensures efficient data retrieval and improves overall performance as your database scales.

Do I need to declare return validators for all Convex functions?▼

Yes, declaring explicit returns validators for all Convex mutations and queries is required. This enforces type-safety and prevents anti-patterns like missing returns or ad-hoc casting.

Why should I avoid ad-hoc casting in Convex development?▼

Ad-hoc casting bypasses type-safety and leads to runtime errors. Using explicit validators and standardized patterns ensures computed fields and activity tracking remain secure and maintainable.

Can I refactor existing authorization flows to use Convex best practices?▼

Yes, you can refactor existing authorization flows using the getCurrentUser pattern and role checks. This standardizes access control and ensures protected mutations follow safe Convex development patterns.