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 luqiang-code/claude-code-skills --skill env-validatorgit clone --depth 1 https://github.com/luqiang-code/claude-code-skillsWrote 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/luqiang-code/claude-code-skills/env-validator)<a href="https://agentmods.dev/skills/luqiang-code/claude-code-skills/env-validator"><img src="https://agentmods.dev/badge/skills/luqiang-code/claude-code-skills/env-validator/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/luqiang-code/claude-code-skills/env-validator"><img src="https://agentmods.dev/badge/skills/luqiang-code/claude-code-skills/env-validator.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.00045 | $0.00625 |
| Opus 5.5 | $0.00018 | $0.00250 |
| Sonnet 5.5 | $0.00009 | $0.00125 |
| Haiku 4.5 | $0.00005 | $0.00063 |
Grade A, and why
env-validator 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 1mo 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 — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Environment Variable Validator
Validate .env files against a schema to catch misconfigurations at startup.
When to Use
- Adding new environment variables to a project
- Debugging "works on my machine" config issues
- Setting up a new deployment environment
- User mentions "env", "environment variables", ".env validation"
When NOT to Use
- Secrets management (use a vault/secrets manager for production secrets)
- Runtime config that changes frequently (use a config service)
Workflow
- Scan the project for
.env.example,.env, and code that reads env vars - Build a schema of all required and optional env vars with types
- Generate a validation module that runs at startup:
- Check required vars are present
- Validate types (string, number, boolean, URL, email)
- Validate constraints (min/max length, enum values, regex patterns)
- Warn on unused or misspelled vars
- Create/update
.env.examplewith all vars and descriptions - Add a pre-start check script
Output
// src/config/env.ts
const schema = z.object({
PORT: z.coerce.number().min(1024).max(65535).default(3000),
DATABASE_URL: z.string().url().startsWith("postgresql://"),
REDIS_URL: z.string().url().optional(),
JWT_SECRET: z.string().min(32),
LOG_LEVEL: z.enum(["debug", "info", "warn", "error"]).default("info"),
CORS_ORIGIN: z.string().url(),
SMTP_HOST: z.string().optional(),
SMTP_PORT: z.coerce.number().optional(),
});
export const env = schema.parse(process.env);
Key Principles
- Fail fast at startup — don't fail mid-request on missing config
- Use Zod/joi/yup for schema validation (match project's existing stack)
- Always provide clear error messages: "Missing DATABASE_URL. Expected: postgresql://..."
- Generate
.env.examplewith descriptions and defaults - Don't log secrets in validation errors
Notes
- Add
.envto.gitignoreif not already there .env.exampleshould be committed,.envshould never be- Consider adding an
npm run check-envscript for CI
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.
- 1mo ago First seen · 77 lines · 45 tokens per session scan A d128c7d5fa55
env-validator is a skill published in the GitHub repository luqiang-code/claude-code-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 45 tokens to every session and 625 once invoked, about $0.0002 per session on Opus 5.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.
Other skills, from other repositories
microservices-architecture
Microservices architecture patterns and best practices. Use when designing distributed systems, breaking down monoliths, or implementing service communication.
accessibility-a11y
WCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen readers, automated testing.
ai-ml-development
AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.
android-development
Android development with Kotlin, Jetpack Compose, and modern Android architecture. Use when building Android apps, implementing Material Design, or following Android best practices.
audio-production
Professional audio production for music, podcasts, and sound design. Use when working with audio recording, mixing, mastering, or sound design for any medium.
authentication-patterns
OAuth 2.0, JWT, SSO, MFA, NextAuth/Clerk/Supabase Auth implementation patterns.