convex-backend

Implement Convex backend logic with TypeScript functions, schemas, and storage.

1|Updated Nov 9, 2024
One-click install
npx skills add https://github.com/marnec/ripple --skill convex-backend-marnec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-backend
Source: https://github.com/marnec/ripple/tree/main/.claude/skills/convex-backend
Command: npx skills add https://github.com/marnec/ripple --skill convex-backend-marnec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex backend development guidelines help teams write robust Convex backend components using TypeScript, covering functions, schemas, queries, mutations, actions, scheduling, and storage with best practices and safety patterns.

Core Features & Use Cases

  • Function Syntax and Validators: Use the canonical Convex builders (query, mutation, action, internal variants) with proper validators to ensure type safety.
  • Schema and Data Access: Define schemas with defineSchema and defineTable, leverage system fields, and apply indexed queries for performance.
  • End-to-End Backend Workflows: Cover scheduling, cron jobs, file storage, and safe interaction patterns between functions.
  • Use Case: When starting a new Convex project, apply these guidelines to implement consistent backend code.

Quick Start

Follow the Convex backend guidelines to implement a new query, mutation, or action using the standard validators and the public/internal function patterns.

Frequently Asked Questions about convex-backend

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

FAQPage Schema
How do I implement type-safe queries and mutations in a Convex backend?

To implement type-safe Convex backend functions, use canonical query and mutation builders with proper validators. This enforces strict data access patterns and ensures robust, scalable TypeScript backend logic across your project.

What is the best way to define schemas and handle data access in Convex?

Define schemas in Convex using defineSchema and defineTable, leveraging built-in system fields. Apply indexed queries for performance to ensure safe, efficient data access patterns within your backend functions.

Can I schedule tasks and run cron jobs using Convex backend functions?

Yes, you can schedule tasks and run cron jobs in Convex. The backend guidelines cover end-to-end workflows for scheduling, file storage, and establishing safe interaction patterns between public and internal functions.

When should I use internal versus public functions in a Convex backend?

Use internal functions for private backend logic and public functions for client-facing APIs. Applying the correct public and internal function patterns ensures safe data access and secure interaction between scheduled tasks and mutations.

Does Convex backend development require TypeScript for defining validators?

TypeScript is required for applying these Convex backend guidelines. Using TypeScript with canonical builders ensures proper validator enforcement, delivering type-safe schemas, queries, mutations, and actions throughout your project.