environment-setup

environment-setup is a command for coding agents from imsaif/design-with-claude. It costs 36 tokens per session (769 once invoked), scanned A, original, MIT.

A guide to environment variables, which are private settings such as API keys and passwords kept outside application code. It explains local, development, staging, and production configuration, especially for Next.js.

In plain words
What is it for?
Use it to choose the right .env file, configure separate environments, keep credentials private, and troubleshoot configuration that does not appear to take effect.
Why use it?
It helps prevent secrets from being committed to GitHub and explains why settings can work locally but fail in production. It also covers the need to restart a development server after changes.

Command

Part of the design-with-claude plugin — 1 skill, 48 commands shipped together

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.

agentmods
npx agentmods add commands/imsaif/design-with-claude/environment-setup
Clone the repo
git clone --depth 1 https://github.com/imsaif/design-with-claude

Or install design-with-claude, the plugin that ships this one along with the rest of its 1 skill, 48 commands.

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-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/imsaif/design-with-claude/environment-setup.svg)](https://agentmods.dev/commands/imsaif/design-with-claude/environment-setup)
Your own site
<a href="https://agentmods.dev/commands/imsaif/design-with-claude/environment-setup"><img src="https://agentmods.dev/badge/commands/imsaif/design-with-claude/environment-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 769 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00036 $0.00769
Opus 5 $0.00018 $0.00385
Sonnet 5 $0.00007 $0.00154
Haiku 4.5 $0.00004 $0.00077

Measured 5d ago against content hash a140ae57f745, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

environment-setup 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 5d 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.

commands/environment-setup.md · 79 lines

How it starts

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

You are an Environment Variables Guide for designers. When invoked with $ARGUMENTS, you explain what environment variables are in plain language and guide the designer through setting them up correctly and safely.

What are environment variables (designer explanation)

"Imagine you have a Figma file with sensitive client information. You wouldn't share that file publicly. Environment variables work the same way — they're private settings (like API keys and passwords) that your app needs to run, stored separately from your code so they're never accidentally shared."

The three things to always know

  1. Never commit .env files to GitHub. API keys in public GitHub repos get stolen within minutes by automated bots.
  2. Each environment has its own .env file. Local development (.env.local), staging, and production all have different values.
  3. Environment variables are not automatic. You must restart your dev server after adding or changing them.

File naming conventions (Next.js)

  • .env.local — your local machine only, never committed
  • .env.development — shared development values (no secrets)
  • .env.production — production values (set in Vercel dashboard, not in a file)

Step by step setup

Step 1 — Create your .env.local file

In your project root (same level as package.json):

touch .env.local

Or create it manually in your code editor.

Step 2 — Add your variables

NEXT_PUBLIC_SUPABASE_URL=https://yourproject.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
STRIPE_SECRET_KEY=sk_test_yourkey

Step 3 — Understand the NEXT_PUBLIC_ prefix

  • Variables starting with NEXT_PUBLIC_ are visible in the browser.
  • Variables WITHOUT this prefix are server-only (safer for secrets).
  • Rule: API keys that are meant to be public (Supabase anon key, Stripe publishable key) get NEXT_PUBLIC_. Secret keys (Stripe secret key, database passwords) do NOT.

Step 4 — Add .env.local to .gitignore

Open your .gitignore file and confirm this line exists:

.env.local

If it doesn't, add it. This tells Git to never track this file.

Read the full file on GitHub · 79 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. 5d ago First seen · 79 lines · 36 tokens per session scan A a140ae57f745

Subscribe to this mod's changes

environment-setup is a command published in the GitHub repository imsaif/design-with-claude (11 stars, last pushed 14d ago), licensed MIT. It adds 36 tokens to every session and 769 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-30.