add-env-var

add-env-var is a skill for Claude Code from fpindej/netrock. It costs 8 tokens per session (358 once invoked), scanned A, original, MIT.

A procedure for adding an environment variable to the backend or frontend, including development files, application configuration, Docker builds, and CI settings.

In plain words
What is it for?
Adding API keys, URLs, feature settings, connection details, or other values that change by environment.
Why use it?
It reduces configuration errors across local development, tests, builds, and deployment, while keeping server-only values separate from browser-visible values.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Adding API keys, URLs, feature settings, connection details, or other values that…

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

Made for: Claude Code.

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 add-env-var

README.md
[![agentmods](https://agentmods.dev/badge/skills/fpindej/netrock/add-env-var.svg)](https://agentmods.dev/skills/fpindej/netrock/add-env-var)
Your own site
<a href="https://agentmods.dev/skills/fpindej/netrock/add-env-var"><img src="https://agentmods.dev/badge/skills/fpindej/netrock/add-env-var.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 358 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.00008 $0.00358
Opus 5 $0.00004 $0.00179
Sonnet 5 $0.00002 $0.00072
Haiku 4.5 $0.00001 $0.00036

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

Security

Grade A, and why

add-env-var 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.

.claude/skills/add-env-var/SKILL.md · 30 lines

What it actually says

Adds an environment variable (backend or frontend).

Backend-consumed variable

  1. Add to appsettings.Development.json if it needs a dev-specific value (Aspire injects infrastructure connection strings automatically - only add behavioral config here)
  2. If it maps to an Options class: use Section:Key naming in appsettings (e.g., Authentication:Jwt:AccessTokenLifetime)
  3. If it needs Aspire wiring for local dev: add via .WithEnvironment() in MyProject.AppHost/Program.cs
  4. If it needs an Options class: use /add-options-class

Frontend-consumed variable

  1. Add to src/frontend/.env.example (documentation with placeholder)
  2. Add to src/frontend/.env.test (valid test value for CI)
  3. Add to src/frontend/src/lib/config/server.ts (server-only) or i18n.ts (client-safe)
  4. Never export server config from the barrel ($lib/config/index.ts)

Frontend PUBLIC_* variable (SvelteKit $env/static/public)

  1. Steps 1-2 above
  2. Add ARG + ENV to src/frontend/Dockerfile (before pnpm run build)
  3. Add --build-arg to .github/workflows/docker.yml
  4. Import: import { PUBLIC_VAR } from '$env/static/public';

For secrets or keys that differ per environment (like Turnstile site keys), prefer runtime configuration via $env/dynamic/private with SSR layout data instead of build-time PUBLIC_* args.

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 · 30 lines · 8 tokens per session scan A 68abc8cf0e0b

Subscribe to this mod's changes

add-env-var is a skill published in the GitHub repository fpindej/netrock (231 stars, last pushed 6d ago), licensed MIT. It adds 8 tokens to every session and 358 once invoked, about $0.0000 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-30.