Skip to main content
skill CX Codex

convex-optimize — Claude Code skill: audit and optimize Convex apps

The skill audits an existing Convex app and turns the findings into a plan: security, scale, component upgrades, observability.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add convex/agent-skills --skill convex-optimize -a claude-code
Open on GitHub

What convex-optimize does

It starts by detecting the app: a convex/ directory, the schema, and whether the deployment is anonymous or cloud. The scoring itself is not done here — the skill consumes the report from launch-readiness, which covers authz, reviewer, advisor and insights and returns an ordered fix plan. That split is the point: optimize acts on the report instead of re-running the same passes.

Upgrades get folded into that plan. The skill runs check-updates against the pinned @convex-dev/* components and adds anything stale. If the readiness report shows no production error capture, it offers to install sentinel. What you get back is one prioritized list — score, fixes, upgrades, observability — with security and data-loss risks at the top.

Nothing is written until you confirm. The skill never lands changes on someone's production app on its own, and after applying a fix it re-runs the assessment so you can see the score move. You need a convex/ directory and the skills from convex/agent-skills in place.

What it helps with

  • score an existing Convex app before launch
  • find stale @convex-dev/* components and upgrade them
  • close authorization gaps before shipping
  • set up production error capture
  • confirm a fix did not break security

Example prompts for the agent

  • audit my Convex app and show me the fix plan
  • which @convex-dev/* components are stale and what should I do about them
  • the report says there is no production error capture — what should I install

How to install convex-optimize

1Skills CLI (Vercel)

npx skills add convex/agent-skills --skill convex-optimize -a claude-code

2Manually: put the files in place

~/.claude/skills/convex-optimize/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/convex-optimize/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about convex-optimize

How do I install convex-optimize in Claude?

Run npx skills add convex/agent-skills --skill convex-optimize -a claude-code. The skill lands at ~/.claude/skills/convex-optimize/SKILL.md.

What does convex-optimize do?

It audits an existing Convex app through the launch-readiness report, adds component upgrades and observability setup to the plan, then applies the fixes once you confirm.

Does it change code in production on its own?

No. It reads first and presents a plan, applies changes only after explicit confirmation, then re-runs the assessment to show the score delta.

Source text

SKILL.md · Apache-2.0
---
name: convex-optimize
description: "Audit and optimize an existing Convex app: security, scale, upgrades, observability."
---

<!-- GENERATED from convex-agents content/capabilities/optimize.json — do not edit by hand. -->

# Audit and optimize an existing Convex app

The remediation WORKFLOW for an existing app: open with a scored assessment, then act on it — upgrade stale components and set up observability — plan-then-confirm-then-apply. The assessment itself is delegated to launch-readiness (the findings-bus scorer); optimize's distinct value is the actions it takes on the result.

## Workflow

1. Detect the app: a `convex/` directory, the schema, and whether it's an anonymous or cloud deployment.
2. ASSESS via `launch-readiness` — one scored, deduped report across authz/reviewer/advisor/insights with an ordered fix plan. Do not re-run those passes by hand; optimize consumes launch-readiness's report rather than re-implementing the audit.
3. UPGRADE: run `check-updates` against the pinned `@convex-dev/*` components and fold stale-component (staleness-class) findings into the same plan.
4. OBSERVABILITY: if the readiness report flagged an observability gap (no prod error capture), offer to install `sentinel`.
5. Present the combined prioritized plan — the launch-readiness score + the fix plan + upgrades + observability, security/data-loss first — and apply only on explicit confirmation, dispatching each fix to its fixCapability.
6. After applying, re-run the launch-readiness assessment and show the score delta.

## Rules

- Read-only first. Present a plan and CONFIRM before changing any file.
- Delegate the audit to launch-readiness (the findings-bus scorer); don't re-implement reviewer/advisor/insights inline — optimize's job is acting on the report (upgrades + observability), not re-scoring.
- Prioritize security and data-loss risks above style, following launch-readiness's ordering.
- Never auto-land changes on someone's existing prod app; re-assess after applying and show the score moved.

© convex · Apache-2.0 · convex/agent-skills

Similar skills

Everything for Backend and APIs →

From the same set32

convex-expert A skill for any code under convex/: functions, schemas, indexes, validators. Useful when your agent writes Convex backend code. CX Codex +1 36,200installs convex-migrate A skill that walks the agent through schema changes and data backfills on a deployed Convex app using @convex-dev/migrations. Useful when the app is already live. CX Codex +1 36,100installs convex-authz Audits and hardens Convex backend authorization against four defect patterns. Fixes impersonation through arguments, missing ownership checks, and unauthorized writes. CX Codex +1 36,100installs convex-auth This skill adds passkey, OAuth, or password sign-in to a Convex app. Use it when auth needs to reach the server config, client hooks, and route guards. CX Codex +1 36,200installs convex-deploy-guard Classifies and announces the target Convex deployment before running mutations. Requires explicit approval for production and enforces read-only session modes. CX Codex +1 36,000installs convex-design This skill designs Convex backends from product requests, covering schemas, functions, auth, files, and LLM workflows. Use it for new or existing Convex projects. CX Codex +1 36,000installs convex-reviewer Walks Convex code through auth, validator, index and reactivity checks. Useful before you ship backend functions. CX Codex +1 36,100installs convex-docs Pins the project's installed Convex version and fetches current markdown docs or checks types instead of generating outdated API calls. CX Codex +1 36,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor