function-creator

Create secure, type-safe Convex queries, mutations, and actions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of secure, type-safe Convex backend functions and API endpoints to prevent authentication, authorization, validation, and transactional mistakes that cause runtime errors or security vulnerabilities.

Core Features & Use Cases

  • Structured Function Templates: Ready patterns and examples for queries, mutations, actions, and internal functions with explicit argument and return validators.
  • Security and Reliability: Enforces authentication checks, authorization/ownership checks, error handling, indexed queries, transactional semantics for mutations, and clear separation for Node.js actions using "use node".
  • Use Case: Build a task management backend that securely reads user tasks, performs transactional updates, and triggers external notifications from Node-only actions.

Quick Start

Create a Convex function that validates input arguments, verifies the caller's identity, checks resource authorization, and then performs the appropriate read or write operation with proper error handling.

Frequently Asked Questions about function-creator

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

FAQPage Schema
How do I create secure Convex backend functions with type-safe validation?

To create secure Convex backend functions, you define queries, mutations, and actions using explicit argument and return validators. This enforces type safety and prevents runtime errors by ensuring all input and output data strictly matches your schema.

How do I add authentication and authorization checks to Convex mutations?

Adding authentication and authorization checks to Convex mutations involves verifying the caller's identity first, then checking resource ownership before performing transactional updates. This secures write operations and prevents unauthorized data modifications.

When should I use Convex actions instead of queries or mutations?

Use Convex actions when you need to trigger external notifications or access Node-only APIs. Actions support "use node" behavior for external operations, whereas queries handle read-only data fetching and mutations manage transactional database writes.

Does the function-creator Skill support scheduled internal jobs in Convex?

Yes, the function-creator Skill supports scheduled internal jobs in Convex. It provides structured templates for internal functions, allowing you to automate recurring backend tasks with the same type-safe validation and security checks as standard functions.

What is the best way to enforce transactional behavior in Convex backend functions?

The best way to enforce transactional behavior in Convex backend functions is to use structured mutation templates. These templates ensure that transactional updates are performed safely, preventing partial writes and maintaining database reliability during complex operations.

Can I use Node.js external APIs in Convex queries and mutations?

No, Node.js external APIs are reserved for Convex actions. You must clearly separate Node-enabled external actions using "use node" from read-only queries and transactional mutations to maintain proper backend function architecture and security.