convex-cost

Analyzes Convex deployment spend by ranking functions by bytes read and call volume.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/Tehzeeb07/CodeRush --skill convex-cost-tehzeeb07
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-cost
Source: https://github.com/Tehzeeb07/CodeRush/tree/main/.agents/skills/convex-cost
Command: npx skills add https://github.com/Tehzeeb07/CodeRush --skill convex-cost-tehzeeb07

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Convex bills on function calls and bandwidth, so a single read-heavy function can quietly dominate your bill as data grows. This Skill makes spend legible by reading your deployment's own usage evidence, attributing cost to the functions driving it, and projecting how each driver scales before it becomes a surprise invoice. ## Core Features & Use Cases - Cost Attribution: Ranks functions by bytes/documents read per call multiplied by call volume, using the official MCP insights, tables, and functionSpec tools. - Growth Projection: Shows the scaling curve of each cost driver — a full-table .collect() grows linearly with table size while indexed .take(n) stays flat — instead of false-precision dollar figures. - Cheapest-Fix Recommendations: Names the lowest-cost remedy per driver (index + .withIndex, .paginate/.take, aggregate components, caching) and emits cost-class findings for convex-expert/convex-advisor. - Confirm-Cost Gate: States the price and recurrence of any metered action (domain purchase, plan change) and requires explicit approval before proceeding. - Use Case: Before launch, ask which queries will get expensive at scale; the Skill flags that messages:list reads the whole table every call and that indexing it drops cost roughly 100x. ## Quick Start Ask the agent to preview what my Convex app will cost and rank the functions driving the most spend.

Frequently Asked Questions about convex-cost

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

FAQPage Schema
How do I find which Convex functions cost the most?▼

Cost equals data read per call multiplied by call volume, so rank functions by bytes/documents read from the insights API times observed call frequency. A cheap function called constantly can outweigh an expensive rare one, so both factors must be shown together.

How can I estimate Convex costs before my app has traffic?▼

With no usage data, estimate from query shapes instead of metrics. A `.collect()` over a table projected to grow is a future linear cost even at zero traffic today, while an indexed `.take(n)` stays flat regardless of table size.

What is the cheapest way to reduce Convex read costs?▼

Replace full-table scans with an index plus `.withIndex`, use `.paginate` or `.take` instead of `.collect`, add an aggregate component for counts, or cache hot reads. Indexing a scan-heavy query can reduce its cost by orders of magnitude.

Does this cost analysis work on preview deployments?▼

No. The insights data source is cloud and user-auth only, so cost reads run over dev and prod deployments in read-only mode. Preview deployments are not supported for usage evidence.

Why does the analysis avoid giving exact dollar amounts?▼

Convex pricing changes and depends on your plan, so the Skill reports relative cost drivers and growth curves rather than inventing precise totals. It cites the official pricing page for absolute figures.