agentleFS
tellmefrankietellmefrankie/ai-investment-skills/env-doctor/SKILL.md

env-doctor

Skill14 starsChanged 6 months agoMITView on GitHub

Diagnose your .env file before deployment. Catches the configuration bugs that only show up in production at 2 AM. The classic: ANTHROPIC_API_KEY=sk-ant-XXXX — copied from docs, never replaced The silent fail: DATABASE_URL= — trailing space means the var is a single space, not empty. Some parsers treat this as set. The Windows trap: .env edited on Windows has \r\n line endings. Some Node.js dotenv parsers include the \r in the value. "mypassword\r" is not "mypassword". The gitignore miss: .env.production not…

  • Reads credentials

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read tool access (reads .env and .env.example)

    line 93
  2. Distinctive:

    No API keys needed — pure text analysis

    line 94

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Env Doctor

Diagnose your .env file before deployment. Catches the configuration bugs that only show up in production at 2 AM.

What it does

  • Compares .env against .env.example — finds missing vars
  • Detects placeholder values never replaced (..., your-key-here, sk-ant-XXXX)
  • Flags secrets that look wrong (wrong prefix, wrong length, wrong format)
  • Checks for common mistakes: trailing spaces, Windows line endings, BOM markers
  • Warns about vars that exist in .env but not in .env.example (undocumented secrets)
  • Validates known API key formats (Anthropic, OpenAI, Stripe, Polygon, Telegram)

Usage

Run env doctor on this project.
Compare .env against .env.example.
Check for: missing vars, placeholder values, format issues, undocumented secrets.

Example Output

Env Doctor — 2026-05-13

MISSING VARS (in .env.example but not in .env)
  POLYGON_API_KEY          — required for options scanner
  NAVER_CLIENT_SECRET      — required for Korean news feed

PLACEHOLDER VALUES (never replaced)
  TWITTER_BEARER_TOKEN = "..."        — still default
  TWITTER_API_KEY = "..."             — still default

FORMAT WARNINGS
  ANTHROPIC_API_KEY = "sk-ant-api03-..."
    OK: correct prefix, length looks right

  TELEGRAM_BOT_TOKEN = "1234567890:ABC..."
    OK: correct format (number:hash)

  POLYGON_API_KEY = ""
    WARN: empty string — key exists but has no value

UNDOCUMENTED SECRETS (in .env but not in .env.example)
  DEVTO_API_KEY            — consider adding to .env.example with placeholder

ENCODING ISSUES
  None found (UTF-8, Unix line endings)

SUMMARY
  2 missing required vars
  2 placeholder vars not replaced
  1 undocumented secret
  0 encoding issues

Run: cp .env.example .env.local and fill in missing values

Validated API key formats

ServiceExpected formatExample
Anthropicsk-ant-api03-...50+ chars
OpenAIsk-proj-... or sk-...51 chars
Stripesk_live_... or sk_test_...32+ chars
Polygon.ioalphanumeric, 32 chars
Telegram Bot{number}:{hash}1234567890:ABC...
dev.toalphanumeric, 20 chars

Configuration

Run env doctor:
Files: .env vs .env.example
Check format: ANTHROPIC_API_KEY, TELEGRAM_BOT_TOKEN, POLYGON_API_KEY
Required vars: ANTHROPIC_API_KEY, TELEGRAM_BOT_TOKEN, TELEGRAM_CHANNEL_ID
Warn if any var contains: "...", "your-", "xxx", "test", "placeholder"

Common catches

The classic: ANTHROPIC_API_KEY=sk-ant-XXXX — copied from docs, never replaced

The silent fail: DATABASE_URL= — trailing space means the var is a single space, not empty. Some parsers treat this as set.

The Windows trap: .env edited on Windows has \r\n line endings. Some Node.js dotenv parsers include the \r in the value. "mypassword\r" is not "mypassword".

The gitignore miss: .env.production not in .gitignore. Happens when someone adds a new env file variant.

Requirements

  • Read tool access (reads .env and .env.example)
  • No API keys needed — pure text analysis

Free

Fully free and open source.

→ https://github.com/tellmefrankie/news-engine

Author

Built after a production deploy failed because TELEGRAM_BOT_TOKEN was still "..." in the production .env. The env doctor would have caught it in 2 seconds.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.