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.
npx skills add cass-2003/local-workflow-skill --skill environment-configgit clone --depth 1 https://github.com/cass-2003/local-workflow-skillWrote 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.
[](https://agentmods.dev/skills/cass-2003/local-workflow-skill/environment-config)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
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.
- 7d ago First seen · 379 lines · 155 tokens per session scan A 45682971f59d
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.
Other skills, from other repositories
azd-deployment
Deploy containerized frontend + backend applications to Azure Container Apps with remote builds, managed identity, and idempotent infrastructure.
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…
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…
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…
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…
atmos-helmfile
Helmfile orchestration: sync/apply/destroy/diff, Kubernetes deployments, varfile generation, EKS integration, source management.