Claude Code Plugins

Community-maintained marketplace

Feedback

environment-configuration

@TakumiOkayasu/dotfile-work
0
0

環境変数やシークレットを管理する際に使用。

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name environment-configuration
description 環境変数やシークレットを管理する際に使用。

Environment Configuration

🚨 鉄則

設定はコードから分離。機密情報はコードに書かない。

.env

# .env.example (✅ コミットする)
DATABASE_URL=postgres://user:pass@localhost/db

# .env (🚫 コミットしない)
DATABASE_URL=postgres://real:pass@prod/db

バリデーション

// ⚠️ 起動時に検証
const required = ['DATABASE_URL', 'JWT_SECRET'];
const missing = required.filter(k => !process.env[k]);
if (missing.length) throw new Error(`Missing: ${missing}`);

🚫 禁止事項

// ❌ ハードコード
const API_KEY = 'sk-live-xxxxx';

// ❌ ログ出力
console.log('Password:', password);

// ❌ エラーに含める
throw new Error(`Failed with token: ${token}`);

.gitignore

.env
.env.local
.env.*.local
!.env.example  # ⚠️ テンプレートはコミット