convex-cost-optimizer

Identify and reduce Convex read bandwidth while preserving query correctness.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/zuzu59/z-skills --skill convex-cost-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-cost-optimizer
Source: https://github.com/zuzu59/z-skills/tree/main/skills/convex-cost-optimizer
Command: npx skills add https://github.com/zuzu59/z-skills --skill convex-cost-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces Convex database bandwidth and read amplification while preserving query correctness, helping teams avoid costly full-table scans and inefficient data access patterns.

Core Features & Use Cases

  • Dashboard-driven prioritization to identify hot Convex functions with high documents-read relative to returned data.
  • Code-audit oriented guidance that surfaces patterns like excessive filtering, unbounded collects, or nested queries and proposes targeted fixes.
  • Indexing and query-design recommendations to replace full scans with selective reads and well-constructed indexes, with practical examples.

Quick Start

Run the Convex Cost Optimizer against your dashboard signals or codebase to identify high-bandwidth queries and apply the recommended fixes.

Frequently Asked Questions about convex-cost-optimizer

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

FAQPage Schema
How do I reduce Convex read bandwidth and document reads?

Reduce Convex read bandwidth by identifying hot functions with high documents-read relative to returned data, then replacing full-table scans and unbounded collects with selective reads and well-constructed indexes. This preserves query correctness while cutting costs.

Why does my Convex dashboard show high read bandwidth for a query?

High Convex read bandwidth often stems from expensive queries performing heavy full-table scans, excessive filtering, or unbounded collects that read many documents but return few. Dashboard signals help prioritize these hot functions for targeted code audits.

What's the best way to optimize Convex queries and indexing?

Optimize Convex queries by applying indexing and query-design recommendations to replace full scans with selective reads, enforcing correctness checks, and focusing code audits on hot functions to measure impact and reduce document reads.

Can I fix unbounded collects and nested queries without breaking query correctness?

Fix unbounded collects and nested queries by applying targeted code-audit guidance that enforces correctness checks while proposing selective reads and indexes. This reduces read amplification without altering the expected query results.

When do I need to add indexes to my Convex database?

Add indexes to your Convex database when dashboard signals reveal heavy full-table scans or expensive queries. Replacing these patterns with selective reads and well-constructed indexes reduces document reads and lowers bandwidth costs.