Guide · Agent skill
How to use the Convex Performance Audit agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The convex-performance-audit skill is a set of instructions that an AI coding agent loads so it can investigate slow or expensive Convex apps in a structured way. This guide is for developers who maintain a Convex project and have never installed an agent skill before. By the end you will know how to install the skill, how to ask for an audit in plain language, what the agent will check, and what it needs to run.
Quick start
- 1Download and unzip the skill. Download the ZIP from this page and unzip it so the folder contains SKILL.md.
- 2Place the folder. Move it to ~/.claude/skills/ for all projects, or to .claude/skills/ inside one project. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Check your Convex setup. Confirm the project uses the Convex CLI through npx convex and that you have network access and, for production, deployment credentials.
- 4Describe the symptom. Ask in plain language about the slow page, insight finding, OCC error or timeout you are seeing.
- 5Let the agent gather signals. The agent runs npx convex insights --details where possible, adding --prod or a deployment flag if needed.
- 6Review the proposed fixes. Check the changes against the verification steps, especially that results are unchanged and sibling functions were updated.
What an agent skill is and what this one does
An agent skill is a folder of instructions and reference files that an AI agent reads when a task matches the skill's description. This one is named convex-performance-audit and is built for Convex, a backend database and functions platform.
Once installed, the agent treats a slow or expensive Convex app as a performance problem to investigate. It gathers signals such as Convex insights, traces which functions read and write which tables, and then applies targeted fixes from reference guides on read amplification, write contention, subscription cost and execution limits. The skill is designed to prefer simple code over large restructuring unless the evidence justifies it.
Install the skill from a ZIP file
Download the ZIP of the skill from this page and unzip it. Then place the resulting folder in one of two locations, depending on how you want to use it.
For all of your projects on this computer, put it in ~/.claude/skills/. For one project only, put it in that project's .claude/skills/ folder. The skill's files include SKILL.md at the top level of the skill folder, so make sure the folder contains that file after unzipping.
If you use the Claude apps instead, you can upload the skill under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project folder
- Claude apps: Settings → Capabilities → Skills
Prepare your Convex project and CLI
The skill needs a Convex project and the Convex CLI, run through npx convex. It also needs network access so that insights can be read from a deployment. If you want to audit production, you need deployment access or credentials for the target Convex project, because the --prod and deployment-name flags require them.
Two other skills are optional. convex-doctor can supply findings the agent may treat as hints, and convex-migration-helper is used for migration-heavy fixes.
- Convex project with the Convex CLI (npx convex)
- Network access to run insights against a deployment
- Deployment access or credentials for --prod or deployment-name flags
- Optional: convex-doctor and convex-migration-helper
Ask for an audit with a natural request
You do not need a special command to trigger the skill. Describe the symptom in plain language and the agent should match it to the skill's description. The skill is meant for slow features, insights findings, OCC conflicts, read amplification, high subscription counts, and functions near execution or transaction limits.
Naming the page or feature helps the agent scope the audit to one concrete user flow, which is the first thing the skill asks it to do.
- Our chat page feels slow to load. Audit its Convex queries for performance problems.
- Insights show high bytes read on the orders list. Find the cause and fix it.
- We are seeing OCC conflict errors when users update their settings. Investigate the mutations.
- Some of our mutations hit transaction size errors. Check the functions and suggest fixes.
npx convex insights --detailsWhat the agent checks during an audit
The agent first gathers signals, starting with the strongest available. If deployment health insights are already in the context, it uses them. If CLI insights are available, it runs npx convex insights --details, adding --prod, --preview-name or --deployment-name when needed. If the local Convex CLI is too old to support insights, it tries npx -y convex@latest insights --details before giving up. If no runtime signals exist, it audits from code and keeps its guardrails in mind.
It then routes the problem to a reference file. Hot paths with high bytes or documents read go to hot-path-rules.md. OCC conflicts and mutation retries go to occ-conflicts.md. High subscription counts go to subscription-cost.md. Timeouts and transaction size errors go to function-budget.md. The agent traces every read and write in the chosen flow and inspects sibling functions that touch the same tables, so that a fix is applied consistently.
- Gather signals from insights, dashboard or code
- Route to a reference: hot-path, OCC conflicts, subscription cost or function budget
- Trace every ctx.db read and write in the flow
- Fix sibling readers and writers of the same tables together
- Verify results are unchanged and no records are dropped
Know what the skill will not do
The skill is deliberately cautious. It says not to use it for initial Convex setup, auth setup or component extraction, or for pure schema migrations with no performance goal. It also advises against invented structural work, such as digest tables or document splitting, unless there is a measured signal, a clearly unbounded path or a known hot path.
For larger changes, such as introducing summary tables across several flows or reworking pagination across screens, the agent is told to stop and present options before editing. Small projects with modest traffic may be told to leave simple code alone.
- Not for initial setup, auth configuration or migrations without a performance goal
- Not for one-off micro-optimizations without a visible problem
- Large or migration-heavy changes are presented as options before any edit
What people use it for
- Finding why an orders list reads far more documents than it displays
- Tracking down OCC conflicts on a shared settings or counter document
- Reducing subscription cost on a dashboard with many live widgets
- Fixing a mutation that hits transaction size or execution limits
Frequently asked questions
How do I install the convex-performance-audit skill?
Download the ZIP from this page and unzip it. Put the folder in ~/.claude/skills/ for all projects, or in a project's .claude/skills/ folder for one project. In the Claude apps you can instead upload it under Settings → Capabilities → Skills.
What does the skill need to run?
It needs a Convex project, the Convex CLI through npx convex, and network access to read insights from a deployment. Production audits also need deployment access or credentials for the --prod or deployment-name flags. convex-doctor and convex-migration-helper are optional.
Is the skill free to use?
The skill is listed under the MIT licence. Check the licence file in the package for the full terms.
Does the skill change my code automatically?
The skill describes applying fixes from its reference guides, but it asks the agent to present options before larger or migration-heavy edits. Review every change it proposes before accepting it, and verify that results are unchanged.
Why won't the agent make big changes to my app?
The skill's guardrails tell it to prefer simpler code when scale, traffic or signals are weak. It only recommends structural changes like digest tables or document splitting when there is a measured signal, a clearly unbounded path or a known hot path.
What if npx convex insights fails in my project?
The skill says that if the local Convex CLI is too old to support insights, you should try npx -y convex@latest insights --details. If runtime signals are unavailable, the agent can still audit from code, but it cannot prove health from missing insights.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you maintain a Convex app that feels slow, shows high usage, or hits OCC conflicts, timeouts or transaction size limits, and you can give the agent access to insights. Skip it for initial Convex setup, auth work, or small projects where the skill itself advises leaving simple code alone.
Download the skill