convex-functions

Write Convex queries, mutations, actions, and HTTP actions with validators.

1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/blocknavi/convex-batch-processor --skill convex-functions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-functions
Source: https://github.com/blocknavi/convex-batch-processor/tree/main/.claude/skills/convex-functions
Command: npx skills add https://github.com/blocknavi/convex-batch-processor --skill convex-functions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers write Convex functions including queries, mutations, actions, and HTTP actions with proper argument validation and error handling.

Core Features & Use Cases

  • Query functions: reactive, read-only access with caching for efficient data retrieval.
  • Mutations: transactional write operations that modify the database.
  • Actions: external integrations that can call queries and mutations and run business logic.
  • HTTP Actions: handle webhooks and external HTTP requests within Convex workflows.
  • Internal Functions: use internal functions for sensitive or restricted logic to protect data and enforce security.

Quick Start

Create a sample function file that exposes a query, a mutation, and an action using Convex's builders; ensure you define argument and return validators and export handlers that implement the business logic, then test via your Convex app's generated API.

Frequently Asked Questions about convex-functions

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

FAQPage Schema
How do I write Convex functions with proper argument validation and error handling?

To write Convex functions with argument validation, define argument and return validators using Convex's builders, export handlers implementing business logic, and enforce internal functions for sensitive logic to protect data and handle errors.

What is the difference between Convex queries, mutations, and actions?

Convex queries provide reactive, read-only data retrieval with caching, mutations perform transactional write operations modifying the database, and actions handle external integrations by calling queries and mutations to run business logic.

How do I handle webhooks and external HTTP requests in a Convex serverless architecture?

Handle webhooks and external HTTP requests in Convex serverless architectures by implementing HTTP actions, which process external HTTP requests within your Convex workflows and integrate with external APIs.

When should I use internal functions for sensitive logic in Convex?

Use internal functions in Convex when implementing sensitive or restricted logic to protect data and enforce security, ensuring that critical business operations are not exposed directly through public API endpoints.

Do I need to define return validators for Convex mutation and query functions?

Yes, you need to define return validators for Convex mutation and query functions to ensure type safety, enforce proper argument validation, and maintain consistent error handling across serverless operations.