convex-database

convex-database is a skill for Claude Code, Codex from monkilabs/opencastle. It costs 67 tokens per session (1,015 once invoked), scanned A, original, MIT.

Guidance for using Convex, a database and backend platform with queries, data-changing functions, scheduled work, and authentication. It covers schemas, migrations, real-time data, and performance limits.

In plain words
What is it for?
Use it to design Convex schemas, write queries and mutations, run actions, manage authentication and migrations, optimise performance, and create backend components.
Why use it?
It helps keep backend functions within Convex’s limits and avoids mistakes involving public access, validation, batching, indexes, and large data operations.

Skill for Claude CodeCodex

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/monkilabs/opencastle/convex
Any agent
npx skills add monkilabs/opencastle --skill convex
Clone the repo
git clone --depth 1 https://github.com/monkilabs/opencastle

Made for: Claude Code, Codex.

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-database

README.md
[![agentmods](https://agentmods.dev/badge/skills/monkilabs/opencastle/convex.svg)](https://agentmods.dev/skills/monkilabs/opencastle/convex)
Your own site
<a href="https://agentmods.dev/skills/monkilabs/opencastle/convex"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/convex.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,015 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 $0.00067 $0.01015
Opus 5 $0.00034 $0.00508
Sonnet 5 $0.00013 $0.00203
Haiku 4.5 $0.00007 $0.00102

Measured 5d ago against content hash 0049f396f3a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

convex-database 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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (config.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/orchestrator/plugins/convex/SKILL.md · 79 lines

How it starts

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

Convex Database

Project-specific schema, functions, and deployment details: database-config.md. Official docs: https://docs.convex.dev/

Hard limits per transaction

Exceeding one of these fails the transaction, so design against them rather than discovering them:

Limit Value
Query/mutation execution time 1 second (your code only, excludes DB operations)
Action execution time 10 minutes
Data read / written 16 MiB each
Documents scanned 32,000 — includes documents .filter() discards
Index ranges read 4,096 (each db.get and db.query counts)
Documents written 16,000
Function return value 16 MiB

Batch anything larger into a cursor-based self-scheduling internalMutation: paginate({ cursor, numItems }), then ctx.scheduler.runAfter(0, internal.x.batch, { cursor: result.continueCursor }) while !result.isDone — or use the migrations component.

Rules That Are Easy To Get Wrong

Functions

  • Public: query/mutation/action. Internal: internalQuery/internalMutation/internalAction. All from ./_generated/server.
  • Always set a returns validator; use returns: v.null() when the function returns nothing (JS implicitly returns null).
  • Pass function references (api.file.fn, internal.file.fn from ./_generated/api) to ctx.runQuery/runMutation/runAction — never the function itself.

Queries

  • Do not use .filter(). Convex's .filter() performs the same as filtering in JS — neither pushes the predicate to storage. Only .withIndex()/.withSearchIndex() reduce documents scanned.
  • Queries have no .delete(): collect results, then ctx.db.delete(row._id) per row.
  • .unique() for single-document reads.

Mutations

  • Skip no-op writes: compare before ctx.db.patch() — an unchanged write still costs invalidation, replication, and trigger execution.
  • Mutations are ACID transactional; use actions for external API calls and side effects.
  • Breaking schema changes need widen-migrate-narrow across two deploys (widen, migrate, then narrow).

Read the full file on GitHub · 79 lines

Files

What ships with it

1 file 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. 5d ago First seen · 79 lines · 67 tokens per session scan A 0049f396f3a3

Subscribe to this mod's changes

convex-database is a skill published in the GitHub repository monkilabs/opencastle (61 stars, last pushed 7d ago), licensed MIT. It adds 67 tokens to every session and 1,015 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

architecture-database-design

Master of PostgreSQL schema design, optimization, and safe migrations. Enforces strict conventions for IDs, indexes, JSONB, and transactional DDL. Use whenever modifying the data layer.

Sn4kyGit/antigravity-project-starter · 42 tokens

product-architect

Complete product development system with 80 agents and 36 frameworks. Use when the user wants to build a product, write a PRD, plan an MVP or roadmap, design an app, research a market or check whether a feature already exists or is novel, do competitive analysis, run a security audit, build a financial model, plan…

ankitjha67/product-architect · 253 tokens

databricks-live-unity-catalog-grant-guard-at-azure

Mutating-runtime live guard for Unity Catalog privilege management on Azure Databricks. Executes exactly ONE GRANT or REVOKE of a single privilege on a single Unity Catalog securable (schema, table, or volume) to a single principal — with explicit written human approval, dry-run preflight, prior-state capture, and a…

VincentChuWaiChow/vanguard-frontier-agentic · 113 tokens

codex-delegation

Use when a coding task would benefit from delegating work to Codex in the background — a deep independent second opinion, security or architecture analysis, or a parallel implementation running while the session continues. Lets Claude drive the codex companion itself (task, review, status --wait, result) without the…

zebbern/agent-collab · 74 tokens

cursor-delegation

Use when a coding task would benefit from delegating work to Cursor in the background — fast parallel implementation, scaffolding, or an everyday review running while the session continues. Lets Claude drive the cursor companion itself (task, review, status --wait, result) without the user typing /cursor: commands.

zebbern/agent-collab · 66 tokens

orchardcore-custom-indexing-elasticsearch

Skill for creating Orchard Core custom indexing pipelines for arbitrary data using Elasticsearch, based on CrestApps AI Memory and OrchardCore.Indexing patterns. Use this skill when requests mention Orchard Core Custom Indexing for Elasticsearch, Create a custom Elasticsearch index for arbitrary data, When to use this…

CrestApps/CrestApps.AgentSkills · 187 tokens