convex-functions

convex-functions is a skill for Claude Code, Codex from waynesutton/convexskills. It costs 28 tokens per session (2,870 once invoked), scanned B, original, Apache-2.0.

Guidance for writing Convex functions, which are backend functions that read or change application data, call outside services, or handle web requests. It covers queries, mutations, actions, and HTTP actions with input checks and error handling.

In plain words
What is it for?
Use it when implementing or reviewing Convex database reads, data changes, external-service calls, or HTTP endpoints.
Why use it?
It helps avoid invalid inputs, unclear database operations, and runtime problems when building Convex backends.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the convexskills plugin — 14 skills shipped together

Good fit Use it when implementing or reviewing Convex database reads, data changes, external-service calls, or HTTP endpoints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/waynesutton/convexskills/convex-functions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add waynesutton/convexskills --skill convex-functions
Clone the repo
git clone --depth 1 https://github.com/waynesutton/convexskills

Made for: Claude Code, Codex.

Or install convexskills, the plugin that ships this one along with the rest of its 14 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for convex-functions

README.md
[![agentmods](https://agentmods.dev/badge/skills/waynesutton/convexskills/convex-functions/github.svg)](https://agentmods.dev/skills/waynesutton/convexskills/convex-functions)
Your own site
<a href="https://agentmods.dev/skills/waynesutton/convexskills/convex-functions"><img src="https://agentmods.dev/badge/skills/waynesutton/convexskills/convex-functions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for convex-functions

Your own site · 80×15
<a href="https://agentmods.dev/skills/waynesutton/convexskills/convex-functions"><img src="https://agentmods.dev/badge/skills/waynesutton/convexskills/convex-functions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,870 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk warn 17 Feb 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.02870
Opus 5 $0.00014 $0.01435
Sonnet 5 $0.00006 $0.00574
Haiku 4.5 $0.00003 $0.00287

Measured 9d ago against content hash e7a5debd1491, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

convex-functions scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

const response = await fetch("https://api.email.com/send", { method: "POST",
Origin

Copies of this mod

3 near-identical copies found in the catalogue:

skills/convex-functions/SKILL.md · 459 lines

How it starts

The opening of the file, as written. The whole thing — 459 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Convex Functions

Master Convex functions including queries, mutations, actions, and HTTP endpoints with proper validation, error handling, and runtime considerations.

Code Quality

All examples in this skill comply with @convex-dev/eslint-plugin rules:

  • Object syntax with handler property
  • Argument validators on all functions
  • Explicit table names in database operations

See the Code Quality section in convex-best-practices for linting setup.

Documentation Sources

Before implementing, do not assume; fetch the latest documentation:

Instructions

Function Types Overview

Type Database Access External APIs Caching Use Case
Query Read-only No Yes, reactive Fetching data
Mutation Read/Write No No Modifying data
Action Via runQuery/runMutation Yes No External integrations
HTTP Action Via runQuery/runMutation Yes No Webhooks, APIs

Queries

Queries are reactive, cached, and read-only:

import { query } from "./_generated/server";
import { v } from "convex/values";

export const getUser = query({
  args: { userId: v.id("users") },
  returns: v.union(
    v.object({
      _id: v.id("users"),
      _creationTime: v.number(),
      name: v.string(),
      email: v.string(),
    }),
    v.null(),
  ),
  handler: async (ctx, args) => {
    return await ctx.db.get("users", args.userId);
  },
});

// Query with index
export const listUserTasks = query({
  args: { userId: v.id("users") },
  returns: v.array(
    v.object({
      _id: v.id("tasks"),
      _creationTime: v.number(),
      title: v.string(),
      completed: v.boolean(),
    }),
  ),
  handler: async (ctx, args) => {
    return await ctx.db
      .query("tasks")
      .withIndex("by_user", (q) => q.eq("userId", args.userId))
      .order("desc")
      .collect();
  },
});

Read the full file on GitHub · 459 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 459 lines · 28 tokens per session scan B e7a5debd1491

Subscribe to this mod's changes

convex-functions is a skill published in the GitHub repository waynesutton/convexskills (404 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 28 tokens to every session and 2,870 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

convex-functions

Writing queries, mutations, actions, and HTTP actions with proper argument validation, error handling, internal functions, and runtime considerations.

J-StaR-Films-Studios/VibeCode-Protocol-Suite · 28 tokens

convex-http-actions

External API integration and webhook handling including HTTP endpoint routing, request/response handling, authentication, CORS configuration, and webhook signature validation.

J-StaR-Films-Studios/VibeCode-Protocol-Suite · 31 tokens

use-si-coder

Legacy one-shot full-stack auto-deploy monolith. Runs scripts/deploy.js to create a GitHub repo, push local code via SSH, set up a Dokploy project, configure self-hosted Convex (Docker Compose) + Next.js, wire Hostinger DNS, and trigger + poll the deployment — zero human steps. Superseded by the modular /sc- skills…

rahmanef63/si-coder-agent · 90 tokens

sc-n8n

Drive a user-configured self-hosted or cloud n8n instance through the official @n8n/cli. List, inspect, create, update, activate, and verify workflows; inspect executions; manage projects, tags, variables, data tables, and packages without assuming a specific server, deployment platform, or account.

rahmanef63/si-coder-agent · 70 tokens

sc-stripe

(STUB / NOT IMPLEMENTED YET) Stripe payments setup — create products/prices, webhook endpoint registration, customer portal config, restricted API keys. Pairs with sc-convex for payments table mutations and HTTP webhook routes.

rahmanef63/si-coder-agent · 52 tokens

sc-supabase

(STUB / NOT IMPLEMENTED YET) Supabase backend as an alternative to self-hosted Convex. Create project, apply migrations from supabase/migrations, deploy Edge Functions, generate types. For projects where Postgres + Row-Level-Security is a better fit than Convex's reactive query model.

rahmanef63/si-coder-agent · 67 tokens