convex-advisor

Diagnose Convex deployment performance issues from 72-hour insights events and root-cause them in code.

9.4k|1.5k|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/openclaw/clawhub --skill convex-advisor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-advisor
Source: https://github.com/openclaw/clawhub/tree/main/.agents/skills/convex-advisor
Command: npx skills add https://github.com/openclaw/clawhub --skill convex-advisor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex deployments surface runtime health signals like read-limit hits and OCC write contention, but turning those raw events into actionable fixes requires manually tracing each event back to the responsible code. This Skill automates that investigation by reading the official Convex MCP insights feed, locating the flagged function's code, and producing evidence-backed findings with concrete fixes.

Core Features & Use Cases

  • Insights-driven diagnosis: Reads typed 72-hour health events (documentsReadLimit, bytesReadThreshold, occRetried, occFailedPermanently) from the official Convex MCP and maps each to its root cause in the flagged function's code.
  • Structured findings bus: Emits findings per a defined schema with severity, locus, evidence, confidence, and fix capability so fixer agents can be dispatched.
  • Concrete fix recommendations: Suggests indexes with .withIndex, .take(n), .paginate, sharded counters for OCC contention, and aggregate components for count scans.
  • Use Case: Your production Convex app hits documentsReadLimit on a messages query. The advisor reads the insight event, finds the unindexed .filter() in messages.ts, and reports the exact file:line with the index fix to apply.

Quick Start

Ask the advisor to read my Convex deployment's insights and root-cause any performance or contention events in my functions.

Frequently Asked Questions about convex-advisor

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

FAQPage Schema
How do I diagnose Convex read limit errors in production?

Use the Convex MCP insights tool to retrieve documentsReadLimit or bytesReadLimit events from the last 72 hours, then read the flagged function's code for unindexed .filter() calls, .collect() on large tables, or missing pagination. The fix is typically adding an index with .withIndex, .take(n), or .paginate.

How to fix OCC contention and occFailedPermanently errors in Convex?

OCC failures come from read-modify-write hotspots on a shared document, such as counters or status toggles. The recommended fixes are the @convex-dev/sharded-counter component, narrowing the read set, or moving the contended work to a workpool.

Does the Convex insights tool work on preview deployments?

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

Can this advisor modify my production Convex deployment?

No. An advisory pass is read-only by construction and never enables mutating production access. It reports findings and offers fixes, applying changes only after explicit confirmation.

What happens when the Convex deployment has no insights events?

The advisor reports that no evidence exists rather than inventing findings, and offers a static code review pass instead. Every finding must cite a real insight event, log line, or table statistic.