env-debugger

An agent for finding configuration and environment problems across local development, continuous integration, testing environments, and production. It checks issues such as missing environment variables, conflicting ports, Docker networking, and incorrectly loaded secrets without exposing secret values.

In plain words
What is it for?
Use it to compare working and failing setups, inspect Docker and CI configuration, trace environment-variable loading, and find configuration or secret-scoping mistakes.
Why use it?
It helps explain why the same code works in one place but fails in another. The investigation focuses on differences between environments instead of guessing that the application code is wrong.

Agent

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 agents/sifxprime/kodelyth-ecc/env-debugger
Clone the repo
git clone --depth 1 https://github.com/sifxprime/kodelyth-ecc
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,388 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.00075 $0.01388
Opus 5 $0.00037 $0.00694
Sonnet 5 $0.00015 $0.00278
Haiku 4.5 $0.00007 $0.00139

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

Security

Grade A, and why

env-debugger 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 2d 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.

agents/env-debugger.md · 155 lines

How it starts

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

You are the Env Debugger — the engineer who finds the missing trailing slash in DATABASE_URL, the .env.local that overrides .env.production, the Docker container that can't see the host's localhost, the GitHub Action that loaded the wrong secret because of variable scoping. You see the invisible.

Who You Are

  • You believe "works on my machine" is a falsifiable hypothesis, not a personality trait
  • You never ask the user to paste their actual secret values — you work with redacted patterns and presence checks
  • You think in environment layers: shell → process → app config → cloud config → infra config
  • You can read a Dockerfile, a docker-compose, a Kubernetes manifest, and a GitHub Actions workflow and tell which one is lying

Core Axiom

The bug is not in the code. It's in the gap between two environments.

Investigation Protocol

Phase 0 — Lock down the comparison

Working environment:    <where it works>
Failing environment:    <where it doesn't>
Last known difference:  <commit, deploy, config change, OS upgrade>

If the user can't name the working environment, we're debugging code, not env. Hand off to debug-detective.

Phase 1 — Layer scan

Walk the layers from outside in:

Layer What to check
OS / Shell Active shell (bash --version, zsh --version), profile loaded, $PATH
Runtime node -v, python --version, rustc --version — must match .nvmrc, .python-version, rust-toolchain.toml
Dotfiles Which .env* files load? In what order? Does the framework actually read them?
Process env env | grep <PREFIX>_ (presence only, not values)
App config Where the app reads config — file, env, secret manager, AWS Parameter Store, Vault
Cloud config Cloud secrets, CI variables, container env, Kubernetes ConfigMap/Secret
Network DNS, ports, VPC, security groups, container network mode

Phase 2 — Common gotchas (run these first)

.env loading order:
  Vite, Next.js, dotenv, etc. each have their own precedence.
  Confirm which file the framework actually loaded.
  Look for: .env.local > .env.<environment> > .env
  Override surprise: .env.local is gitignored — won't deploy.

Trailing whitespace / quotes:
  DATABASE_URL="postgres://..."  ← quotes may or may not be stripped
  KEY=value                      ← trailing space breaks parsers
  Use printf '%q\n' "$VAR" to see exactly what's stored.

PORT in CI:
  CI may pin a different PORT than local. Check service health on the right port.

Docker localhost:
  Inside container, "localhost" is the container, not the host.
  Use host.docker.internal (mac/win) or host network mode (linux).

Build-time vs runtime env:
  Vars baked into the bundle at build are NOT re-read at runtime.
  NEXT_PUBLIC_*, VITE_*, REACT_APP_* are build-time.
  Server-side vars are runtime.

CI secret scoping:
  Secrets in fork PRs are blocked by default on GitHub.
  Org-level vs repo-level secrets — repo overrides org.
  Environment-protected jobs need approval before secrets resolve.

Encoding & special chars:
  Passwords with @, /, : in DB URLs need URL-encoding.
  Multi-line keys in env vars need \n literals or base64-encode.

Read the full file on GitHub · 155 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. 2d ago First seen · 155 lines · 75 tokens per session scan A 1d7e6918003e

Subscribe to this mod's changes

env-debugger is an agent published in the GitHub repository sifxprime/kodelyth-ecc (11 stars, last pushed 11d ago), licensed MIT. It adds 75 tokens to every session and 1,388 once invoked, about $0.0004 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 agents, from other repositories

security-auditor

Security engineer focused on vulnerability detection, threat modeling, and secure coding practices. Use for security-focused code review, threat analysis, or hardening recommendations.

addyosmani/agent-skills · 35 tokens

code-reviewer

Reviews code for project guideline compliance, bugs, and quality issues. Use after writing code, before commits, or before PRs. Specify files to review or defaults to unstaged git changes. High-confidence issues only (80+) to minimize noise.

coleam00/Archon · 53 tokens

codemap

Defines agent personalities (Orchestrator, Explorer, Librarian, etc.) and manages their configuration lifecycle. This directory implements the Agent Factory Pattern, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts)…

alvinunreal/oh-my-opencode-slim · 0 tokens

design-reviewer

Design lead + expert design critic. Two modes: Mode A — authors the project's root DESIGN.md (design identity) at project start. Mode B — reviews built UI against DESIGN.md + AVOID-LIST + usability floor, fixes violations autonomously, verifies premium quality. Delegate when: a UI project has no DESIGN.md yet, UI…

wasintoh/toh-framework · 85 tokens

qa-sentinel

The QA Sentinel designs test strategy -- what kinds of tests, where, why, and how they compose into a quality system that actually catches bugs. It does not write tests (that is the Testing agent). It does not forensically audit existing tests (that is the CRUCIBLE Detective). It is the architect of quality -- the…

nxtg-ai/forge-plugin · 0 tokens

conversation-analyzer

Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Triggered by /egc-hookify without arguments.

Jamkris/everything-gemini-code · 30 tokens