/convex
Use when working with Convex backend - dev server, deployment, function execution, data import/export. Wraps npx convex CLI. Covers convex, backend, serverless, functions, schema. NOT for: other databases (Supabase, Firebase, etc.), frontend-only work.
$ golems-cli skills install convexUpdated 2 weeks ago
Backend skill wrapping
npx convexCLI. Routes to workflows for specific operations.
Project Detection
Run first to verify you're in a Convex project:
[ -d "convex" ] && echo "Convex project detected" || echo "ERROR: No convex/ directory found"If no convex/ directory: Run npx convex init to initialize.
Quick Actions
| What you want to do | Workflow |
|---|---|
| Start dev server | workflows/dev.md |
| Deploy to production | workflows/deploy.md |
| Run a Convex function | workflows/run-function.md |
| Export data | workflows/data-export.md |
| Import data | workflows/data-import.md |
| Inspect/validate schema | workflows/schema.md |
| Delete user and all data | workflows/user-deletion.md |
| Fix errors | workflows/troubleshooting.md |
Available Scripts
Execute directly - they handle errors and edge cases:
| Script | Purpose | Usage |
|---|---|---|
scripts/dev.sh | Start dev server with auto-cleanup | bash ~/.claude/commands/convex/scripts/dev.sh [--deployment <name>] |
scripts/deploy.sh | Deploy to production | bash ~/.claude/commands/convex/scripts/deploy.sh [--1p] [--dry-run] |
scripts/run-function.sh | Execute queries/mutations/actions | bash ~/.claude/commands/convex/scripts/run-function.sh api:funcName [--args '{}'] |
scripts/export-data.sh | Export database backup | bash ~/.claude/commands/convex/scripts/export-data.sh [--path <file>] |
scripts/import-data.sh | Import data (with safety prompts) | bash ~/.claude/commands/convex/scripts/import-data.sh --path <file.zip> |
Full SKILL.md source — includes LLM directives, anti-patterns, and technical instructions stripped from the Overview tab.
Backend skill wrapping
npx convexCLI. Routes to workflows for specific operations.
Project Detection
Run first to verify you're in a Convex project:
[ -d "convex" ] && echo "Convex project detected" || echo "ERROR: No convex/ directory found"If no convex/ directory: Run npx convex init to initialize.
Quick Actions
| What you want to do | Workflow |
|---|---|
| Start dev server | workflows/dev.md |
| Deploy to production | workflows/deploy.md |
| Run a Convex function | workflows/run-function.md |
| Export data | workflows/data-export.md |
| Import data | workflows/data-import.md |
| Inspect/validate schema | workflows/schema.md |
| Delete user and all data | workflows/user-deletion.md |
| Fix errors | workflows/troubleshooting.md |
Available Scripts
Execute directly - they handle errors and edge cases:
| Script | Purpose | Usage |
|---|---|---|
scripts/dev.sh | Start dev server with auto-cleanup | bash ~/.claude/commands/convex/scripts/dev.sh [--deployment <name>] |
scripts/deploy.sh | Deploy to production | bash ~/.claude/commands/convex/scripts/deploy.sh [--1p] [--dry-run] |
scripts/run-function.sh | Execute queries/mutations/actions | bash ~/.claude/commands/convex/scripts/run-function.sh api:funcName [--args '{}'] |
scripts/export-data.sh | Export database backup | bash ~/.claude/commands/convex/scripts/export-data.sh [--path <file>] |
scripts/import-data.sh | Import data (with safety prompts) | bash ~/.claude/commands/convex/scripts/import-data.sh --path <file.zip> |
Common Commands Reference
# Development
npx convex dev # Start dev server with hot reload
# Deployment
npx convex deploy # Deploy to production
# Functions
npx convex run api:functionName # Run a function
npx convex run api:func --arg '{"key":"value"}' # With arguments
# Data
npx convex export --path ./backup.zip # Export all data
npx convex import --path ./backup.zip # Import data
# Environment
npx convex env list # List env vars
npx convex env set KEY=value # Set env var
npx convex env get KEY # Get env var
# Other
npx convex dashboard # Open dashboard in browser
npx convex codegen # Regenerate types
npx convex logs --name prod # View production logsSafety Rules
- Always check project - Verify
convex/directory exists before running commands - Deploy key for CI - Production deploys need
CONVEX_DEPLOY_KEY(see deploy workflow) - Backup before import - Always export before importing data
- Review schema changes - Schema migrations can be destructive
🚨 CRITICAL: Auto-Clean Before Any Convex Command
ALWAYS prefix Convex commands with this cleanup:
rm -f convex/*.js 2>/dev/null; npx convex devThe "Two output files" Error
If you see:
✘ [ERROR] Two output files share the same path but have different contents: out/auth.js
Cause: Orphan .js files in convex/ folder (from git worktrees, crashes, or manual operations).
Fix: rm -f convex/*.js then retry.
Prevention: Always use the cleanup prefix. Only .ts files belong in convex/.
See workflows/troubleshooting.md for details.
Best Pass Rate
89%
Haiku 4.5
Assertions
9
5 models tested
Avg Cost / Run
$0.1681
across models
Fastest (p50)
2.2s
Sonnet 4.6
Behavior Evals
Phase 2 baseline — skill quality on ClaudeBehavior Baseline
Adapter Evals
Phase 2C — cross-AI portabilityAdapter Portability
| Assertion | Opus 4.6 | Sonnet 4.6 | Haiku 4.5 | Cursor | Kiro | Consensus |
|---|---|---|---|---|---|---|
| cleans-orphan-js-files | 5/5 | |||||
| explains-root-cause | 5/5 | |||||
| uses-npx-convex-not-raw-node | 5/5 | |||||
| checks-convex-directory-exists | 3/5 | |||||
| auto-cleans-before-command | 4/5 | |||||
| uses-npx-convex-deploy | 4/5 | |||||
| uses-convex-export-command | 5/5 | |||||
| uses-convex-run-for-function | 4/5 | |||||
| backup-before-destructive-ops | 1/5 |
Token Usage
Cost per Run
| Model | Input Tokens | Output Tokens | Cost / Run | Cost / 1K Runs |
|---|---|---|---|---|
| Opus 4.6 | 6,144 | 7,182 | $0.6308 | $630.80 |
| Sonnet 4.6 | 3,645 | 3,138 | $0.0580 | $58.00 |
| Haiku 4.5 | 2,217 | 1,450 | $0.0024 | $2.40 |
| Cursor | 5,667 | 4,680 | $0.0975 | $97.50 |
| Kiro | 4,271 | 3,264 | $0.0520 | $52.00 |
Response Time (p50)
Response Time (p95)
| Model | p50 | p95 | Overhead |
|---|---|---|---|
| Opus 4.6 | 3.9s | 6.3s | +61% |
| Sonnet 4.6 | 2.2s | 4.0s | +81% |
| Haiku 4.5 | 3.6s | 6.7s | +85% |
| Cursor | 3.4s | 4.9s | +42% |
| Kiro | 2.7s | 4.9s | +79% |
Last evaluated: 2026-03-12 · Data is generated from skill assertions (real cross-model benchmarks coming soon)
Changelog entries are derived from eval runs and skill version updates. Full cascading changelog (Phase 4D) coming soon.
Best Pass Rate
89%
Assertions
9
Models Tested
5
Evals Run
3
- +Initial release to Golems skill library
- +9 assertions across 3 eval scenarios
- +8 workflows included: data-export, troubleshooting, user-deletion, schema, dev, data-import, run-function, deploy