convex-database

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

A guide to Convex, a database platform with built-in reactive queries, backend functions, authentication, and data migration tools. Reactive queries update clients when their data changes.

In plain words
What is it for?
Designing schemas, writing queries and mutations, adding authentication, migrating data, creating Convex components, and tuning backend performance.
Why use it?
It helps structure Convex applications correctly and avoid failed transactions, missing validation, inefficient queries, and problems with large data changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Designing schemas, writing queries and mutations, adding authentication, migrating data, creating Convex components, and tuning backend performance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/monkilabs/opencastle/convex-database
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 monkilabs/opencastle --skill convex-database
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-database/github.svg)](https://agentmods.dev/skills/monkilabs/opencastle/convex-database)
Your own site
<a href="https://agentmods.dev/skills/monkilabs/opencastle/convex-database"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/convex-database/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-database

Your own site · 80×15
<a href="https://agentmods.dev/skills/monkilabs/opencastle/convex-database"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/convex-database.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 955 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00046 $0.00955
Opus 5.5 $0.00018 $0.00382
Sonnet 5.5 $0.00009 $0.00191
Haiku 4.5 $0.00005 $0.00096

Measured 1mo ago against content hash 90c3dd96ff2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

src/orchestrator/plugins/convex/skills/convex-database/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 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: .opencastle/stack/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 · 77 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. 1mo ago Changed · -2 lines · -21 tokens per session 90c3dd96ff2f
  2. 1mo ago First seen · 79 lines · 67 tokens per session scan A e9b64d198ed9

Subscribe to this mod's changes

convex-database is a skill published in the GitHub repository monkilabs/opencastle (82 stars, last pushed 10d ago), licensed MIT. It adds 46 tokens to every session and 955 once invoked, about $0.0002 per session on Opus 5.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-10-04.

Related

convex-database compared with skills from other repositories

convex-database next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
convex-databasemonkilabs/opencastleSkill8210d agoMITA46Claude Code, Codex
spring-data-redisrrezartprebreza/spring-boot-skillsSkill37013d agoMITA37Claude Code, Codex
transactional-patternsrrezartprebreza/spring-boot-skillsSkill37013d agoMITA53Claude Code, Codex
multi-tenancyrrezartprebreza/spring-boot-skillsSkill37013d agoMITA38Claude Code, Codex
spring-data-jparrezartprebreza/spring-boot-skillsSkill37013d agoMITA38Claude Code, Codex
idempotency-patternsrrezartprebreza/spring-boot-skillsSkill37013d agoMITA46Claude Code, Codex
devexpress-xaf-business-modelDevExpress/agent-skillsSkill696d agoMITA146Claude Code