vite-core-environment-api

vite-core-environment-api is a skill for Claude Code from OpenAEC-Foundation/OpenAEC-Workspace-Composer. It costs 121 tokens per session (2,228 once invoked), scanned A, original, MIT.

Configuration guidance for the Environment API introduced in Vite 6, a build system for web applications.

In plain words
What is it for?
Use it when configuring server-side rendering, edge workers, custom runtimes, or plugins that need different settings in different environments.
Why use it?
It helps avoid using an API that does not exist in Vite 5 and prevents settings from being applied to the wrong execution environment, such as a browser, server, or edge worker.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

Good fit Use it when configuring server-side rendering, edge workers, custom runtimes, or plugins that need different settings in different environments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/openaec-foundation/openaec-workspace-composer/vite-core-environment-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OpenAEC-Foundation/OpenAEC-Workspace-Composer --skill vite-core-environment-api
Clone the repo
git clone --depth 1 https://github.com/OpenAEC-Foundation/OpenAEC-Workspace-Composer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vite-core-environment-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-core-environment-api/github.svg)](https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-core-environment-api)
Your own site
<a href="https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-core-environment-api"><img src="https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-core-environment-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vite-core-environment-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-core-environment-api"><img src="https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-core-environment-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,228 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00121 $0.02228
Opus 5 $0.00060 $0.01114
Sonnet 5 $0.00024 $0.00446
Haiku 4.5 $0.00012 $0.00223

Measured 10d ago against content hash a57d4e9acb19, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

vite-core-environment-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/vite/vite-core/vite-core-environment-api/SKILL.md · 247 lines

How it starts

The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.

vite-core-environment-api

Vite 6+ ONLY — The Environment API does NOT exist in Vite 5 or earlier. ALWAYS verify you are targeting Vite 6.x before using any API described in this skill.

Quick Reference

What the Environment API Is

The Environment API formalizes how Vite handles different execution contexts. Before Vite 6, only implicit client and optional ssr environments existed. Vite 6 introduces explicit, named environments to match production setups (browser, Node server, edge workers, custom runtimes).

Core problem solved: Closing the gap between dev and build — server code now runs in matching runtimes during development.

Backward Compatibility

Scenario Action Required
SPA / MPA (no SSR) None — Vite applies options to implicit client environment
SSR with default Node server Minimal — existing ssr config maps to environments.ssr
Multi-environment (edge, workers) New config — define named environments explicitly
Plugin authors Migrate — move toward explicit per-environment hooks

Target Audiences

Audience Interaction Level
End Users Basic config for SPAs; explicit environments block for SSR/complex apps
Plugin Authors Access per-environment hooks and consistent APIs
Framework Authors Programmatic environment configuration and orchestration
Runtime Providers Supply custom environment providers for their platforms (e.g., Cloudflare)

Release Status

The Environment API is in release candidate phase. Stability is maintained between major releases, but specific APIs remain experimental. The ecosystem should experiment before full stabilization in a future major version.

Critical Warnings

NEVER assume the Environment API works in Vite 5 — it is a Vite 6+ feature. Attempting to use environments config in Vite 5 will be silently ignored or cause errors.

NEVER expect optimizeDeps to propagate to server environments — it applies ONLY to client environments by default. ALWAYS configure optimizeDeps explicitly for non-client environments if needed.

Read the full file on GitHub · 247 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 247 lines · 121 tokens per session scan A a57d4e9acb19

Subscribe to this mod's changes

vite-core-environment-api is a skill published in the GitHub repository OpenAEC-Foundation/OpenAEC-Workspace-Composer (5 stars, last pushed 5mo ago), licensed MIT. It adds 121 tokens to every session and 2,228 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

massing-bim

Drive a Massing BIM/AEC project from an AI agent over MCP — read a project's status, records, CDE, KPI and model-quality checks; run standards-compliance, schedule-risk, embodied-carbon, permit- readiness and drawing-QA analyses; author the IFC model with GUID-stable recipes; and draft RFIs. Use when the user asks to…

ibuilder/massing · 90 tokens

ara3d-sdk

Use when processing AEC/BIM 3D data in .NET 8 — mesh generation and transformation, SIMD-accelerated math, IFC/STEP/PLY to glTF/GLB/VIM conversion, plugin development. Ara3D-SDK: high-performance .NET 3D geometry and BIM library suite.

znlgis/opengis-skills · 70 tokens

elements

Use when generating building information models (BIM) programmatically in C#/.NET — wall, beam, column, floor creation, geometry kernel (BREP/CSG), glTF/IFC/JSON serialization, MEP systems, spatial grids. Hypar Elements: the smallest useful BIM — a cross-platform C# library for creating building elements without…

znlgis/opengis-skills · 81 tokens

3d-skills

Use when working with 3D Gaussian Splatting (3DGS), .ply model cleanup/compression/publishing, interactive 360-degree panorama visualization and virtual tours, AEC/BIM 3D data processing, or CSG solid modeling. Index of 5 skills: SuperSplat, Photo-Sphere-Viewer, Ara3D-SDK, Elements, and OpenCSG.NET.

znlgis/opengis-skills · 86 tokens

aios-arch

A workflow for reviewing software architecture, including service boundaries, technical choices, data and model boundaries, AI workflows, reliability, and long-term complexity.

ArchSightLabs/archsight-aios · 57 tokens

aios-product

A product-management workflow for turning an approved direction into a defined software version with a product brief, priorities, acceptance measures, pilot or user-acceptance testing, and handover details.

ArchSightLabs/archsight-aios · 76 tokens