Back to list
ricardofelixb

convex-best-practices

by ricardofelixb

0🍴 0📅 Jan 19, 2026

SKILL.md


name: convex-best-practices description: Convex development guidelines and best practices. Use when writing Convex functions, queries, mutations, schemas, or reviewing Convex code. Triggers on tasks involving Convex backend development, real-time data, or database operations. metadata: author: convex version: '1.0.0'

Convex Best Practices

Comprehensive guidelines for building production-ready Convex applications covering function organization, query patterns, validation, TypeScript usage, error handling, and the Zen of Convex design philosophy.

When to Apply

Reference these guidelines when:

  • Writing new Convex functions (queries, mutations, actions)
  • Designing database schemas
  • Implementing real-time data patterns
  • Reviewing Convex code for performance issues
  • Setting up cron jobs or HTTP endpoints
  • Handling file storage

Documentation Sources

Fetch latest documentation before implementing:

Available Guides

GuideDescription
convex-best-practices.mdCore patterns and Zen of Convex
convex-functions.mdQuery, mutation, action patterns
convex-schema-validator.mdSchema and validation patterns
convex-realtime.mdReal-time subscription patterns
convex-http-actions.mdHTTP endpoint patterns
convex-cron-jobs.mdScheduled job patterns
convex-file-storage.mdFile upload/storage patterns
convex-migrations.mdDatabase migration strategies
convex-security-audit.mdSecurity review checklist
convex-agents.mdAI agent integration patterns

Quick Reference

The Zen of Convex

  1. Convex manages the hard parts - Let Convex handle caching, real-time sync, and consistency
  2. Functions are the API - Design your functions as your application's interface
  3. Schema is truth - Define your data model explicitly in schema.ts
  4. TypeScript everywhere - Leverage end-to-end type safety
  5. Queries are reactive - Think in terms of subscriptions, not requests

Key Patterns

  • Always define returns validators for functions
  • Use indexes with withIndex() instead of filter()
  • Make mutations idempotent to handle retries
  • Use ConvexError for user-facing errors
  • Organize functions by domain (users.ts, tasks.ts)

How to Use

Read individual guide files for detailed explanations:

convex-best-practices/convex-functions.md
convex-best-practices/convex-schema-validator.md
convex-best-practices/convex-realtime.md

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon