environment-config

environment-config is a skill for Claude Code, Codex from cass-2003/local-workflow-skill. It costs 155 tokens per session (3,149 once invoked), scanned A, original, MIT.

A guide to managing settings and secrets that change between environments such as development, staging, and production. It explains environment variables, configuration files, command-line overrides, and secret storage.

In plain words
What is it for?
Use it to design configuration for local projects, Docker, Kubernetes, Vercel, or serverless applications, and to check configuration schemas and secret handling.
Why use it?
It prevents deployments from using the wrong database or exposing passwords and API keys in source control. It also clarifies which settings are available when the application is built or run.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design configuration for local projects, Docker, Kubernetes, Vercel, or serverless applications, and to check configuration schemas and secret handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cass-2003/local-workflow-skill/environment-config
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cass-2003/local-workflow-skill --skill environment-config
Clone the repo
git clone --depth 1 https://github.com/cass-2003/local-workflow-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for environment-config

README.md
[![agentmods](https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/environment-config/github.svg)](https://agentmods.dev/skills/cass-2003/local-workflow-skill/environment-config)
Your own site
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/environment-config"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/environment-config/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for environment-config

Your own site · 80×15
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/environment-config"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/environment-config.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 155 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00155 $0.03149
Opus 5 $0.00077 $0.01574
Sonnet 5 $0.00031 $0.00630
Haiku 4.5 $0.00015 $0.00315

Measured 7d ago against content hash 45682971f59d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

environment-config scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/engineering-core/ours/environment-config/SKILL.md · 379 lines

How it starts

The opening of the file, as written. The whole thing — 379 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Environment Config Skill — 配置管理

何时使用

  • 启动 / 部署多环境项目(dev / staging / prod)
  • 排查"为什么 prod 用了错的 DB"
  • 防 secrets 进 git
  • 设计配置注入到 Docker / K8s / Vercel / Lambda
  • 区分 build-time vs runtime config

一、12-Factor #3:Config

"Config that varies between deploys is stored in environment variables."

关键

  • ✅ env vars 严格区分 code 与 deploy
  • ✅ 不在 git 里
  • ✅ 每个 deploy 自己一套
  • ✅ 不同环境差异只在 env vars,code 完全相同

二、Config 层级(合并优先级)

[lowest → highest 优先级]

1. 代码默认值          (硬编码,最后兜底)
2. 配置文件默认         (config/default.yaml)
3. 环境特定文件         (config/production.yaml)
4. 本地覆盖文件         (config/local.yaml — gitignored)
5. 环境变量            (NODE_ENV / PORT / DATABASE_URL)
6. CLI flags          (--port=8080)

后面的覆盖前面的。运行时 config = merge(defaults, files, env, flags)。

三、Secret vs Config

维度 Config Secret
例子 PORT, LOG_LEVEL, FEATURE_X_ENABLED DB 密码, API key, JWT secret
谁能看 任何工程师 仅运维 / 管理员
存哪 env vars / ConfigMap / yaml Vault / Secrets Manager / K8s Secret + KMS
轮换 罕见 定期轮换
日志 可打印 永远不打印

永远分开存。混在一起 → 给某人 read config 就给了 read secret。

四、.env 文件模式

# .env.example  ← 加入 git,列所有需要的 key
DATABASE_URL=postgres://user:pass@localhost/mydb
REDIS_URL=redis://localhost:6379
JWT_SECRET=replace-me-in-prod

# .env  ← gitignored,本机实际值
DATABASE_URL=postgres://localhost/mydb_dev
REDIS_URL=redis://localhost:6379
JWT_SECRET=dev-only-secret-12345

.gitignore 必须含:

.env
.env.local
.env.*.local
!.env.example

Node.js (Vite/Next 内置)

.env                # 所有环境
.env.local          # 本机覆盖(gitignored)
.env.development    # dev 时
.env.production     # prod 时

注意:.env.production 通常不进 git(实际 prod 值由 CI 注入),只有 .env.example 入仓。

五、加载与校验(启动即崩)

// src/config.ts
import { z } from 'zod'
import 'dotenv/config'         // 仅 dev,prod 由部署平台注入

const Env = z.object({
  NODE_ENV:     z.enum(['development', 'staging', 'production', 'test']),
  PORT:         z.coerce.number().int().positive().default(8080),
  DATABASE_URL: z.string().url(),
  REDIS_URL:    z.string().url().optional(),
  JWT_SECRET:   z.string().min(32, 'JWT_SECRET must be 32+ chars'),
  LOG_LEVEL:    z.enum(['debug','info','warn','error']).default('info'),
})

const result = Env.safeParse(process.env)
if (!result.success) {
  console.error('Invalid env config:')
  for (const issue of result.error.issues) {
    console.error(`  ${issue.path.join('.')}: ${issue.message}`)
  }
  process.exit(1)
}
export const env = result.data

Read the full file on GitHub · 379 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 379 lines · 155 tokens per session scan A 45682971f59d

Subscribe to this mod's changes

environment-config is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 2mo ago), licensed MIT. It adds 155 tokens to every session and 3,149 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

azd-deployment

Deploy containerized frontend + backend applications to Azure Container Apps with remote builds, managed identity, and idempotent infrastructure.

sickn33/agentic-awesome-skills · 29 tokens

openshell-cli

Guide agents through using the OpenShell CLI (openshell) for sandbox management, gateway registration, provider configuration and refresh, policy iteration, settings, service exposure, BYOC workflows, and attached-provider inference. Covers basic through advanced multi-step workflows. Trigger keywords - openshell…

NVIDIA/OpenShell · 128 tokens

langbot-deploy

Deploy and configure a LangBot instance — Docker / Docker Compose, Kubernetes, the config.yaml model, the Box sandbox runtime, the plugin runtime, and the global API key. Use when installing, deploying, upgrading, or configuring LangBot in production or self-hosted environments. Triggers on "deploy langbot", "langbot…

langbot-app/LangBot · 104 tokens

compute-env-setup

Set up a compute environment on a remote provider so Claude Science jobs can run there. Covers direct SSH/conda hosts, Slurm clusters, container-via-bridge runners, and managed-API providers (Modal, GCP, RunPod). Use when standing up a new provider, porting an env to a different backend, adding a tool that needs its…

UnicomAI/wanwu · 134 tokens

azure-cloud-migrate

Assess and migrate cross-cloud workloads to Azure with reports and code conversion. Supports Lambda→Functions, Beanstalk/Heroku/App Engine→App Service, Fargate/Kubernetes/Cloud Run/Spring Boot→Container Apps. WHEN: migrate Lambda to Functions, AWS to Azure, migrate Beanstalk, migrate Heroku, migrate App Engine, Cloud…

microsoft/skills · 106 tokens

atmos-helmfile

Helmfile orchestration: sync/apply/destroy/diff, Kubernetes deployments, varfile generation, EKS integration, source management.

cloudposse/atmos · 33 tokens