convex-cost

Analyzes Convex function read patterns to project spend and recommend cost fixes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex bills on function calls and bandwidth, so a few functions reading far more data than expected can quietly drive up spend. This Skill makes that spend legible by attributing bytes/documents-read evidence to the functions responsible, projecting how costs grow with traffic, and naming the cheapest fix for each driver.

Core Features & Use Cases

  • Cost Attribution: Ranks functions by bytes/documents read per call multiplied by call volume, using the deployment's own insights data via the official Convex MCP.
  • Growth Projection: Describes each driver's scaling curve (e.g., a full-table .collect() grows linearly with table size while an indexed .take(n) stays flat) instead of inventing false-precision dollar figures.
  • Fix Recommendations: Names the cheapest fix per driver, such as adding an index with .withIndex, replacing .collect() with .paginate/.take, or caching hot reads, and emits cost-class findings for convex-expert/convex-advisor.
  • Confirm-Cost Gate: Requires stating the price and recurrence of any metered action (domain purchase, plan change) and getting explicit approval before proceeding.
  • Use Case: Before launch, ask which functions will dominate your Convex bill; the Skill reports that messages:list reads the whole table every call and that indexing it drops the cost roughly 100x.

Quick Start

Ask the agent to preview what my Convex deployment will cost and rank the functions driving the spend.

Frequently Asked Questions about convex-cost

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

FAQPage Schema
How do I estimate what my Convex app will cost?

Estimate Convex cost by ranking functions by bytes or documents read per call multiplied by call volume, using the deployment's insights data. With no traffic yet, estimate from query shapes instead, since a full-table scan on a growing table is a future cost even at zero usage.

How to reduce Convex bandwidth and read costs?

Reduce Convex read costs by replacing full-table `.collect()` scans with indexed `.withIndex` queries, using `.paginate` or `.take` instead of reading entire tables, adding aggregate components for counts, and caching hot reads. Each fix targets the specific function driving the spend.

Does Convex cost analysis work without production traffic?

Yes, but differently. Without usage data, the analysis prices query shapes instead of measured reads: a `.collect()` on a table projected to grow is flagged as a future linear cost, while indexed access patterns are identified as flat regardless of table size.

Why does a cheap Convex function still drive up my bill?

Cost equals data read per call times call volume, so a cheap-per-call function invoked constantly can outweigh an expensive rare one. Both factors must be examined together to find the true cost drivers.

What are the limitations of Convex cost projections?

Projections give growth curves and relative magnitudes, not exact dollar figures, because Convex pricing depends on plan and changes over time. The insights data is also cloud and user-auth only, so preview deployments cannot be analyzed.