convex-env — Claude Code skill: what it does, how to install
This skill sets and wires Convex deployment environment variables and secrets. Use it when actions need deployment-specific values without putting secrets in code.
npx skills add convex/agent-skills --skill convex-env -a claude-codeWhat convex-env does
convex-env shows how to store secrets as Convex deployment environment variables with npx convex env set KEY value, then read them through process.env.KEY inside actions. An action may need 'use node'. Queries and mutations are outside this workflow.
Secrets stay out of source code and Git. For local work, values can go in .env.local; each deployment needs its own values. To inspect configured names without exposing secret values, run npx convex env list --names-only. Check every deployment before running the app, because a variable name can exist in one deployment and still need a separate value in another.
What it helps with
- set a secret for a Convex deployment
- read an environment variable inside an action
- keep values separate across deployments
- check configured secret names without printing values
- keep credentials out of code and Git
Example prompts for the agent
- Set up the Convex secrets for this deployment and show how to verify the variable names without revealing values.
- Inspect the project for
process.envusage and move any reads from queries or mutations into actions. - Use
.env.localfor local values and set the deployment secret withnpx convex env set KEY value.
How to install convex-env
1Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-env -a claude-code2Manually: put the files in place
~/.claude/skills/convex-env/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/convex-env/
1Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-env -a codex2Manually: put the files in place
.agents/skills/convex-env/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-env -a cursor2Manually: put the files in place
.cursor/skills/convex-env/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install convex/agent-skills convex-env2Manually: put the files in place
.github/skills/convex-env/SKILL.md1Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-env -a gemini-cli2Platform CLI
gemini skills install https://github.com/convex/agent-skills --path skills/convex-envManually: put the files in place
.devin/skills/convex-env/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add convex/agent-skills --skill convex-env -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
From the same set32
Similar
Nearby in Backend and APIs
Everything for Backend and APIs →Questions about convex-env
How do I install convex-env in Claude Code?
Run npx skills add convex/agent-skills --skill convex-env -a claude-code, then run npx skills add convex/agent-skills --skill convex-env -a claude-code again. The skill file is at ~/.claude/skills/convex-env/SKILL.md.
What does convex-env do?
It sets Convex deployment environment variables and secrets, explains how to read them with process.env.KEY in actions, and checks configured names without printing secret values.
Where can convex-env read environment variables?
The workflow uses process.env inside actions. It should not be used in queries or mutations, and an action may require 'use node'.
Source text
SKILL.md · Apache-2.0
---
name: convex-env
description: "Set and wire Convex deployment env vars / secrets for the app."
---
<!-- GENERATED from convex-agents content/capabilities/env.json — do not edit by hand. -->
# 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.
© convex · Apache-2.0 · convex/agent-skills