t2000-env-gate

t2000-env-gate is a skill for Claude Code from mission69b/t2000. It costs 120 tokens per session (1,125 once invoked), scanned A, original, MIT.

A shared rule for checking environment variables when applications start. Environment variables are configuration values supplied outside the code, such as API keys.

In plain words
What is it for?
Use it when adding or renaming environment variables, creating an app, reviewing configuration code, or enforcing typed access instead of direct process.env reads.
Why use it?
It makes missing or empty required settings fail early, rather than causing a feature to break quietly after deployment.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

Good fit Use it when adding or renaming environment variables, creating an app, reviewing configuration code, or enforcing typed access instead of direct process.env reads.

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

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 t2000-env-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/mission69b/t2000/t2000-env-gate.svg)](https://agentmods.dev/skills/mission69b/t2000/t2000-env-gate)
Your own site
<a href="https://agentmods.dev/skills/mission69b/t2000/t2000-env-gate"><img src="https://agentmods.dev/badge/skills/mission69b/t2000/t2000-env-gate.svg" alt="Measured on agentmods" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,125 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00120 $0.01125
Opus 5 $0.00060 $0.00562
Sonnet 5 $0.00024 $0.00225
Haiku 4.5 $0.00012 $0.00112

Measured 8d ago against content hash 01499c3cb141, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

t2000-env-gate 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 8d 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/t2000-env-gate/SKILL.md · 121 lines

How it starts

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

Env Validation Gate (cross-app standard)

CLAUDE.md rule 7 states the invariant and the zero-required-vars carve-out. This is the pattern behind it.

Why this rule exists

April 2026: an audric production deploy ran ~4 days with BLOCKVISION_API_KEY="" (empty string in the Vercel UI), silently degrading every BlockVision-backed feature. It surfaced as "the LLM thinks the user has no DeFi positions" — three layers below the actual misconfig. An empty string is truthy-adjacent enough to pass every if (!key) guard and every || fallback, so nothing failed loudly.

The contract

  1. Define a lib/env.ts (Next apps) or src/env.ts (servers) Zod schema.
  2. Required vars use z.string().trim().min(1, …)empty string is invalid.
  3. Optional vars normalize empty/whitespace → undefined.
  4. Schema runs at first import; trigger that import from a boot-time hook:
    • Next.js → instrumentation.ts register()
    • Node server → top of server.ts / index.ts
  5. Export a typed env proxy that throws on server-only access from the client.
  6. Enforce: ESLint no-restricted-syntax on raw process.env.X outside the env module (gateway), or Biome + code review (audric web-v3).

Canonical reference implementation

audric/apps/web-v3/lib/env.ts + audric/apps/web-v3/instrumentation.ts.

import { z } from 'zod';

const requiredString = z.string().trim().min(1, 'must be a non-empty string');
const optionalString = z.string().optional().transform((v) =>
  v === undefined ? undefined : v.trim().length > 0 ? v.trim() : undefined,
);

const serverSchema = z.object({
  ANTHROPIC_API_KEY: requiredString,
  // …
});

const clientSchema = z.object({
  NEXT_PUBLIC_GOOGLE_CLIENT_ID: requiredString,
  // …
});

// Literal references — Next.js static replacement requires this shape:
const runtimeEnv = {
  ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY,
  NEXT_PUBLIC_GOOGLE_CLIENT_ID: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,
  // …
};

const isServer =
  typeof process !== 'undefined' &&
  (typeof process.versions?.node === 'string' ||
    process.env?.NEXT_RUNTIME === 'edge');

const fullSchema = z.object({ ...serverSchema.shape, ...clientSchema.shape });
const parsed = (isServer ? fullSchema : clientSchema).safeParse(runtimeEnv);

if (!parsed.success) {
  // Format ALL issues + the settings URL — operators fix in one click.
  throw new Error(/* formatted block */);
}

export const env = new Proxy(parsed.data, {
  get(target, prop) {
    if (!isServer && SERVER_ONLY_KEYS.has(prop as string)) {
      throw new Error(`[env] Cannot access server-only var '${String(prop)}' from the client`);
    }
    return target[prop as keyof typeof target];
  },
});

Read the full file on GitHub · 121 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. 8d ago First seen · 121 lines · 120 tokens per session scan A 01499c3cb141

Subscribe to this mod's changes

t2000-env-gate is a skill published in the GitHub repository mission69b/t2000 (23 stars, last pushed today), licensed MIT. It adds 120 tokens to every session and 1,125 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

agent-payment-stats

Cross-protocol agent-economy payment metrics from Barker's index. x402 (Base) volume is on-chain verifiable; ACP / AP2 / MPP / AP4M figures are self-reported claims. Separates real vs nominal volume by filtering wash/noise sellers. Use when users ask about x402 volume, agent payment stats, agent economy metrics, or…

barkermoney/barker-mcp · 134 tokens

app

Use when the user asks about interacting with the app's API — querying data, creating resources, checking status. This skill covers all MCP tools and REST endpoints exposed by the server.

MangroveTechnologies/mangrove-agent · 38 tokens

swarmwage-hire

Discover, inspect, dry-run, hire, and pay AI capabilities through Swarmwage. Start with wallet-free capability search and x402 reliability checks; use a dedicated USDC wallet only for real hires or paid external x402 calls.

Swarmwage/swarmwage · 55 tokens

swarmwage-publish

Publish your agent's capabilities to the Swarmwage registry and earn USDC for each call. Lets your agent advertise services (image generation, audio transcription, charting, custom domain workflows…) on the open agent hire protocol — other AI agents discover you, hire you with one function call, and pay you in USDC on…

Swarmwage/swarmwage · 78 tokens

phone

Use when the user wants phone-number intelligence (lookup, carrier, line type, SIM-swap / call-forwarding fraud signals), US/CA number provisioning (rent a phone number), or outbound AI voice calls (Bland.ai under the hood — schedule, confirm, follow-up). Pay per call in USDC.

BlockRunAI/blockrun-mcp · 66 tokens

data-engineering

Builds and operates data pipelines — ingestion, transformation, orchestration, quality testing, and reliability of data delivery. Use this to design or debug a pipeline, decide batch versus streaming, add data quality checks, handle late or duplicate data, or work out why a dashboard's numbers changed without anyone…

cbrock84/headcount · 67 tokens