convex-functions

Develop Convex queries, mutations, actions, and HTTP actions with validation.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/mihaicrisan04/zalem --skill convex-functions-mihaicrisan04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-functions
Source: https://github.com/mihaicrisan04/zalem/tree/main/.agents/skills/convex-functions
Command: npx skills add https://github.com/mihaicrisan04/zalem --skill convex-functions-mihaicrisan04

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to developing secure, efficient, and well-validated functions within the Convex framework, enabling developers to build robust backend logic.

Core Features & Use Cases

  • Function Types: Understand and implement Queries, Mutations, Actions, and HTTP Actions for various backend needs.
  • Validation & Error Handling: Learn to use convex/values for robust argument validation and ConvexError for clear error reporting.
  • Use Case: Build a real-time chat application by implementing mutations to send messages, queries to fetch message history, and actions to integrate with external notification services.

Quick Start

Use the convex-functions skill to create a mutation that inserts a new task into the database.

Frequently Asked Questions about convex-functions

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

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

Convex queries fetch data, mutations modify database state, and actions handle external integrations or scheduled tasks. This Skill guides you through implementing each function type with strict argument validation and error handling.

How do I validate arguments in Convex functions?

You validate arguments in Convex functions using the convex/values library for strict type checking. This Skill demonstrates how to implement robust validation alongside ConvexError for clear error reporting and secure backend logic.

Can I use Convex functions to build HTTP endpoints?

Yes, you can implement HTTP actions to expose Convex functions as HTTP endpoints. This Skill covers creating HTTP actions to handle external requests, enabling integrations like real-time chat notifications or webhook processing.

How do I handle errors in Convex mutations and actions?

You handle errors in Convex mutations and actions by throwing ConvexError instances for clear runtime reporting. This Skill explains best practices for error handling and code quality across all backend function types.

Does Convex support scheduled tasks and internal functions?

Convex supports scheduled tasks and internal functions for secure backend logic implementation. This Skill details how to develop internal functions and manage scheduled tasks efficiently within the Convex framework.

What is the best way to structure a real-time backend with Convex?

The best way to structure a real-time backend with Convex is combining mutations for data insertion, queries for fetching history, and actions for external services. This Skill provides best practices for runtime considerations and robust operations.