vite-impl-optimization

vite-impl-optimization is a skill for Claude Code from OpenAEC-Foundation/OpenAEC-Workspace-Composer. It costs 124 tokens per session (1,988 once invoked), scanned A, original, MIT.

A guide to how Vite prepares dependencies for its development server. It explains how packages are converted and grouped so the browser can load them efficiently.

In plain words
What is it for?
Use it when configuring dependency pre-bundling, troubleshooting development startup speed, handling monorepo packages, or forcing cache refreshes.
Why use it?
It helps resolve slow development starts, stale dependency caches, and missing packages, especially in a monorepo—a repository containing multiple related projects.

Skill for Claude Code

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

Good fit Use it when configuring dependency pre-bundling, troubleshooting development startup speed, handling monorepo packages, or forcing cache refreshes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/openaec-foundation/openaec-workspace-composer/vite-impl-optimization
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-impl-optimization
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-impl-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-impl-optimization/github.svg)](https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-impl-optimization)
Your own site
<a href="https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-impl-optimization"><img src="https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-impl-optimization/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-impl-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-impl-optimization"><img src="https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-impl-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,988 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.00124 $0.01988
Opus 5.5 $0.00050 $0.00795
Sonnet 5.5 $0.00025 $0.00398
Haiku 4.5 $0.00012 $0.00199

Measured 3mo ago against content hash fbc4c2ad3718, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vite-impl-optimization 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 3mo 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-impl/vite-impl-optimization/SKILL.md · 244 lines

How it starts

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

vite-impl-optimization

Quick Reference

Why Pre-Bundling Exists

Vite pre-bundles dependencies on first dev server start for two reasons:

Reason Problem Solution
CJS/UMD to ESM conversion Dev server serves native ESM only; most npm packages ship CJS/UMD Pre-bundler converts to ESM with smart import analysis
HTTP request reduction ESM deps with many internal modules cause hundreds of requests (e.g., lodash-es = 600+ modules) Pre-bundler collapses into a single module

CRITICAL: Pre-bundling applies ONLY in development mode. Production builds use Rolldown (v8) or Rollup (v5-v7) natively.

Pre-Bundling Tool by Version

Vite Version Pre-Bundling Tool Bundler Options Key
v5, v6, v7 esbuild optimizeDeps.esbuildOptions
v8+ Rolldown optimizeDeps.rolldownOptions

Critical Warnings

NEVER exclude CJS dependencies from pre-bundling -- they MUST be converted to ESM. Excluding a CJS dep causes runtime errors in the browser.

NEVER set optimizeDeps.noDiscovery: true without explicitly listing ALL dependencies in include -- the dev server will fail to resolve unlisted bare imports.

ALWAYS add linked monorepo packages to optimizeDeps.include if they do NOT export ESM -- Vite skips pre-bundling for linked deps by default.

ALWAYS use --force flag after modifying files inside node_modules -- the cache will serve stale pre-bundled code otherwise.


How Automatic Discovery Works

  1. Vite crawls source code starting from HTML entry points (or optimizeDeps.entries)
  2. Every bare import (e.g., import X from 'package-name') is identified
  3. Discovered dependencies are pre-bundled into node_modules/.vite
  4. If a NEW dependency import appears after initial crawl, Vite re-runs pre-bundling and reloads the page

When Discovery Fails

Automatic discovery misses dependencies when:

  • Imports come from plugin-transformed code (not in original source)
  • Dependencies are dynamically imported with variable paths
  • Imports exist only in files not reachable from entry points

Read the full file on GitHub · 244 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. 3mo ago First seen · 244 lines · 124 tokens per session scan A fbc4c2ad3718

Subscribe to this mod's changes

vite-impl-optimization is a skill published in the GitHub repository OpenAEC-Foundation/OpenAEC-Workspace-Composer (8 stars, last pushed 2mo ago), licensed MIT. It adds 124 tokens to every session and 1,988 once invoked, about $0.0005 per session on Opus 5.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

vite-impl-optimization compared with skills from other repositories

vite-impl-optimization next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vite-impl-optimizationOpenAEC-Foundation/OpenAEC-Workspace-ComposerSkill82mo agoMITA124Claude Code
massing-bimibuilder/massingSkill14011d agoMITA90Claude Code, Codex
naviscoord-setupHorizunGroup/naviscoord-mcpSkill2322d agoMITA50Claude Code
aios-archArchSightLabs/archsight-aiosSkill372mo agoApache-2.0A57Claude Code, Codex
aios-productArchSightLabs/archsight-aiosSkill372mo agoApache-2.0A76Claude Code, Codex
aios-tender-writeArchSightLabs/archsight-aiosSkill372mo agoApache-2.0A59Claude Code, Codex
aios-construction-schemeArchSightLabs/archsight-aiosSkill372mo agoApache-2.0A58Claude Code, Codex