convex-functions

Automate building and validating Convex queries, mutations, actions, and HTTP actions.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/NitzanSelwyn/MomentumTrackerAdmin --skill convex-functions-nitzanselwyn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-functions
Source: https://github.com/NitzanSelwyn/MomentumTrackerAdmin/tree/main/.claude/skills/Convex%20Functions
Command: npx skills add https://github.com/NitzanSelwyn/MomentumTrackerAdmin --skill convex-functions-nitzanselwyn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex Functions provides a structured, type-safe way to implement server-side logic using queries, mutations, actions, and HTTP actions, with built-in argument validation, error handling, internal helpers, and runtime considerations.

Core Features & Use Cases

  • Supports queries, mutations, actions, HTTP actions, and internal functions with clear validation patterns and error handling.
  • Enables clean separation of concerns: data access via queries, mutations for writes, external integrations via actions, and webhooks via HTTP actions.
  • Use cases include building backends that expose data through queries, modify state via mutations, integrate with external services via actions, and expose HTTP endpoints.

Quick Start

Define a minimal convex function file with a sample query and mutation to validate basic end-to-end flow.

Frequently Asked Questions about convex-functions

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

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

Convex server functions require explicit validators for arguments and returns to ensure runtime correctness. You define validation schemas directly in the function definition to secure data access, mutations, and actions against invalid inputs.

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

Convex queries handle read-only data access, mutations manage state writes, and actions execute business logic or external API calls. HTTP actions specifically expose webhooks and HTTP endpoints for external integrations.

How do I handle errors in Convex HTTP actions and internal functions?

Convex HTTP actions and internal functions require proper error handling patterns to manage runtime failures. Consistent use of internal functions for sensitive operations ensures errors are caught securely without exposing backend logic.

Do I need to write separate validators for Convex function arguments and returns?

Yes, Convex functions require explicit validators for both arguments and returns. This enforces type safety and runtime correctness across backend services, preventing invalid data from entering or leaving your queries and mutations.

When should I use internal functions instead of public Convex queries and mutations?

Internal functions should be used for sensitive operations and secure business logic. Separating them from public queries and mutations protects backend data access and prevents unauthorized external calls from bypassing validation.

Can I use Convex actions to call external APIs and schedule tasks?

Yes, Convex actions manage external API calls, business logic, and scheduling. They integrate with external services while maintaining robust argument validation and error handling for secure runtime execution.