convex-advisor

Diagnose Convex deployment performance and cost issues from 72-hour runtime insights.

1|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/Rocktown-Labs/rivercitymd --skill convex-advisor-rocktown-labs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-advisor
Source: https://github.com/Rocktown-Labs/rivercitymd/tree/main/.agents/skills/convex-advisor
Command: npx skills add https://github.com/Rocktown-Labs/rivercitymd --skill convex-advisor-rocktown-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Static code review can only guess at performance problems, while a live Convex deployment already knows which functions hit read limits, scan too many bytes, or suffer OCC write contention. This Skill reads the deployment's actual 72-hour insight events and root-causes each one in the real code, turning runtime symptoms into evidence-backed, fixable findings. ## Core Features & Use Cases - Runtime Insight Analysis: Reads typed 72h health events (documentsRead/bytesRead limits and thresholds, OCC retries and permanent failures) via the official Convex MCP tools. - Code-Level Root Causing: Traces each insight event to the exact function and line, identifying unindexed filters, missing pagination, or read-modify-write hotspots. - Structured Findings with Fixes: Emits severity-ranked findings on a findings bus with concrete repairs such as adding indexes, using .paginate, or adopting sharded-counter components. - Use Case: Your Convex app's messages:list query reads 4.2MB per call and hits document read limits. The advisor identifies the unindexed .collect() on the messages table, cites the file and line, and proposes an index plus pagination fix. ## Quick Start Ask the advisor to check my Convex deployment's recent insights and root-cause any performance or contention issues it finds.

Frequently Asked Questions about convex-advisor

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

FAQPage Schema
How do I find performance problems in my Convex deployment?▼

Use the Convex MCP insights tool to read typed 72-hour health events per function, covering read limits, byte thresholds, and OCC contention. The advisor then reads each flagged function's code to identify the root cause and propose a concrete fix.

How to fix documents read limit errors in Convex queries?▼

Documents read limit errors usually come from unindexed .filter() calls, bare .collect() on large tables, or missing pagination. The fix is adding an index with .withIndex, bounding results with .take(n) or .paginate, or using an aggregate component for counting.

What causes OCC conflicts and retries in Convex?▼

OCC retries happen when multiple transactions read-modify-write the same document, such as shared counters or status toggles. Fixes include the @convex-dev/sharded-counter component, narrowing the read set, or moving contended work to a workpool.

Does the Convex insights tool work on all deployments?▼

The insights tool is only available on cloud dev and prod deployments when logged in as a user, not on preview deployments or deploy-key-scoped contexts. It also needs roughly 72 hours of traffic before events appear.

Can the advisor modify my production Convex deployment?▼

No. An advisory pass is strictly read-only and never enables mutating production access. Fixes are only applied after explicit confirmation, and verification re-runs insights after new traffic accumulates.