function-creator

Generate Convex queries, mutations, and actions with validation and authentication.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/sadroad/.dotfiles --skill function-creator-sadroad
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: function-creator
Source: https://github.com/sadroad/.dotfiles/tree/main/modules/home-manager/opencode/skills/function-creator
Command: npx skills add https://github.com/sadroad/.dotfiles --skill function-creator-sadroad

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the creation of secure, type-safe Convex functions, ensuring adherence to best practices for API endpoints.

Core Features & Use Cases

  • Generate Queries: Create read-only functions for data retrieval.
  • Generate Mutations: Develop transactional write functions for data modification.
  • Generate Actions: Build functions for external API calls and non-transactional tasks, including Node.js integration.
  • Use Case: When you need to add a new endpoint to your Convex backend to fetch user profiles or update task statuses, this Skill provides the boilerplate and guidance.

Quick Start

Use the function-creator skill to generate a new Convex query function named 'getUserProfile' that accepts a 'userId' argument.

Frequently Asked Questions about function-creator

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

FAQPage Schema
How do I create type-safe Convex functions for my backend API?▼

Create type-safe Convex functions by generating queries, mutations, and actions with built-in validation. This enforces TypeScript best practices for secure API endpoint development and automatically includes error handling.

What is the difference between Convex mutations and actions for external API calls?▼

Convex mutations are transactional write functions for modifying data, while actions handle non-transactional tasks and external API calls. Actions support Node.js integration for processes extending beyond the core database operations.

How do I add authentication and validation to a Convex query?▼

Add authentication and validation to a Convex query by using a generation tool that bakes these practices into the boilerplate. This ensures secure, type-safe data retrieval endpoints without manual configuration overhead.

Can I generate boilerplate for Convex actions that integrate with Node.js?▼

Yes, you can generate Convex actions designed for external API calls and non-transactional tasks. These generated functions include built-in Node.js integration, validation, and error handling for robust backend operations.

What's the best way to enforce error handling in Convex mutations?▼

Enforce error handling in Convex mutations by generating the functions with built-in best practices. This approach provides transactional write functions with type safety and secure error management out of the box.

When do I need to use a Convex action instead of a query?▼

Use a Convex action instead of a query when you need to perform non-transactional tasks or external API calls. Queries are strictly for read-only data retrieval, whereas actions handle complex logic and Node.js integration.