convex/agent-skills

convex-env

Set and wire Convex deployment env vars / secrets for the app.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/convex/agent-skills --skill convex-env

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

<!-- 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 in any Convex function through the typed env export, never commit them.

Workflow

  1. Declare the var in the env section of defineApp (or defineComponent for a component) in convex.config.ts, e.g. env: { KEY: v.string() }. This generates the typed env export. Components don't see the app's env vars, so pass any a component declares through its .use() call, e.g. app.use(myComponent, { env: { KEY: app.env.KEY } }).
  2. npx convex env set KEY value (per deployment). For secrets, keep the value out of shell history: omit it to be prompted (npx convex env set KEY) or pipe it in on stdin (e.g. pbpaste | npx convex env set KEY).
  3. Read via env.KEY from import { env } from "./_generated/server" in queries, mutations or actions. Prefer it over process.env.KEY.
  4. Never hardcode or commit secrets; .env.local values don't reach Convex functions, so set the dev deployment's value too.
  5. 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.
  • Read env vars through the typed env export in queries, mutations and actions. process.env remains available as a legacy/fallback path, e.g. for existing or third-party code that expects to read env vars there.
  • Different deployments need their own values.
  • Check what is set with npx convex env list --names-only; never print secret values into the conversation.
来自同一仓库

更多 Skills

全部 Skills
convex
社区

convex-create-component

Builds reusable Convex components with isolated tables and app-facing APIs. Use for new components, reusable backend modules, integrations, or component boundary work.

累计安装量
14.1万
GitHub Stars
70
最近更新
11月20日
convex
社区

convex-quickstart

Get a barebones Convex + web template running from a one-sentence idea.

累计安装量
14.1万
GitHub Stars
70
最近更新
11月20日
convex
社区

convex

Convex is the backend agents get right on the first try: an all-TypeScript reactive platform where the database, server functions, scheduling, file storage, auth, and realtime sync are one type-safe system, every function is a transaction, and tsc catches most mistakes before deploy. Ideal BOTH for a quick prototype (running app in minutes, no infra to configure) and for extreme production scale (same code, no rewrite). Far more than a database: drop-in components add AI agents, RAG, workflows,

累计安装量
11.8万
GitHub Stars
70
最近更新
11月20日
convex
社区

convex-bundle-size

Debug and shrink a Convex deployment's bundle with @convex-dev/bundle-analyzer: find duplicate packages, \"use node\" code leaking into the Convex runtime, dev dependencies and test files in deployed code, then fix and measure before/after. TRIGGER on 'Total module size exceeded the unzipped maximum' (ModulesTooLarge), out-of-memory during push, slow \"use node\" cold starts, or 'why is my Convex bundle/push so big'. SKIP slow-query and spend questions.

1小时安装量
9
GitHub Stars
70
最近更新
11月20日