convex-performance-audit
ما الذي تفعله
تشخّص هذه المهارة الأجزاء البطيئة أو المكلفة في تطبيق Convex، وتصلحها مشكلة مشكلة. وهي مخصصة للبناة الذين يبدو تطبيقهم بطيئًا أو تُظهر تقارير الاستخدام قراءات ثقيلة للبيانات.
متى تستخدمها
- ✓عندما تبدو صفحة أو ميزة في تطبيق Convex بطيئة.
- ✓عندما تُظهر تقارير الاستخدام أن دالة تقرأ بيانات أكثر بكثير مما يُتوقع.
- ✓عندما يُظهر تطبيقك أخطاء تعارض كتابة بسبب تحديثات كثيرة في وقت واحد.
رابط المهارة
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-performance-audit/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“صفحة لوحة التحكم في Convex تُحمَّل ببطء. اعرف السبب وأصلح الجزء البطيء.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يجمع الوكيل بيانات الأداء من النشر أو الشيفرة، ويحدد الإشارة الأقوى، ويطبق أبسط إصلاح يناسب المشكلة. ويتجنب إعادة الهيكلة الكبيرة إلا إذا أظهرت البيانات حاجة فعلية لها.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
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
الأسئلة الشائعة
هل ستعيد بناء بنية بياناتي كلها؟
لا. تتجنب التغييرات الهيكلية الكبيرة إلا عند وجود دليل مقاس أو مسار قراءة غير محدود.
ما الإشارات التي تستخدمها؟
تبدأ بأقوى إشارة متاحة، مثل رؤى صحة النشر، قبل تغيير الشيفرة.
هل فحص جدول صغير مشكلة دائمًا؟
ليس بالضرورة. في الجداول الصغيرة يكون الفحص البسيط مقبولًا غالبًا، ولا تخترع المهارة عملًا لا حاجة إليه.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 9.5k
- الترتيب
- #12253
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
axiom-alerting
9.5kيساعد وكيلك على إنشاء مراقبات Axiom ومسارات الإشعارات وإدارتها عبر Axiom API، والتحقق من أن التنبيهات تعمل كما هو متوقع.
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 وفق أفضل الممارسات، ويوضح كيف تتواصل وكيف تُعرض الأخطاء وكيف تُنظَّم البيانات.
backend-patterns
280kيساعد وكيلك على أنماط بنية الخادم وتحسين قاعدة البيانات، ويفيد في بناء الشيفرة التي تعمل على الخادم أو مراجعتها.