convex-conventions

Standardize Convex backend functions with explicit return typing and naming conventions.

18|Updated Jul 23, 2025
One-click install
npx skills add https://github.com/faw01/create-mf2-app --skill convex-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-conventions
Source: https://github.com/faw01/create-mf2-app/tree/main/apps/cli/template/.agents/skills/convex-conventions
Command: npx skills add https://github.com/faw01/create-mf2-app --skill convex-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of maintaining type safety and architectural consistency in Convex-based monorepos, specifically preventing circular inference issues and runtime errors in backend functions.

Core Features & Use Cases

  • Circular Inference Prevention: Provides strict guidelines for breaking TypeScript cycles when actions call back into their own deployment.
  • Auth & Context Management: Defines standardized patterns for user identity, organization context, and database access within queries, mutations, and actions.
  • Development Workflow: Offers best practices for local development, codegen, and testing without requiring active cloud deployments.

Quick Start

Apply the convex-conventions guidelines to your current backend module to ensure type safety and correct function implementation.

Frequently Asked Questions about convex-conventions

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

FAQPage Schema
How do I prevent circular inference issues in Convex backend functions?

To prevent circular inference in Convex backend functions, apply strict guidelines for breaking TypeScript cycles when actions call back into their own deployment. This ensures architectural integrity and type safety within monorepos.

What are the best practices for standardizing type safety in a Convex monorepo?

Standardizing type safety in a Convex monorepo requires explicit return typing for queries, mutations, and actions, alongside proper context handling for database operations. These conventions prevent runtime errors and maintain consistency.

How do I manage auth and database context in Convex mutations and actions?

Managing auth and database context in Convex mutations requires standardized patterns for user identity, organization context, and database access. Proper context handling ensures secure and consistent database operations across functions.

Can I develop and test Convex backend functions locally without an active cloud deployment?

Yes, you can develop and test Convex backend functions locally without an active cloud deployment. The conventions offer best practices for local development workflows, codegen, and testing to ensure type safety offline.

Why do I need explicit return typing for Convex queries and mutations?

Explicit return typing for Convex queries and mutations is required to ensure type safety and architectural integrity. It prevents circular inference issues and runtime errors by enforcing strict TypeScript boundaries within the monorepo.