AgentSkillsCN

env-constants

生成 src/shared/EnvConsts.ts 文件,实现类型安全的环境变量访问。提供 TypeScript 接口与导出机制,便于在整个应用中安全地访问 Vite 环境变量。

SKILL.md
--- frontmatter
name: env-constants
description: Generates src/shared/EnvConsts.ts for type-safe environment variable access. Provides TypeScript interface and exports for accessing Vite environment variables throughout the application.

Environment Constants Skill

Purpose

Generate the src/shared/EnvConsts.ts file for accessing environment variables with type safety.

Output

Create the file: src/shared/EnvConsts.ts

Example File

See: examples.md in this directory for complete examples and detailed explanations.

Notes

  • Wraps Vite's import.meta.env for type safety
  • Provides default values for all environment variables.