Agent Skillsopenclaw/clawhub › convex-cost

convex-cost

GitHub

分析 Convex 应用成本,根据数据读取量和调用频率排名函数,预测成本增长趋势并提供优化建议。严格执行付费操作前的确认机制,防止意外支出。

.agents/skills/convex-cost/SKILL.md openclaw/clawhub

Trigger Scenarios

用户询问应用成本或预算 需要评估特定函数的资源消耗 执行涉及计费的操作前需确认价格

Install

npx skills add openclaw/clawhub --skill convex-cost -g -y
More Options

Non-standard path

npx skills add https://github.com/openclaw/clawhub/tree/main/.agents/skills/convex-cost -g -y

Use without installing

npx skills use openclaw/clawhub@convex-cost

指定 Agent (Claude Code)

npx skills add openclaw/clawhub --skill convex-cost -a claude-code -g -y

安装 repo 全部 skill

npx skills add openclaw/clawhub --all -g -y

预览 repo 内 skill

npx skills add openclaw/clawhub --list

SKILL.md

Frontmatter
{
    "name": "convex-cost",
    "description": "Preview Convex spend — rank functions by bytes\/documents-read × call-volume from insights, project each cost driver's growth curve, name the cheapest fix; confirm-cost for paid actions."
}

Preview what this app will cost

Cost surprises come from a handful of functions reading far more data than anyone realized — the same read-heavy patterns convex-advisor flags for perf, seen through the money lens. This capability makes spend legible: it reads the deployment's own bytes/documents-read evidence, attributes it to the functions driving it, projects how it grows with traffic, and names the cheapest fix. It also carries the confirm-cost discipline (Supabase's structural consent for paid actions): before anything metered, state the price and get an explicit yes.

Workflow

  1. GUARD: deploy-guard — a cost read is read-only over dev/prod (insights is cloud+user-auth only; not previews). Announce the deployment.
  2. GATHER the spend evidence via the official MCP: insights for the bytes-read / documents-read events (the direct cost signal — Convex bills on function calls + bandwidth), tables for row counts (a table's size bounds its scan cost), functionSpec for the surface. If there's no usage/traffic yet, say so and estimate from the query SHAPES instead (a .collect() on a table projected to grow is a future cost even with zero traffic today).
  3. ATTRIBUTE: rank functions by bytes/documents read per call × observed (or asked-about) call volume — the product is the cost driver, not either alone. A cheap-per-call function called constantly can outweigh an expensive rare one; show both factors.
  4. PROJECT: state how the top drivers scale — a full-table .collect() grows LINEARLY with the table (cost compounds as data accumulates); an indexed .take(n) stays flat. Give the user the shape of the curve ('this is O(table size) per call — fine at 1k rows, a bill at 1M'), not a false-precision dollar figure.
  5. NAME THE CHEAPEST FIX per driver — index + .withIndex instead of scan, .paginate/.take instead of .collect, an aggregate component for counts, caching a hot read — and emit it as a cost-class finding on the bus (evidence: the insight event + the projected growth) pointing at convex-expert/convex-advisor for the actual change.
  6. CONFIRM-COST for paid actions: if the flow includes anything metered (a domain purchase, cloud provisioning, a plan change), STATE the price and recurrence explicitly and get an explicit yes BEFORE proceeding — never let a paid action happen as a side effect (the cost-confirm gate).
  7. REPORT: the current cost drivers ranked, each with its evidence + growth shape + fix, and a plain bottom line ('your spend is dominated by messages:list reading the whole table every call; index it and it drops ~100x'). Honest precision: Convex pricing changes and depends on plan — give relative/shape guidance and cite the pricing page for absolute numbers rather than inventing a dollar total.

Rules

  • Cost = data-read-per-call × call-volume — always show both factors; a cheap function called constantly can cost more than an expensive rare one.
  • Read the deployment's own insights/bytes-read evidence for spend; with no traffic yet, price the query SHAPES (a scan on a growing table is a future cost).
  • Give the growth CURVE, not false-precision dollars: O(table) scans compound as data accumulates; indexed access stays flat. Cite the pricing page for absolute figures.
  • Every cost driver names its cheapest fix and emits a cost-class finding on the bus pointing at the fixer (convex-expert/advisor).
  • Confirm-cost for any metered/paid action: state the price + recurrence and get an explicit yes BEFORE it happens — never as a side effect.
  • Read-only over dev/prod (deploy-guard); insights is cloud+user-auth only. Cost composes convex-advisor's evidence but frames it as money, not latency.

Version History

  • d6a8c68 Current 2026-08-20 02:43

Same Skill Collection

.agents/skills/autoreview/SKILL.md
.agents/skills/axiom-alerting/SKILL.md
.agents/skills/axiom-sre/SKILL.md
.agents/skills/building-dashboards/SKILL.md
.agents/skills/clawhub-content-rights-correspondence/SKILL.md
.agents/skills/clawhub-convex/SKILL.md
.agents/skills/clawhub-moderation/SKILL.md
.agents/skills/clawhub-pr-maintainer/SKILL.md
.agents/skills/clawhub-production-release/SKILL.md
.agents/skills/controlling-costs/SKILL.md
.agents/skills/convex-acquire-domain/SKILL.md
.agents/skills/convex-add/SKILL.md
.agents/skills/convex-advisor/SKILL.md
.agents/skills/convex-agent/SKILL.md
.agents/skills/convex-auth/SKILL.md
.agents/skills/convex-authz/SKILL.md
.agents/skills/convex-backup/SKILL.md
.agents/skills/convex-billing/SKILL.md
.agents/skills/convex-check-updates/SKILL.md
.agents/skills/convex-create-component/SKILL.md
.agents/skills/convex-crons/SKILL.md
.agents/skills/convex-deploy-guard/SKILL.md
.agents/skills/convex-design/SKILL.md
.agents/skills/convex-docs/SKILL.md
.agents/skills/convex-domains/SKILL.md
.agents/skills/convex-env/SKILL.md
.agents/skills/convex-expert/SKILL.md
.agents/skills/convex-explain-app/SKILL.md
.agents/skills/convex-improve-convex-plugin/SKILL.md
.agents/skills/convex-insights/SKILL.md
.agents/skills/convex-launch-readiness/SKILL.md
.agents/skills/convex-migrate-rehearse/SKILL.md
.agents/skills/convex-migrate/SKILL.md
.agents/skills/convex-migration-helper/SKILL.md
.agents/skills/convex-monitor/SKILL.md
.agents/skills/convex-optimize/SKILL.md
.agents/skills/convex-performance-audit/SKILL.md
.agents/skills/convex-quickstart/SKILL.md
.agents/skills/convex-retention/SKILL.md
.agents/skills/convex-reviewer/SKILL.md
.agents/skills/convex-self-heal/SKILL.md
.agents/skills/convex-sentinel/SKILL.md
.agents/skills/convex-setup-auth/SKILL.md
.agents/skills/convex-ship/SKILL.md
.agents/skills/convex-suggest/SKILL.md
.agents/skills/convex-test/SKILL.md
.agents/skills/convex-verify/SKILL.md
.agents/skills/create-and-cleanup-migration/SKILL.md
.agents/skills/openclaw-brand/SKILL.md

Metadata

Files
0
Version
d6a8c68
Hash
833701a5
Indexed
2026-08-20 02:43

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 08:21
浙ICP备14020137号-1 $mapa de visitantes$