Use this when you need to get secrets like API keys into a Convex app without leaking them into code or git. It walks through storing values with `npx convex env set` per deployment, reading them via `process.env` inside actions rather than queries or mutations, and checking what's configured with `npx convex env list --names-only`, which shows names without exposing values. The best part is that last check: it keeps secret values out of the conversation itself. The one thing to watch is that each deployment (dev, prod) needs its own values, so it's easy to set a key in dev and wonder why production is failing.

skills.sh installs
41.2K
GitHub stars
69
last updated
Oct 26, 2026

Install

$ npx -y skills add convex/agent-skills --skill convex-env --agent claude-code

Installs into .claude/skills of the current project.

Files

Manage env vars + secrets

Store secrets as Convex deployment env vars (npx convex env set), read them with process.env in actions, never commit them.

Workflow

  1. npx convex env set KEY value (per deployment).
  2. Read via process.env.KEY inside actions (not queries/mutations).
  3. Never hardcode or commit secrets; add to .env.local only for local.
  4. Confirm it's set with npx convex env list --names-only, which lists names without printing the secret values.

Rules

  • Secrets live in Convex env vars, never in code or git.
  • process.env only in actions ('use node' if needed), not queries/mutations.
  • Different deployments need their own values.
  • Check what is set with npx convex env list --names-only; never print secret values into the conversation.

Sponsors

Details

Repository
github.com/convex/agent-skills
Categories
AI & Agent Building, Databases
First seen
Oct 26, 2026

More from convex/agent-skills

All 30
1convex avatarconvex-optimizeconvex/agent-skillsAudit and optimize an existing Convex app: security, scale, upgrades, observability.41.2Kskills.sh installs
2convex avatarconvex-cronsconvex/agent-skillsAdd recurring scheduled jobs (crons) to the Convex app.41.2Kskills.sh installs
3convex avatarconvex-testconvex/agent-skillsGenerate convex-test tests for the app's Convex functions.41.1Kskills.sh installs
4convex avatarconvex-addconvex/agent-skillsAdd a capability to the CURRENT Convex app — consults the served Convex capability catalog for always-current procedures (billing, crons, auth, agent, search, …41.1Kskills.sh installs
5convex avatarconvex-costconvex/agent-skillsPreview Convex spend — rank functions by bytes/documents-read × call-volume from insights, project each cost driver's growth curve, name the cheapest fix; confi41.1Kskills.sh installs
6convex avatarconvex-migrate-rehearseconvex/agent-skillsRehearse a live-app schema change + backfill on a snapshot-seeded preview deployment, verify, then promote the proven change to prod with the snapshot as rollba41.1Kskills.sh installs