convex-cost
できること
このスキルは、Convexのアプリがどれだけのデータを読み、どの関数が最も多く使われているかを見ます。所有者が将来のコストを予測し、思わぬ請求を避ける助けになります。
使う場面
- ✓トラフィックが増えたときに、Convexのアプリがどのくらいのコストになりそうか知りたいとき。
- ✓Convexの利用の請求額が予想より高いとき。
- ✓有料の操作を計画していて、何かが課金される前に料金を知りたいとき。
スキルのリンク
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-cost/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Convexのアプリのどの部分が最もデータを使っているか、トラフィックが増えるとどのくらいのコストになるかを見せてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、Convexのデプロイから利用データを読み、関数を、読むデータの量と実行の頻度でランク付けし、成長を見積もります。有料の操作の前には、「はい」を求めます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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
- GUARD: deploy-guard — a cost read is read-only over dev/prod (insights is cloud+user-auth only; not previews). Announce the deployment.
- GATHER the spend evidence via the official MCP:
insightsfor the bytes-read / documents-read events (the direct cost signal — Convex bills on function calls + bandwidth),tablesfor row counts (a table's size bounds its scan cost),functionSpecfor 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). - 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.
- 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. - NAME THE CHEAPEST FIX per driver — index +
.withIndexinstead of scan,.paginate/.takeinstead 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. - 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).
- 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.
よくある質問
このスキルはアプリを変えますか?
主に読み取りだけのレビューです。コストを報告し、修正を適用するのではなく提案します。
まだトラフィックがない場合はどうなりますか?
クエリの形、たとえばテーブル全体を読み込むクエリから、コストを見積もります。
どのデプロイを読みますか?
まず対象のデプロイ、たとえば開発か本番かを伝えるので、どれが読まれるかが分かります。
詳細
作者による元の説明
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.
repo: openclaw/clawhub
人気
- GitHubのスター
- 9.5k
- ランキング
- #12238
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
axiom-alerting
9.5kエージェントが、Axiom APIを通じてAxiomのモニターと通知のルートを作って管理し、アラートが期待どおり動くかを確認できるよう支援します。
axiom-sre
9.5kエージェントが、本番のインシデントやバグを段階的に調べ、各推測をAxiomのログに照らして検証してから結論を出せるよう支援します。
building-dashboards
9.5kエージェントが、何の判断を支えるべきかという点から始めて、適切なグラフ、クエリ、フィルターを使ったAxiomのダッシュボードを設計できるよう支援します。
controlling-costs
9.5kエージェントが、Axiomで誰も使っていないデータを見つけ、ログのコストを追跡して抑えるダッシュボードとモニターを作れるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。