convex-performance-audit

Diagnoses and fixes Convex performance issues across reads, writes, subscriptions, and function limits.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/alex-jordan547/agent-setup --skill convex-performance-audit-alex-jordan547
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-performance-audit
Source: https://github.com/alex-jordan547/agent-setup/tree/main/archive/convex-performance-audit
Command: npx skills add https://github.com/alex-jordan547/agent-setup --skill convex-performance-audit-alex-jordan547

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Convex applications can become slow or expensive due to read amplification, OCC write conflicts, excessive reactive subscriptions, or functions hitting execution and transaction limits. This Skill provides a structured audit workflow that starts from real signals (like npx convex insights --details), routes each symptom to the right problem class, and applies targeted fixes without over-engineering. ## Core Features & Use Cases - Signal-driven diagnosis: Gathers evidence from Convex deployment insights, CLI output, or code audits, then routes symptoms to one of four problem classes: hot-path reads, OCC conflicts, subscription cost, or function budget. - Reference-backed fixes: Four detailed reference files cover index usage, denormalization, digest tables, hot document splitting, no-op write elimination, point-in-time reads, and batched mutations, each with concrete code examples and a recommended fix order. - Sibling consistency checks: After fixing one function, the workflow audits sibling readers and writers on the same tables so the same pattern is fixed everywhere. - Use Case: Your dashboard shows high bytes read on a project list query. The Skill traces the query's full read set, replaces a scan-plus-filter with an indexed digest table read, adds fallback logic for unbackfilled fields, and verifies sibling list queries follow the same pattern. ## Quick Start Ask the agent to audit your Convex app for performance issues, starting with the strongest available signal such as insights output or a slow page, and to propose the smallest high-impact fix first.

Frequently Asked Questions about convex-performance-audit

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

FAQPage Schema
How do I diagnose slow Convex queries?

Start by running npx convex insights --details to find functions with high bytes or documents read. Then trace every ctx.db.get and ctx.db.query in the slow path, looking for JavaScript filtering, unbounded collect calls, and foreign-key joins that could use indexes or denormalized fields.

How do I fix OCC conflict errors in Convex mutations?

OCC conflicts come from write contention on shared documents or overly broad read sets. Narrow reads with indexes, split hot documents like counters into shards, skip no-op writes, and move secondary bookkeeping to scheduled functions to shrink transaction scope.

Does Convex .filter() push predicates to the storage layer?

No. The Convex .filter() method performs the same work as filtering in JavaScript after a scan, so you still pay for every document read. Only .withIndex() and .withSearchIndex() actually reduce the documents scanned at the storage layer.

When should I use point-in-time reads instead of useQuery in Convex?

Use point-in-time reads when a flow is high-read, the data changes less often than users need to see, and explicit refresh is acceptable, such as reports or low-churn listings. Keep reactive useQuery subscriptions for collaborative editing, live dashboards, and presence views.

Why does my Convex mutation hit transaction size limits?

Mutations fail when they read or write more than 16 MiB, scan over 32,000 documents, or update too many rows in one transaction. Split large backfills into cursor-based, self-scheduling batch mutations and move heavy computation to actions.

When should I not restructure my Convex schema for performance?

Avoid digest tables, document splitting, or migration-heavy rollouts when tables are small, traffic is modest, or signals are weak. A simple scan on a small table is often acceptable, and structural work should follow a measured signal or a clearly unbounded hot path.