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.
npx skills add convex/agent-skills --skill convex-optimize -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/convex-optimize/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/convex-optimize/
1Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-optimize -a codex2Manually: put the files in place
.agents/skills/convex-optimize/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-optimize -a cursor2Manually: put the files in place
.cursor/skills/convex-optimize/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install convex/agent-skills convex-optimize2Manually: put the files in place
.github/skills/convex-optimize/SKILL.md1Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-optimize -a gemini-cli2Platform CLI
gemini skills install https://github.com/convex/agent-skills --path skills/convex-optimizeManually: put the files in place
.devin/skills/convex-optimize/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-optimize -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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