env-config

env-config is a skill for Claude Code, Codex from medy-gribkov/arcana. It costs 35 tokens per session (1,757 once invoked), scanned A, original, Apache-2.0.

A guide for managing environment variables and application configuration across local development, testing, continuous integration, and production. It covers .env files, startup validation with zod and envalid, secret handling, Docker variables, and 12-factor configuration practices.

In plain words
What is it for?
Use it to create .env.example files, validate required settings at startup, organize environment-specific values, handle secrets, and inject configuration into Docker or deployed applications.
Why use it?
It helps catch missing or malformed settings before an application reaches production and keeps secrets out of shared files. It also documents how configuration values are named, loaded, and overridden in different environments.

Skill for Claude CodeCodex

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

Good fit Use it to create .env.example files, validate required settings at startup, organize environment-specific values, handle secrets, and inject configuration into Docker or deployed applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/medy-gribkov/arcana/env-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 medy-gribkov/arcana --skill env-config
Clone the repo
git clone --depth 1 https://github.com/medy-gribkov/arcana

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin env-config/plugin install env-config after adding the marketplace above.

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 env-config

README.md
[![agentmods](https://agentmods.dev/badge/skills/medy-gribkov/arcana/env-config/github.svg)](https://agentmods.dev/skills/medy-gribkov/arcana/env-config)
Your own site
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/env-config"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/env-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 env-config

Your own site · 80×15
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/env-config"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/env-config.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,757 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.00035 $0.01757
Opus 5 $0.00017 $0.00879
Sonnet 5 $0.00007 $0.00351
Haiku 4.5 $0.00003 $0.00176

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

Security

Grade A, and why

env-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 10d 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/env-config/SKILL.md · 209 lines

How it starts

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

Purpose

Prevent misconfigurations from reaching production. Validate environment variables at startup, manage secrets safely, and keep config portable across local dev, CI, and production.

.env File Patterns

File Hierarchy

  • .env holds shared defaults. Commit this to the repo with safe placeholder values.
  • .env.local holds developer-specific overrides. Add to .gitignore.
  • .env.production, .env.staging, .env.test hold environment-specific values.
  • Load order (most frameworks): .env < .env.local < .env.[environment] < .env.[environment].local.

Naming Conventions

  • Prefix variables with the app or service name: MYAPP_DATABASE_URL, not just DATABASE_URL.
  • Use SCREAMING_SNAKE_CASE. No dots, no dashes.
  • Boolean values: use true/false, not 1/0 or yes/no.
  • Group related variables with a common prefix: MYAPP_REDIS_HOST, MYAPP_REDIS_PORT.

Template Files

  • Maintain a .env.example with every variable, documented with comments.
  • Use placeholder values that make the expected format obvious: MYAPP_API_KEY=sk_test_xxxxxxxxxxxx.
  • Script a setup step that copies .env.example to .env if .env does not exist.

Validation with Zod

import { z } from 'zod';

const envSchema = z.object({
  NODE_ENV: z.enum(['development', 'staging', 'production']),
  PORT: z.coerce.number().int().min(1).max(65535).default(3000),
  DATABASE_URL: z.string().url(),
  API_KEY: z.string().min(10),
  ENABLE_CACHE: z.coerce.boolean().default(false),
});

export const env = envSchema.parse(process.env);
  • Call this at application startup, before any other initialization.
  • Fail fast with a clear error listing all missing or invalid variables.
  • Export the parsed result as a typed object. Never access process.env directly elsewhere.
  • Use z.coerce for numbers and booleans since env vars are always strings.

Validation with Envalid

import { cleanEnv, str, port, bool, url } from 'envalid';

export const env = cleanEnv(process.env, {
  NODE_ENV: str({ choices: ['development', 'staging', 'production'] }),
  PORT: port({ default: 3000 }),
  DATABASE_URL: url(),
  API_KEY: str(),
  ENABLE_CACHE: bool({ default: false }),
});

Read the full file on GitHub · 209 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 209 lines · 35 tokens per session scan A 66353e9cbf5f

Subscribe to this mod's changes

env-config is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 1,757 once invoked, about $0.0002 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-08-31.