ワンクリックで
environment-config
Strict rules for environment variable management using Zod validation and src/config/env.ts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Strict rules for environment variable management using Zod validation and src/config/env.ts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
ZGO API development standards including pagination, error handling, and RESTful design
Test patterns, mocking strategies, and organization best practices
Standardized error format, error code clusters, and API client usage for consistent error handling.
Specifications for Zustand stores, React Query hooks, and the Service-Hook-Type pattern with optimistic updates.
Guidelines for managing internationalization (i18n) in the project using next-intl and unified translation patterns.
High-level overview of project structure, mock API architecture, and authentication flow.
| name | environment-config |
| description | Strict rules for environment variable management using Zod validation and src/config/env.ts. |
This skill provides guidelines for managing environment variables in the project. It ensures type safety and prevents runtime errors by using a single source of truth and schema validation.
All environment variables MUST be defined, validated, and exported from src/config/env.ts.
❌ DO NOT:
const apiUrl = process.env.NEXT_PUBLIC_API_URL; // Unsafe, untyped
✅ DO:
import { env } from '@/config/env';
const apiUrl = env.NEXT_PUBLIC_API_URL; // Typed, validated
The project uses zod to validate environment variables at runtime. If a required variable is missing, the application will fail to start with a clear error message.
.env.local: Define the variable and its value.src/config/env.ts:
envSchema object.env export.| Variable | Required | Default | Description |
|---|---|---|---|
NEXT_PUBLIC_API_URL | No | /api | Base URL for API requests. |
NEXT_PUBLIC_GA_MEASUREMENT_ID | No | - | Google Analytics ID. |
NODE_ENV | No | development | App environment (development | production | test). |
[!IMPORTANT] Always use the
envobject from@/config/envto access environment variables. Directly accessingprocess.envis strictly prohibited outside of the config file.