Communitygithub.com

ComeOnOliver/skillshub

환경 변수, 설정 파일의 유효성을 검증하고, 모든 필수 설정이 문서화되었는지 확인합니다. .env 파일, 설정(config), 배포 설정 작업 시 사용하세요.

skillshub란 무엇인가요?

이 스킬은 환경 변수와 설정 파일을 체계적으로 검증하여 런타임 오류와 누락된 설정으로 인한 문제를 사전에 방지합니다. 개발자는 .env, config 파일, 배포 설정을 다룰 때 이 스킬을 활용하여 필수 변수가 모두 있는지, 형식이 올바른지, 보안 문제는 없는지 점검할 수 있습니다. Node.js, Python 등 다양한 플랫폼에서 사용할 수 있도록 구체적인 코드 예제와 CLI 명령어를 제공하며, Joi를 이용한 스키마 검증, 환경별 설정 파일 관리, 시크릿 관리자 사용 등 모범 사례를 함께 제시합니다. 또한 `.env.example` 생성, 검증 스크립트 작성, CONFIG.md 문서화까지 자동화하여 설정 관리의 전 과정을 지원합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/crazydubya/configuration-validator

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

설정 검증기 (Configuration Validator)

설정 파일과 환경 변수의 유효성을 검증하여 런타임 오류와 누락된 설정을 방지합니다.

사용 시기

  • 환경 변수나 설정 파일을 다룰 때
  • 배포 또는 설정 문제가 발생했을 때
  • 사용자가 ".env", "config", "environment variables", "settings" 등을 언급할 때

지침

1. 설정 파일 찾기

다음 파일들을 검색하세요:

  • .env, .env.example, .env.local
  • config/, config.js, config.json
  • settings.py, application.yml
  • appsettings.json, .env.production

2. 누락된 변수 감지

.env.example와 .env 비교:

# 예제에는 있지만 .env에는 없는 변수
comm -23 <(grep -o '^[A-Z_]*' .env.example | sort) <(grep -o '^[A-Z_]*' .env | sort)

일반적인 필수 변수:

DATABASE_URL
API_KEY
SECRET_KEY
NODE_ENV
PORT

3. 변수 형식 검증

일반적인 문제 확인:

// 공백이 있는 값에 따옴표 누락
DATABASE_URL=postgres://localhost/db name  // 나쁨
DATABASE_URL="postgres://localhost/db name"  // 좋음

// 프로토콜 누락
API_URL=example.com  // 나쁨
API_URL=https://example.com  // 좋음

// 문자열로 해석될 불리언
DEBUG=true  // 문자열로 해석될 수 있음
DEBUG=1  // 더 명확함

4. 런타임에 필수 변수 검증

Node.js 예제:

const requiredEnvVars = [
  'DATABASE_URL',
  'API_KEY',
  'JWT_SECRET'
];

const missing = requiredEnvVars.filter(v => !process.env[v]);

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

Python 예제:

import os

REQUIRED_ENV_VARS = [
    'DATABASE_URL',
    'SECRET_KEY',
    'ALLOWED_HOSTS'
]

missing = [var for var in REQUIRED_ENV_VARS if not os.getenv(var)]

if missing:
    raise EnvironmentError(f"Missing env vars: {', '.join(missing)}")

5. 타입 검증

타입 검증:

const config = {
  port: parseInt(process.env.PORT || '3000', 10),
  debug: process.env.DEBUG === 'true',
  apiUrl: new URL(process.env.API_URL), // 유효하지 않으면 오류 발생
  maxConnections: Number(process.env.MAX_CONNECTIONS),
};

// 검증
if (isNaN(config.port) || config.port < 1 || config.port > 65535) {
  throw new Error('PORT must be a valid port number');
}

6. .env.example 생성

실제 .env에서 템플릿 생성:

# 값 제거, 키는 유지
sed 's/=.*/=/' .env > .env.example

또는 자리 표시자 사용:

DATABASE_URL=postgres://user:password@localhost:5432/dbname
API_KEY=your_api_key_here
SECRET_KEY=generate_random_secret
PORT=3000
NODE_ENV=development

7. 설정 스키마

스키마 정의 (Joi 예제):

const Joi = require('joi');

const envSchema = Joi.object({
  NODE_ENV: Joi.string()
    .valid('development', 'production', 'test')
    .required(),
  PORT: Joi.number()
    .port()
    .default(3000),
  DATABASE_URL: Joi.string()
    .uri()
    .required(),
  API_KEY: Joi.string()
    .min(32)
    .required(),
  DEBUG: Joi.boolean()
    .default(false),
}).unknown();

const { error, value } = envSchema.validate(process.env);

if (error) {
  throw new Error(`Config validation error: ${error.message}`);
}

module.exports = value;

8. 보안 검사

시크릿을 커밋하지 마세요:

# .env가 gitignore에 있는지 확인
if ! grep -q "^\.env$" .gitignore; then
  echo "Warning: .env not in .gitignore"
fi

# 코드 내 하드코딩된 시크릿 확인
grep -r "api_key.*=.*['\"]" --exclude-dir=node_modules

일반적인 보안 문제:

  • 하드코딩된 비밀번호/키
  • 프로덕션에서 기본 시크릿 사용
  • 민감한 설정 노출
  • 암호화되지 않은 시크릿

9. 환경별 설정

환경별로 구성:

.env.development
.env.staging
.env.production
.env.test

적절히 로드:

require('dotenv').config({
  path: `.env.${process.env.NODE_ENV || 'development'}`
});

10. 모든 변수 문서화

CONFIG.md 생성:

# 설정 (Configuration)

## 환경 변수

### 필수

- `DATABASE_URL`: PostgreSQL 연결 문자열
  - 형식: `postgres://user:pass@host:port/db`
  - 예제: `postgres://app:secret@localhost:5432/myapp`

- `API_KEY`: 서드파티 API 키
  - 획득처: https://dashboard.example.com
  - 필요한 권한: read, write

### 선택 사항

- `PORT`: 서버 포트 (기본값: 3000)
- `DEBUG`: 디버그 로깅 활성화 (기본값: false)
- `MAX_CONNECTIONS`: 데이터베이스 풀 크기 (기본값: 10)

## 설정 방법

1. `.env.example`을 `.env`로 복사
2. 모든 필수 값 입력
3. `npm run validate-config` 실행하여 확인

11. 검증 스크립트

scripts/validate-config.js 생성:

const fs = require('fs');

function validateConfig() {
  const required = ['DATABASE_URL', 'API_KEY'];
  const missing = required.filter(v => !process.env[v]);

  if (missing.length > 0) {
    console.error(`❌ Missing: ${missing.join(', ')}`);
    process.exit(1);
  }

  console.log('✓ All required config variables present');
}

validateConfig();

12. 모범 사례

  • 절대 .env를 커밋하지 마세요: 항상 gitignore에 추가
  • .env.example 유지 관리: 계속 업데이트
  • 시작 시 검증: 잘못 설정되면 빠르게 실패
  • 강력한 기본값 사용: 합리적인 대체값 사용
  • 모든 항목 문서화: 각 변수 설명
  • 시크릿 교체: 키를 정기적으로 업데이트
  • 시크릿 관리자 사용: 프로덕션에서는 Vault, AWS Secrets Manager 사용
  • 타입 검사: 존재 여부뿐만 아니라 타입도 검증

지원 파일

  • templates/config-validator.js
  • templates/.env.example
  • scripts/generate-env-example.sh

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬