# Audit Convex Performance Bottlenecks

Slow Convex features waste reads, trigger broad invalidations, and hide contention. This skill guides Claude, Codex, and Claude Code through targeted performance audits.

## Install

```bash
npx skillstore add get-convex/convex-performance-audit
```

## Metadata

- Status: approved
- Slug: get-convex-convex-performance-audit
- Skillstore revision: r1
- Version status: missing
- Tree hash: 4693cc1e00b7ccbae6c635d1b21777bedae6136a7acccaa0790ff26fa7db22d1
- Author: get-convex
- GitHub username: get-convex
- License: MIT
- Repository: https://github.com/get-convex/agent-skills/tree/main/skills/convex-performance-audit/
- Ref: 3e4b6c31a74a3bd1a291c98cf585d720cb9fbc88
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/get-convex-convex-performance-audit
- Manifest: https://skillstore.pages.dev/api/skills/get-convex-convex-performance-audit/manifest

## Capabilities

- Routes performance symptoms to hot-path, contention, subscription, or function-budget checks.
- Uses Convex insights output when available to prioritize expensive functions.
- Traces read sets, write sets, indexes, subscriptions, and invalidation sources.
- Recommends focused fixes such as indexes, digest tables, batching, and point-in-time reads.
- Checks sibling functions that touch the same tables or derived data.
- Adds verification steps for behavior, fallback safety, and reduced work.

## Use Cases

- Reduce Slow Query Cost: Find unbounded reads, missing indexes, large row shapes, and unnecessary joins on a hot Convex path.
- Improve Reactive UI Performance: Review subscriptions, query granularity, and invalidation patterns that cause sluggish Convex screens.
- Investigate Contention and Limits: Analyze OCC conflicts, large mutations, function timeouts, and transaction budget pressure.

## Prompt Templates

### Audit a Slow Convex Feature

```
Audit this Convex feature for performance. Start from the slow user flow. Identify expensive reads, writes, and verification steps.
```

### Reduce Subscription Cost

```
Review this page for unnecessary Convex subscriptions. Compare live freshness needs with point-in-time reads. Suggest focused changes and tests.
```

### Resolve OCC Conflicts

```
Analyze these Convex mutations for OCC conflicts. Find hot documents, broad read sets, no-op writes, and safe scheduling opportunities.
```

### Plan a Performance Refactor

```
Create a Convex performance refactor plan across these related functions. Include migration risks, sibling paths, rollout order, and verification criteria.
```

## Limitations

- Requires project code, runtime metrics, or user-provided symptoms for best results.
- Does not replace load testing or production observability.
- Large structural fixes may require separate migration planning.
- Convex limits can change, so official documentation should be checked.

## Best Practices

- Start with measured signals before proposing structural changes.
- Trace sibling readers and writers that touch the same tables.
- Verify behavior and performance after every optimization.

## Anti Patterns

- Do not replace simple scans when the table is small and the signal is weak.
- Do not add digest tables without a hot path or large row shape.
- Do not switch reactive views to point-in-time reads when live freshness matters.

## Security Audit

- Audited at: 2026-07-09T09:08:21.099\+00:00
- Summary: Most static findings are false positives from Markdown code spans and Convex ctx.db examples. Two findings are confirmed because the skill instructs agents to run npx Convex CLI diagnostics, including an @latest fallback. No prompt injection, credential exfiltration intent, or malicious network behavior was found.

## Stats

- Views: 120
- Downloads: 8
- Favorites: 0
- Popularity score: 0
