360 Secure SkillHub
360 安全技能中心

convex-env

该 Skill 指导在 Convex 部署中通过命令行设置环境变量与密钥,强调在 actions 中用 process.env 读取、不同部署各自取值、不要把密钥写入代码或提交到 Git,并用只列名称的方式确认设置结果。

convex
热度 92.00
最近更新 2026-10-18 16:51:29
分类:开发依赖:代码执行 / 读写文件应用场景:DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add convex/agent-skills/convex-env
Metadata
name
convex-env
description
Set and wire Convex deployment env vars / secrets for the app.

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.