> **convex-env** — skill 15 of 33 in [convex/agent-skills](https://skillsdocs.com/convex/agent-skills).
>
> Book (all skills, one file): https://skillsdocs.com/convex/agent-skills.md
> Machine manifest: https://skillsdocs.com/convex/agent-skills/.well-known/agent-skills/index.json
> Install the book: `npx skills add convex/agent-skills`
> Upstream: https://github.com/convex/agent-skills/blob/main/skills/convex-env/SKILL.md @ `main`
> Raw bytes, no header: https://raw.githubusercontent.com/convex/agent-skills/main/skills/convex-env/SKILL.md
> Base for relative paths: https://raw.githubusercontent.com/convex/agent-skills/main/skills/convex-env/
> Licence: Apache-2.0 — https://spdx.org/licenses/Apache-2.0.html
>
> Content © its authors, served unmodified. Takedown: https://github.com/DreambaseAI/skillsdocs/issues/new?labels=takedown&title=Takedown+request

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
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.
