AI agent env vars checklist
Use AI agents to check environment variables, typed env files and deployment config before shipping app changes.

Put it into practice
What you will produce
A key-only inventory showing server/client boundary, validation source, deployment presence and rotation owner.
- 01
Inventory names without values
Read validation schemas and deployment configuration for required key names; never print values or copy secret files.
Expected result: The inventory contains no secret material.
- 02
Trace server and client use
Find each key’s consumers and confirm secret values stay out of client modules and public bundles.
Expected result: Each key has an exposure boundary.
- 03
Compare validation and deployment
Compare env schema with configured key names using authorized metadata-only access.
Expected result: Missing or unexpected keys are identified without reading values.
- 04
Name rotation ownership
Record who can rotate a credential and update dependent services; do not rotate during the audit.
Expected result: Recovery ownership is clear without changing live credentials.
Checklist before you finish
- Variable names are inventoried without reading or printing their values.
- Public and server-only variables are separated according to their actual use.
- Required values are validated at startup with errors that contain no secret.
- No secret variable is imported into a client module or browser bundle.
- Local, CI and production environments each have an identified configuration source.
- No values appear in logs or diffs, required keys are validated, and public bundles contain no secret variable.
Stop if: Stop and redesign the scope if any required permission, evidence or recovery path is missing.
Acceptance checks
- The inventory contains no secret material.
- Missing or unexpected keys are identified without reading values.
- Recovery ownership is clear without changing live credentials.
Limits and trade-offs
Never print or copy secret values into agent prompts. A variable name may itself disclose internal details; minimize the inventory.
Official sources
Check env vars
Related guides
5 Claude Code Hooks I Use Daily
Claude Code hooks run shell commands on session start, file writes, and tool calls. Here are the 5 I use daily and how to configure them.
Most people discover Claude Code for the AI. They miss the hooks. Hooks are shell commands that execute automatically when something happens in your Claude Code session: a session starts, a tool runs, Claude stops. You define them in .claude/settings.json . They run silently in the background. Here are the 5 I use every day. What hooks look like The available events: SessionStart , UserPromptSubmit , PreToolUse , PostToolUse , Stop . Hook 1 Auto inject date on every prompt Event : UserPromptSubmit Claude doesn't have real time awareness. Every prompt gets the current date injected automatically. Useful for anything time sensitive: changelogs, deadlines, scheduling logic. Hook 2 Push notification when Claude stops Event : Stop Long tasks (refactors, test runs, analysis) can take 2–5 minutes. Without a notification I'd either stare at the screen or miss the result. This fires whenever Claude finishes a task, whether it succeeded or…
Read the guideCLAUDE.md: A Guide for Every Developer
One markdown file that makes AI coding assistants actually understand your codebase. Here's what to put in it.
There's a reason Claude Code writes great code in some projects and generic boilerplate in others. It's not the model. It's CLAUDE.md . It is one part of my Claude Code workflow: project conventions reduce guesswork, but they do not guarantee a speedup or remove the need to review the change. What it is CLAUDE.md is a plain markdown file that Claude Code reads at the start of every session. Think of it as the onboarding doc you'd give a senior contractor on day one: stack, conventions, rules, context. Without it, Claude infers patterns from what it sees in the codebase. Sometimes it infers correctly. Often it doesn't especially for implicit conventions your team just "knows". A CLAUDE.md makes your rules available without repeating them, but does not guarantee compliance: review the diff and run the checks. What to put in it 1. Stack and versions Simple but important. These…
Read the guideClaude Code MCP: Connect Servers & Tools
Claude Code MCP (Model Context Protocol) lets you plug external tools and data into Claude. Full guide: how to add an MCP server, list available ones, and the patterns that work.
A Claude Code conversation can only do so much with the tools shipped in the box. The moment you want Claude to touch Notion, Stripe, your AWS account, a specific database you need MCP. MCP (Model Context Protocol) is the standard that connects Claude to external tools. Here's what it is, how to add servers, and the patterns that don't waste your time. What MCP actually is MCP is an open protocol. A small server process (the "MCP server") exposes a set of tools. Claude Code (the "MCP client") talks to it over stdio or HTTP. When Claude needs to call one of those tools, it sends a JSON RPC request; the server runs the function and returns the result. Three pieces: MCP server the process that exposes tools. Usually npx installable. Examples: filesystem, GitHub, Notion, Stripe, Postgres. MCP client Claude Code itself. It manages connections, surfaces tools to the…
Read the guide