Skip to content
Agentmart
Submit a tool

env-config

Design and manage application configuration across environments.

Skill by roborracle

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/roborracle-env-config

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Design and manage application configuration across environments. Covers environment variable conventions, startup validation, config parity checks, and .env.example maintenance.

Use cases: design

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/env-config

What's inside

Skill name
env-config
Description
Design and manage application configuration across environments. Covers environment variable conventions, startup validation, config parity checks, and .env.example maintenance.
License
MIT
Instructions
105 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Environment & Configuration Manager

## Environment Variable Design

### Naming Convention
```
[APP]_[CATEGORY]_[NAME]

APP_DB_HOST=localhost
APP_DB_PORT=5432
APP_REDIS_URL=redis://localhost:6379
APP_STRIPE_SECRET_KEY=sk_test_...
APP_LOG_LEVEL=info
APP_FEATURE_NEW_CHECKOUT=true
```

### Required vs. Optional
```typescript
// Required — fail fast at startup if missing
const DB_HOST = requireEnv('APP_DB_HOST');

// Optional — use sensible default
const LOG_LEVEL = process.env.APP_LOG_LEVEL || 'info';
const PORT = parseInt(process.env.PORT || '3000', 10);
```

### Startup Validation Pattern
```typescript
function validateConfig(): Config {
  const errors: string[] = [];

  const required = ['DATABASE_URL', 'SESSION_SECRET', 'API_KEY'];
  for (const key of required) {
    if (!process.env[key]) errors.push(`Missing required: ${key}`);
  }

  const port = parseInt(process.env.PORT || '3000', 10);
  if (isNaN(port) || port < 1 || port > 65535) {
    errors.push(`Invalid PORT: ${process.env.PORT}`);
  }

  if (errors.length > 0) {
    console.error('Configuration errors:\n' + errors.map(e => `  - ${e}`).join('\n'));
    process.exit(1);
  }

  return { /* validated config object */ };
}
```

## .env File Management

### .env.example Template
```bash
# Database
APP_DB_HOST=localhost         # Required — local or cloud DB host

# External Services
APP_STRIPE_SECRET_KEY=        # Required — get from Stripe dashboard

# Application
APP_LOG_LEVEL=info            # debug | info | warn | error
```

### Rules
- `.env` is ALWAYS in `.gitignore` — never committed
- `.env.example` is ALWAYS committed — documents all variables
- Every variable in `.env` must exist in `.env.example` (with empty or default value)
- Comments in `.env.example` explain where to get each value
- Mark required vs. optional clearly

## Environment Parity

### Configuration per Environment
| Variable | Development | Staging | Production |
|----------|------------|---------|------------|
| LOG_LEVEL | debug | info | warn |
| API keys | test keys | test keys | production keys |

### Parity Check
Verify staging mirrors production config structure:
- Same env vars defined (different values expected)
- Same services connected (different instances)
- Same feature flags available (different states OK)

## Feature Flags
```typescript
// Simple boolean flags from env vars
const FEATURES = {
  newCheckout: process.env.APP_FEATURE_NEW_CHECKOUT === 'true',
  betaApi: process.env.APP_FEATURE_BETA_API === 'true',
};

// Usage
if (FEATURES.newCheckout) { /* new path */ }
```

## Anti-Patterns
- Hardcoded values that differ between environments (URLs, ports, keys)
- Reading `process.env` deep inside business logic (read at startup, pass as config)
- Environment-specific `if` statements in code (`if (NODE_ENV === 'production')`)
- Secrets in docker-compose.yml, CI config, or Dockerfiles
- Using `NODE_ENV` for anything other than framework behavior

From roborracle/agent-workflow-kit, MIT.

More from roborracle/agent-workflow-kit

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Aug 11, 2026 (2 months ago)
Last release
Aug 11, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from roborracle

Cite this page

env-config skill. Agent Mart. https://agentmart.dev/skills/roborracle-env-config (last updated 2026-10-24)