convex

convex is a skill for Claude Code from PolarCoding85/convex-agent-skillz. It costs 203 tokens per session (2,093 once invoked), scanned A, original, MIT.

A development guide for Convex, a backend platform where TypeScript functions read and change data, run external work, and define scheduled tasks. It covers database schemas, authentication, file storage, search, and Next.js integration.

In plain words
What is it for?
Use it to build Convex queries, mutations, actions, HTTP endpoints, schemas, scheduled jobs, storage, search, and Next.js integrations.
Why use it?
It helps you choose the correct kind of backend function and avoid restrictions such as making network requests from database reads and writes.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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.

agentmods
npx agentmods add skills/polarcoding85/convex-agent-skillz/convex-skill
Any agent
npx skills add PolarCoding85/convex-agent-skillz --skill convex-skill
Clone the repo
git clone --depth 1 https://github.com/PolarCoding85/convex-agent-skillz

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/polarcoding85/convex-agent-skillz/convex-skill.svg)](https://agentmods.dev/skills/polarcoding85/convex-agent-skillz/convex-skill)
Your own site
<a href="https://agentmods.dev/skills/polarcoding85/convex-agent-skillz/convex-skill"><img src="https://agentmods.dev/badge/skills/polarcoding85/convex-agent-skillz/convex-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 203 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,093 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00203 $0.02093
Opus 5 $0.00102 $0.01046
Sonnet 5 $0.00041 $0.00419
Haiku 4.5 $0.00020 $0.00209

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

Security

Grade A, and why

convex scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/convex-skill/SKILL.md · 233 lines

How it starts

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

Convex Backend Development

Core Architecture

Convex is a reactive database where queries are TypeScript functions. The sync engine (queries + mutations + database) is the heart of Convex — center your app around it.

Function Types

Type DB Access Deterministic Cached/Reactive Use For
query Read only Yes Yes All reads, subscriptions
mutation Read/Write Yes No All writes (transactions)
action Via ctx.run* No No External APIs, LLMs, email
httpAction Via ctx.run* No No Webhooks, custom HTTP

Key rule: Queries and mutations cannot make network requests. Actions cannot directly access the database.

Project Structure (Best Practice)

convex/
├── _generated/         # Auto-generated types (commit this)
├── schema.ts           # Database schema
├── model/              # Helper functions (most logic lives here)
│   ├── users.ts
│   └── messages.ts
├── users.ts            # Thin wrappers exposing public API
├── messages.ts
├── crons.ts            # Cron job definitions
└── http.ts             # HTTP action routes

Essential Patterns

1. Function Structure

// convex/messages.ts
import { query, mutation, internalMutation } from './_generated/server';
import { internal } from './_generated/api';
import { v } from 'convex/values';

// PUBLIC query with validators (always validate public functions)
export const list = query({
  args: { channelId: v.id('channels') },
  handler: async (ctx, { channelId }) => {
    return await ctx.db
      .query('messages')
      .withIndex('by_channel', (q) => q.eq('channelId', channelId))
      .order('desc')
      .take(50);
  }
});

// PUBLIC mutation with validators and auth check
export const send = mutation({
  args: { channelId: v.id('channels'), body: v.string() },
  handler: async (ctx, { channelId, body }) => {
    const user = await ctx.auth.getUserIdentity();
    if (!user) throw new Error('Unauthorized');

    await ctx.db.insert('messages', {
      channelId,
      body,
      authorId: user.subject
    });
  }
});

// INTERNAL mutation (for scheduling, crons, actions)
export const deleteOld = internalMutation({
  args: { before: v.number() },
  handler: async (ctx, { before }) => {
    const old = await ctx.db
      .query('messages')
      .withIndex('by_createdAt', (q) => q.lt('_creationTime', before))
      .take(100);
    for (const msg of old) {
      await ctx.db.delete(msg._id);
    }
  }
});

Read the full file on GitHub · 233 lines

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. 6d ago First seen · 233 lines · 203 tokens per session scan A c6f595f70433

Subscribe to this mod's changes

convex is a skill published in the GitHub repository PolarCoding85/convex-agent-skillz (17 stars, last pushed 6mo ago), licensed MIT. It adds 203 tokens to every session and 2,093 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.