vite-impl-library-mode

vite-impl-library-mode is a skill for Claude Code from OpenAEC-Foundation/OpenAEC-Workspace-Composer. It costs 118 tokens per session (2,264 once invoked), scanned A, original, MIT.

A guide to configuring Vite to build reusable JavaScript packages for publishing to npm. It covers browser and Node.js output formats and package export settings.

In plain words
What is it for?
Use it when creating a library, npm package, or builds in ESM, CommonJS, UMD, or IIFE formats.
Why use it?
It helps prevent peer libraries such as React or Vue from being bundled into the package and avoids invalid output settings.

Skill for Claude Code

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

Good fit Use it when creating a library, npm package, or builds in ESM, CommonJS, UMD, or IIFE formats.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-impl-library-mode"><img src="https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-impl-library-mode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,264 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.00118 $0.02264
Opus 5.5 $0.00047 $0.00906
Sonnet 5.5 $0.00024 $0.00453
Haiku 4.5 $0.00012 $0.00226

Measured 3mo ago against content hash 60dc6f9024c1, 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-library-mode 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-library-mode/SKILL.md · 335 lines

How it starts

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

vite-impl-library-mode

Quick Reference

build.lib Configuration Options

Option Type Required Description
entry string | string[] | Record<string, string> YES Entry point(s) for the library
name string UMD/IIFE only Global variable name exposed on window
fileName string | ((format, entryName) => string) NO Output file name (auto-adds format extension)
formats ('es' | 'cjs' | 'umd' | 'iife')[] NO Output formats (see defaults below)
cssFileName string NO Custom CSS output filename

Default Output Formats

Entry Type Default Formats Reason
Single entry ['es', 'umd'] UMD provides browser/Node compatibility
Multiple entries ['es', 'cjs'] CJS for Node, ES for bundlers

Critical Warnings

ALWAYS set name when using umd or iife formats -- this defines the global variable name (e.g., window.MyLib). Builds FAIL without it.

ALWAYS externalize peer dependencies (React, Vue, Angular, etc.) -- bundling them causes version conflicts and bloated packages.

NEVER rely on build.assetsDir in library mode -- it has NO effect. Assets are placed alongside output files.

NEVER import CSS at the library entry point and expect consumers to get it automatically -- CSS is extracted to a separate file that consumers MUST import explicitly.

ALWAYS use rolldownOptions.external in Vite 8.x and rollupOptions.external in Vite 6.x/7.x -- the option name changed with the bundler migration.


Decision Tree: Library Mode Setup

Need to build an npm package with Vite?
├── YES → Set build.lib with entry point
│   ├── Single entry point?
│   │   ├── YES → entry: resolve(import.meta.dirname, 'lib/main.ts')
│   │   │   ├── Need browser global (UMD)? → Set name + formats: ['es', 'umd']
│   │   │   └── ESM only? → Set formats: ['es']
│   │   └── NO (multiple entries) → entry: { name: 'path', ... }
│   │       └── Default formats: ['es', 'cjs']
│   ├── Has peer dependencies (React, Vue, etc.)?
│   │   └── YES → Add to rolldownOptions.external + output.globals (UMD)
│   ├── Has CSS?
│   │   └── YES → Set cssFileName, add export to package.json
│   └── Need TypeScript declarations?
│       └── YES → Install vite-plugin-dts
└── NO → Use standard Vite app build

Read the full file on GitHub · 335 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 · 335 lines · 118 tokens per session scan A 60dc6f9024c1

Subscribe to this mod's changes

vite-impl-library-mode is a skill published in the GitHub repository OpenAEC-Foundation/OpenAEC-Workspace-Composer (8 stars, last pushed 2mo ago), licensed MIT. It adds 118 tokens to every session and 2,264 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-library-mode compared with skills from other repositories

vite-impl-library-mode next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vite-impl-library-modeOpenAEC-Foundation/OpenAEC-Workspace-ComposerSkill82mo agoMITA118Claude 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