convex-performance-audit
Skill này làm gì
Skill này chẩn đoán các phần chậm hoặc tốn kém của app Convex và sửa từng vấn đề một. Nó dành cho người xây dựng có app cảm giác chậm, hoặc báo cáo sử dụng cho thấy việc đọc dữ liệu rất nặng.
Khi nào nên dùng
- ✓Khi một trang hoặc tính năng trong app Convex của bạn có cảm giác chậm.
- ✓Khi báo cáo sử dụng cho thấy một function đọc nhiều dữ liệu hơn hẳn mong đợi.
- ✓Khi app của bạn báo lỗi xung đột ghi do có quá nhiều cập nhật cùng lúc.
Liên kết skill
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-performance-audit/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
“Trang dashboard Convex của tôi tải chậm. Hãy tìm xem vì sao và sửa phần chậm.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent thu thập dữ liệu hiệu năng từ deployment hoặc code, xác định tín hiệu mạnh nhất, rồi áp dụng cách sửa đơn giản nhất phù hợp với vấn đề. Nó tránh tái cấu trúc lớn trừ khi dữ liệu cho thấy thật sự cần.
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.
Convex Performance Audit
Diagnose and fix performance problems in Convex applications, one problem class at a time.
When to Use
- A Convex page or feature feels slow or expensive
npx convex insights --detailsreports high bytes read, documents read, or OCC conflicts- Low-freshness read paths are using reactivity where point-in-time reads would do
- OCC conflict errors or excessive mutation retries
- High subscription count or slow UI updates
- Functions approaching execution or transaction limits
- The same performance pattern needs fixing across sibling functions
When Not to Use
- Initial Convex setup, auth setup, or component extraction
- Pure schema migrations with no performance goal
- One-off micro-optimizations without a user-visible or deployment-visible problem
Guardrails
- Prefer simpler code when scale is small, traffic is modest, or the available signals are weak
- Do not recommend digest tables, document splitting, fetch-strategy changes, or migration-heavy rollouts unless there is a measured signal, a clearly unbounded path, or a known hot read/write path
- In Convex, a simple scan on a small table is often acceptable. Do not invent structural work just because a pattern is not ideal at large scale
First Step: Gather Signals
Start with the strongest signal available:
- If deployment Health insights are already available from the user or the current context, treat them as a first-class source of performance signals.
- If CLI insights are available, run
npx convex insights --details. Use--prod,--preview-name, or--deployment-namewhen needed.- If the local repo's Convex CLI is too old to support
insights, trynpx -y convex@latest insights --detailsbefore giving up.
- If the local repo's Convex CLI is too old to support
- If the repo already uses
convex-doctor, you may treat its findings as hints. Do not require it, and do not treat it as the source of truth. - If runtime signals are unavailable, audit from code anyway, but keep the guardrails above in mind. Lack of insights is not proof of health, but it is also not proof that a large refactor is warranted.
Signal Routing
After gathering signals, identify the problem class and read the matching reference file.
| Signal | Reference |
|---|---|
| High bytes or documents read, JS filtering, unnecessary joins | references/hot-path-rules.md |
| OCC conflict errors, write contention, mutation retries | references/occ-conflicts.md |
| High subscription count, slow UI updates, excessive re-renders | references/subscription-cost.md |
| Function timeouts, transaction size errors, large payloads | references/function-budget.md |
| General "it's slow" with no specific signal | Start with references/hot-path-rules.md |
Multiple problem classes can overlap. Read the most relevant reference first, then check the others if symptoms remain.
Escalate Larger Fixes
If the likely fix is invasive, cross-cutting, or migration-heavy, stop and present options before editing.
Examples:
- introducing digest or summary tables across multiple flows
- splitting documents to isolate frequently-updated fields
- reworking pagination or fetch strategy across several screens
- switching to a new index or denormalized field that needs migration-safe rollout
When correctness depends on handling old and new states during a rollout,
consult the convex-migration-helper skill for the migration workflow.
Workflow
1. Scope the problem
Pick one concrete user flow from the actual project. Look at the codebase, client pages, and API surface to find the flow that matches the symptom.
Write down:
- entrypoint functions
- client callsites using
useQuery,usePaginatedQuery, oruseMutation - tables read
- tables written
- whether the path is high-read, high-write, or both
2. Trace the full read and write set
For each function in the path:
- Trace every
ctx.db.get()andctx.db.query() - Trace every
ctx.db.patch(),ctx.db.replace(), andctx.db.insert() - Note foreign-key lookups, JS-side filtering, and full-document reads
- Identify all sibling functions touching the same tables
- Identify reactive stats, aggregates, or widgets rendered on the same pag
Câu hỏi thường gặp
Nó có xây lại toàn bộ cấu trúc dữ liệu của tôi không?
Không. Nó tránh thay đổi cấu trúc lớn trừ khi có bằng chứng đo được hoặc một đường đọc không giới hạn rõ ràng.
Skill dùng tín hiệu nào?
Nó bắt đầu với tín hiệu mạnh nhất có sẵn, chẳng hạn các insight về sức khỏe deployment, trước khi thay đổi code.
Quét bảng nhỏ có luôn là vấn đề không?
Không nhất thiết. Với bảng nhỏ, quét đơn giản thường chấp nhận được, và skill không tạo thêm việc cho nó.
Chi tiết
Mô tả gốc của tác giả
Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.
repo: openclaw/clawhub
Độ phổ biến
- Sao GitHub
- 9.5k
- Vị trí xếp hạng
- #12253
- 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ủ.