convex-cost
Skill này làm gì
Skill này xem app Convex đọc bao nhiêu dữ liệu và function nào gây ra nhiều mức sử dụng nhất. Nó giúp chủ app dự đoán chi phí tương lai và tránh hóa đơn bất ngờ.
Khi nào nên dùng
- ✓Khi bạn muốn biết chi phí app Convex có thể là bao nhiêu khi lưu lượng tăng.
- ✓Khi hóa đơn sử dụng Convex cao hơn bạn mong đợi.
- ✓Khi bạn lên kế hoạch một việc có phí và muốn biết giá trước khi bị tính tiền.
Liên kết skill
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-cost/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Cho tôi xem phần nào của app Convex dùng nhiều dữ liệu nhất và chi phí sẽ là bao nhiêu khi lưu lượng tăng.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc dữ liệu sử dụng từ deployment Convex, xếp hạng các function theo lượng dữ liệu đọc và tần suất chạy, rồi ước tính mức tăng. Trước mọi việc có phí, nó sẽ hỏi bạn đồng ý.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
Câu hỏi thường gặp
Skill này có thay đổi app của tôi không?
Chủ yếu là một đánh giá chỉ đọc. Nó báo cáo chi phí và đề xuất cách sửa thay vì tự áp dụng.
Nếu app của tôi chưa có lưu lượng thì sao?
Skill ước tính chi phí dựa trên cấu trúc truy vấn, chẳng hạn các lần đọc tải toàn bộ bảng.
Skill đọc deployment nào?
Nó thông báo deployment mục tiêu trước, chẳng hạn dev hoặc prod, để bạn biết cái nào đang được đọc.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 9.5k
- Vị trí xếp hạng
- #12238
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
axiom-alerting
9.5kGiúp agent của bạn tạo và quản lý monitor cùng các tuyến thông báo của Axiom qua API Axiom, và kiểm tra cảnh báo hoạt động đúng như mong đợi.
axiom-sre
9.5kGiúp agent của bạn điều tra sự cố và lỗi production từng bước, kiểm tra mỗi giả thuyết với log Axiom trước khi đưa ra kết luận.
building-dashboards
9.5kGiúp agent của bạn thiết kế dashboard Axiom với biểu đồ, truy vấn và bộ lọc phù hợp, bắt đầu từ các quyết định mà dashboard phải hỗ trợ.
controlling-costs
9.5kGiúp agent của bạn tìm dữ liệu không dùng đến trong Axiom và xây dựng dashboard cùng monitor để theo dõi và giảm chi phí ghi log.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.