convex-functions

Build Convex functions with typed validators and error handling.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/rieckt/create-loumi-app --skill convex-functions-rieckt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-functions
Source: https://github.com/rieckt/create-loumi-app/tree/main/template/skills/convex/convex-functions
Command: npx skills add https://github.com/rieckt/create-loumi-app --skill convex-functions-rieckt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex server-side functions require consistent input validation, reliable error handling, and clear separation of concerns across queries, mutations, actions, and HTTP actions. This skill provides practical patterns and examples to implement these safely and predictably.

Core Features & Use Cases

  • Typed validators: Show how to declare inputs for all function types (query, mutation, action, http action) using convex/values validators.
  • Security & reliability patterns: Demonstrates error handling, internal functions for sensitive logic, and correct use of internal mutations.
  • Use cases: Typical back-end tasks such as reading, writing, external API calls, and scheduling.

Quick Start

Create sample query, mutation, and action files with explicit validators and error handling.

Frequently Asked Questions about convex-functions

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

FAQPage Schema
How do I add input validation to Convex server functions?

You add input validation to Convex server functions by declaring explicit typed validators from convex/values for queries, mutations, actions, and HTTP actions. This provides structured data access and reliable execution.

What is the best way to handle errors in Convex mutations and actions?

Handle errors in Convex mutations and actions by applying safe error handling patterns and using internal functions for sensitive logic. This approach separates concerns and maintains reliability across backend operations.

Does Convex support external API calls and scheduled tasks?

Yes, Convex supports external API calls and scheduled tasks through its server-side action and HTTP action functions. Using typed validators and safe error handling ensures these external operations execute securely and predictably.

Do I need TypeScript to write Convex queries and mutations?

Yes, you need TypeScript definitions to write Convex queries and mutations effectively. Standard Convex tooling requires explicit TypeScript validators and typed returns for all function types to ensure safe server-side execution.

When should I use internal mutations in Convex?

Use internal mutations in Convex when executing sensitive logic that should not be directly exposed to the client. This security pattern ensures reliable separation of concerns and protects structured backend data access.