runtime-env/runtime-env/runtime-env-vite-plugin
Claude Code and agent skill by runtime-env/runtime-env
- community
Checking that the SKILL.md file is still in the repository.
Guidance on using runtime-env with Vite to distinguish between runtime and build-time environment variables.
Install
npx vskill@latest install runtime-env/runtime-env/runtime-env-vite-pluginSKILL.md
runtime-env-vite-plugin
This skill ensures that environment variables are handled correctly in Vite projects by distinguishing between build-time (static) variables and runtime (dynamic) variables. It enforces a sequential workflow to ensure proper analysis and clean implementation.
When to apply
You MUST apply this skill when:
- Setting up a new Vite project that requires environment variables.
- Refactoring an existing Vite project to use runtime environment variables.
- Adding new environment variables to a project already using
@runtime-env/vite-plugin.
Execution Sequence
This skill MUST be executed in the following order. Do not skip steps:
- [01 - Setup](./references/01-setup.md): Infrastructure, installation, and initial configuration.
- [02 - Discovery](./references/02-discovery.md): Analyzing the codebase to identify variables and their true types (The "Think" phase).
- [03 - Migration](./references/03-migration.md): Applying the schema and updating the source code (The "Act" phase).
Pattern Guides
- [The String Trap](./references/the-string-trap.md): How to avoid manual parsing and leverage
runtimeEnvfor type safety.
Core Mandates
- Never assume a variable is a string just because it was one in a legacy file. Always perform discovery.
- Always remove manual parsing logic (
parseInt,JSON.parse) during migration. - Always run
npx runtime-env gen-tsafter updating the schema. - Always place the script tag in
index.htmlbefore the app entry point.
Strict Prohibitions
- NEVER use the
defaultkeyword in.runtimeenvschema.json. All environment values must originate from the environment. - NEVER modify or delete existing
.envfiles. They are read-only sources of truth. - NEVER add
import { runtimeEnv } from ...or similar.runtimeEnvis a global. - NEVER add redundant
gen-tsorgen-jsscripts topackage.json.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/runtime-env-vite-plugin/SKILL.md
Popularity
- Repository stars
- 48
- Repository forks
- 2
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/runtime-env/runtime-env/runtime-env-vite-plugin)