convex-functions

Build validated Convex functions with typed validators and error handling.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Yahia89/ordering-food --skill convex-functions-yahia89
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-functions
Source: https://github.com/Yahia89/ordering-food/tree/main/.claude/skills/convex-functions
Command: npx skills add https://github.com/Yahia89/ordering-food --skill convex-functions-yahia89

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing robust backends with validated Convex functions including queries, mutations, actions, and HTTP actions, while ensuring proper error handling and clear separation of concerns.

Core Features & Use Cases

  • Typed argument validators for all function types (query, mutation, action, HTTP action)
  • Distinct execution contexts for internal/private logic, public functions, and scheduling
  • End-to-end guidance with examples for data access, external integrations, and error handling
  • Best practices and linting guidance for producing reliable, maintainable Convex code

Quick Start

Define a simple validated query with a handler and test it via a Convex client.

Frequently Asked Questions about convex-functions

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

FAQPage Schema
How do I write validated Convex functions for queries and mutations?

Validated Convex functions use typed argument validators for queries and mutations to enforce input shapes before execution. This approach separates validation, error handling, and internal versus public logic to ensure maintainable serverless backend code.

What is the best way to structure error handling in Convex actions?

Error handling in Convex actions is best structured by maintaining a clear separation of concerns between internal logic and public functions. Applying explicit typed returns and distinct execution contexts ensures reliable API integration and data access.

Can I use typed argument validators for HTTP actions in Convex?

Yes, typed argument validators apply to all Convex function types including HTTP actions. They enforce strict input validation across data access layers, external integrations, and business rules to prevent runtime errors.

How does Convex separate internal private logic from public functions?

Convex separates internal private logic from public functions by defining distinct execution contexts. This isolation ensures that validated mutations and actions handle business rules securely without exposing sensitive data access pathways.

When do I need to use explicit returns in Convex serverless logic?

Explicit returns are needed in Convex serverless logic whenever defining queries, mutations, or actions to guarantee predictable function outputs. Combining explicit returns with typed validators produces reliable, maintainable backend code.