convex-patterns

Organize Convex queries, mutations, actions, auth, and testing patterns.

7|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/planetaryescape/blah.chat --skill convex-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-patterns
Source: https://github.com/planetaryescape/blah.chat/tree/main/.claude/skills/convex-patterns
Command: npx skills add https://github.com/planetaryescape/blah.chat --skill convex-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexity and fragmentation of building large Convex backends by providing a cohesive set of architectural patterns. It guides you on organizing queries, mutations, and actions, implementing robust authentication, and adopting resilient generation practices to ensure progress even during long-running tasks.

Core Features & Use Cases

  • Standardized Query/Mutation/Action patterns for real-time Convex apps
  • TypeScript recursion workarounds via internal helpers to avoid depth limits
  • Auth patterns to reliably fetch or create the current user in mutations and actions
  • Normalized schema guidance and indexing strategies for scalable data models
  • Resilient generation patterns with long-running actions and DB-persisted state
  • Testing patterns and utilities to validate Convex workflows

Quick Start

Review the convex-patterns documentation and start refactoring your project to reuse the provided patterns. Begin by extracting authentication and helper logic into internal queries and using actions for long-running tasks, ensuring DB persistence for resilience.

Frequently Asked Questions about convex-patterns

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

FAQPage Schema
How do I organize Convex queries, mutations, and actions for a scalable backend?

To build a scalable Convex backend, use standardized patterns for organizing queries, mutations, and actions. This approach enforces internal helpers, normalized schemas, and indexing strategies to manage large projects effectively.

How do I work around TypeScript recursion depth limits in Convex?

To bypass TypeScript recursion depth limits in Convex, use internal helper functions. Extracting logic into internal queries prevents deep call stacks while maintaining complex recursive workflows.

What is the best way to fetch or create the current user in Convex mutations and actions?

The best way to fetch or create the current user in Convex mutations and actions is using standardized authentication patterns. These helpers reliably manage user identity retrieval and creation during database operations.

How do I make long-running Convex actions resilient to interruptions?

Make long-running Convex actions resilient by adopting generation patterns with DB-persisted state. This technique ensures progress is saved to the database, allowing tasks to recover despite interruptions.

When should I normalize my Convex schema and add indexing strategies?

Normalize your Convex schema and add indexing strategies when building scalable real-time applications. This data modeling approach ensures efficient data retrieval and maintains performance as your project grows.