environment-manager

Manage environment configurations, secrets, and .env files across environments. Use when configuring application environments or managing secrets.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 5, 2026

When & Why to Use This Skill

The Environment Manager skill is a comprehensive utility designed to streamline the management of environment configurations, secrets, and .env files across various deployment stages. It helps developers and DevOps engineers automate the creation of .env templates, perform strict validation of mandatory variables to prevent runtime errors, and ensure the secure handling of sensitive credentials. By centralizing configuration logic, it enhances application security, reduces 'missing variable' bugs, and improves team collaboration through better documentation of environment requirements.

Use Cases

  • Standardized Project Bootstrapping: Quickly generate .env templates and .env.example files for new projects, ensuring consistent configuration structures for databases, caches, and third-party services.
  • Pre-deployment Environment Validation: Implement automated checks to verify that all required environment variables are present and correctly formatted before the application starts, preventing production crashes.
  • Secure Secrets Management: Organize and manage sensitive API keys, JWT secrets, and database credentials across development, staging, and production environments while maintaining security best practices.
  • Configuration Documentation: Automatically generate descriptive documentation for environment variables, making it easier for new team members to understand the system's configuration needs and dependencies.
nameenvironment-manager
descriptionManage environment configurations, secrets, and .env files across environments. Use when configuring application environments or managing secrets.

Environment Manager Skill

環境変数管理を支援するスキルです。

主な機能

  • .env ファイル生成: テンプレート作成
  • 環境変数検証: 必須項目チェック
  • セキュリティ: 機密情報の扱い
  • ドキュメント: 変数の説明

.env テンプレート

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/myapp
DATABASE_POOL_SIZE=10

# Redis
REDIS_URL=redis://localhost:6379
REDIS_TTL=3600

# API Keys (Never commit actual keys!)
STRIPE_SECRET_KEY=sk_test_...
SENDGRID_API_KEY=SG...

# App Config
NODE_ENV=development
PORT=3000
LOG_LEVEL=debug

# JWT
JWT_SECRET=your-secret-key-here
JWT_EXPIRES_IN=7d

.env.example

# Database Configuration
DATABASE_URL=postgresql://user:password@host:5432/dbname

# API Keys (Get from https://dashboard.stripe.com)
STRIPE_SECRET_KEY=

# Application
NODE_ENV=development
PORT=3000

環境変数検証

// config/env.js
const requiredEnvVars = [
  'DATABASE_URL',
  'REDIS_URL',
  'JWT_SECRET'
];

function validateEnv() {
  const missing = requiredEnvVars.filter(key => !process.env[key]);

  if (missing.length > 0) {
    throw new Error(`Missing required environment variables: ${missing.join(', ')}`);
  }
}

validateEnv();

バージョン情報

  • Version: 1.0.0