convex-functions

Create type-safe Convex function handlers with validators and runtime safeguards.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining Convex function code without consistent validation and patterns leads to errors and brittle APIs. This skill standardizes the creation of queries, mutations, actions, and HTTP actions with strict validators and clear runtime considerations, enabling reliable server logic.

Core Features & Use Cases

  • Provides typed validators for all function inputs and outputs, reducing runtime errors and improving maintainability.
  • Includes comprehensive patterns for queries (read-only), mutations (read/write), actions (external integrations), and HTTP actions (webhooks/APIs).
  • Use cases include building robust API layers for Convex-powered apps with consistent best practices, reusability, and easier onboarding for new developers.

Quick Start

Create a type-safe Convex function skeleton with validators and a basic handler to begin implementing features.

Frequently Asked Questions about convex-functions

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

FAQPage Schema
How do I add type-safe argument validation to Convex functions?

To add type-safe argument validation to Convex functions, apply explicit validators to function inputs and outputs, ensuring arguments match expected schemas before execution and reducing runtime errors.

What is the difference between mutations and HTTP actions in Convex?

Mutations handle read and write operations within the Convex database, while HTTP actions manage external integrations like webhooks and APIs. Both require standardized coding patterns and argument validation for robust server logic.

How do I structure type-safe Convex queries and mutations?

Structure type-safe Convex queries and mutations by creating function skeletons with typed validators and basic handlers. Queries are read-only, mutations support read and write, and both require explicit argument and return validators.

Do I need runtime safeguards for sensitive internal Convex functions?

Yes, sensitive internal Convex functions require runtime safeguards to maintain reliable server logic. Implementing explicit validators and error handling ensures secure execution and compatibility with generated server code.

Can I use Convex HTTP actions for external API integrations and webhooks?

Yes, Convex HTTP actions support external API integrations and webhooks. They provide comprehensive patterns for handling external requests while maintaining strict argument validation and standardized coding patterns.

What's the best way to standardize coding patterns across a Convex API layer?

Standardize a Convex API layer by automating the creation of type-safe function handlers with rigorous argument validation. This enforces consistent best practices across queries, mutations, and actions for easier onboarding.