convex-performance-audit
Skill2 starsChanged 7 months agoApache-2.0View on GitHub
Audits and optimizes Convex application performance across hot-path reads, write contention, subscription cost, and function limits. Use this skill when a Convex feature is slow or expensive, npx convex insights shows high bytes or documents read, OCC conflict errors or mutation retries appear, subscriptions or UI updates are costly, functions hit execution or transaction limits, or the user mentions performance, latency, read amplification, or invalidation problems in a Convex app.
15 other projects use a version of this, 13 of them edited.
Adopted by
Most recently taken up by
- get-convex/workflowedited, first seen Oct 9, 2026
- moltbot/molthubedited, first seen Oct 8, 2026
- get-convex/convex-helpersword for word, first seen Oct 8, 2026
- clawdbot/clawdhubedited, first seen Oct 8, 2026
- pingdotgg/lawnedited, first seen Oct 8, 2026
- waynesutton/markdown-siteedited, first seen Oct 8, 2026
Used with
Projects with it also use clawhub-ban-appeals, clawhub-clawscan and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
openclawSkillclawhub-ban-appeals
Review ClawHub account-ban appeals, distinguish bans from moderation holds or blocked releases, and prepare an evidence-backed moderation decision. Route validated scanner inaccuracies to clawhub-clawscan.
Also in 3 projects that use this
openclawSkillclawhub-clawscan
Investigate ClawScan health alerts, diagnose scanner or ClawHub integration failures, prepare operational repairs, and route validated verdict inaccuracies upstream. Account ban appeals use clawhub-ban-appeals.
Also in 3 projects that use this
FabienGreardSkillconvex-acquire-domain
Find and buy a domain for the current Convex app through Convex, then bind it (labs; spend action).
Also in 3 projects that use this
- +9 more from openclaw
Other versions15 projects use a version of this.
Word for word · 2
- get-convex/convex-helpers★ 496100% same
- ReScienceLab/TrySkills★ 2100% same
Edited · 13
- openclaw/clawhub★ 9.6k97% same
- clawdbot/clawdhub★ 9.5k97% same
- moltbot/molthub★ 9.5k97% same
- raroque/boop-agent★ 1.3k98% same
- pingdotgg/lawn★ 69097% same
- waynesutton/markdown-site★ 62898% same
- get-convex/workflow★ 86100% same
- sholajegede/mastra-vs-langchain★ 1798% same
- vantageos-agency/vantage-peers★ 498% same
- fiinytid/nexusai.gg★ 297% same
3 more not listed
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- convex-create-componentSkill
- convex-migration-helperSkill
- convex-quickstartSkill
- convex-setup-authSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 11 are common, 5 are distinctive, and 4 are very specific to this project.
11
Common
Most of the 13 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 28
Prefer simpler code when scale is small, traffic is modest, or the available signals are weak
- Distinctive: line 29
Do not recommend digest tables, document splitting, fetch-strategy changes, or migration-heavy rollouts unless there is a measured signal, …
- Common: line 34
Start with the strongest signal available:
- Distinctive: line 36
If deployment Health insights are already available from the user or the current context, treat them as a first-class source of performance …
- Very specific: line 37
If CLI insights are available, run npx convex insights --details.
- Very specific: line 38
If the local repo's Convex CLI is too old to support insights, try npx -y convex@latest insights --details before giving up.
- Very specific: line 39
If the repo already uses convex-doctor, you may treat its findings as hints.
- Distinctive: line 40
If runtime signals are unavailable, audit from code anyway, but keep the guardrails above in mind.
- Common: line 44
After gathering signals, identify the problem class and read the matching reference file.
- Common: line 58
If the likely fix is invasive, cross-cutting, or migration-heavy, stop and present options before editing.
- Very specific: line 67
When correctness depends on handling old and new states during a rollout, consult skills/convex-migration-helper/SKILL.md for the migration …
- Distinctive: line 97
Read the reference file matching your problem class.
- Common: line 99
Do not stop at the single function named by an insight.
- Common: line 103
When one function touching a table has a performance bug, audit sibling functions for the same pattern.
- Distinctive: line 105
After finding one problem, inspect both sibling readers and sibling writers for the same table family, including companion digest or …
- Common: line 109
If one list query switches from full docs to a digest table, inspect the other list queries for that table
- Common: line 110
If one mutation isolates a frequently-updated field or splits a hot document, inspect the other writers to the same table
- Common: line 111
If one read path needs a migration-safe rollout for an unbackfilled field, inspect sibling reads for the same rollout risk
- Common: line 113
Do not leave one path fixed and another path on the old pattern unless there is a clear product reason.
- Common: line 123
Every relevant sibling reader and writer was inspected, not just the original function
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 skills/convex-migration-helper/SKILL.md 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 page
In Convex, every extra read increases transaction work, and every write can invalidate reactive subscribers. Treat read amplification and invalidation amplification as first-class problems.
3. Apply fixes from the relevant reference
Read the reference file matching your problem class. Each reference includes specific patterns, code examples, and a recommended fix order.
Do not stop at the single function named by an insight. Trace sibling readers and writers touching the same tables.
4. Fix sibling functions together
When one function touching a table has a performance bug, audit sibling functions for the same pattern.
After finding one problem, inspect both sibling readers and sibling writers for the same table family, including companion digest or summary tables.
Examples:
- If one list query switches from full docs to a digest table, inspect the other list queries for that table
- If one mutation isolates a frequently-updated field or splits a hot document, inspect the other writers to the same table
- If one read path needs a migration-safe rollout for an unbackfilled field, inspect sibling reads for the same rollout risk
Do not leave one path fixed and another path on the old pattern unless there is a clear product reason.
5. Verify before finishing
Confirm all of these:
- Results are the same as before, no dropped records
- Eliminated reads or writes are no longer in the path where expected
- Fallback behavior works when denormalized or indexed fields are missing
- Frequently-updated fields are isolated from widely-read documents where needed
- Every relevant sibling reader and writer was inspected, not just the original function
Reference Files
references/hot-path-rules.md- Read amplification, invalidation, denormalization, indexes, digest tablesreferences/occ-conflicts.md- Write contention, OCC resolution, hot document splittingreferences/subscription-cost.md- Reactive query cost, subscription granularity, point-in-time readsreferences/function-budget.md- Execution limits, transaction size, large documents, payload size
Also check the official Convex Best Practices page for additional patterns covering argument validation, access control, and code organization that may surface during the audit.
Checklist
- Gathered signals from insights, dashboard, or code audit
- Identified the problem class and read the matching reference
- Scoped one concrete user flow or function path
- Traced every read and write in that path
- Identified sibling functions touching the same tables
- Applied fixes from the reference, following the recommended fix order
- Fixed sibling functions consistently
- Verified behavior and confirmed no regressions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

