vite-syntax-plugin-api

vite-syntax-plugin-api is a skill for Claude Code from OpenAEC-Foundation/OpenAEC-Workspace-Composer. It costs 143 tokens per session (2,109 once invoked), scanned A, original, MIT.

A reference for creating Vite plugins, which are small extensions that change how Vite serves or builds an application. It explains plugin structure, lifecycle hooks, virtual modules, ordering, and when plugins run.

In plain words
What is it for?
Use it when writing plugins, adding custom build steps, creating virtual modules, or controlling whether a plugin runs during development or production builds.
Why use it?
It helps avoid build and development bugs caused by using the wrong hook, incorrect plugin order, or unsupported virtual-module conventions.

Skill for Claude Code

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

Good fit Use it when writing plugins, adding custom build steps, creating virtual modules, or controlling whether a plugin runs during development or production builds.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-syntax-plugin-api"><img src="https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-syntax-plugin-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,109 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.00143 $0.02109
Opus 5.5 $0.00057 $0.00844
Sonnet 5.5 $0.00029 $0.00422
Haiku 4.5 $0.00014 $0.00211

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

Security

Grade A, and why

vite-syntax-plugin-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 2mo 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-syntax/vite-syntax-plugin-api/SKILL.md · 333 lines

How it starts

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

vite-syntax-plugin-api

Quick Reference

Plugin Structure

A Vite plugin is a factory function returning an object with a required name property:

export default function myPlugin(options = {}) {
  return {
    name: 'vite-plugin-my-feature',
    // hooks...
  }
}

Naming Conventions

Type Prefix npm Keywords
Vite-only plugin vite-plugin- vite-plugin
Rolldown plugin rolldown-plugin- rolldown-plugin, vite-plugin
Framework-specific vite-plugin-vue-, vite-plugin-react-, vite-plugin-svelte- framework + vite-plugin

Plugin Execution Order

Plugins execute in this EXACT order:

  1. Alias (internal)
  2. User plugins with enforce: 'pre'
  3. Vite core plugins (internal)
  4. User plugins with no enforce value
  5. Vite build plugins (internal)
  6. User plugins with enforce: 'post'
  7. Vite post-build plugins (internal)

Conditional Application (apply)

// String form: 'build' or 'serve'
apply: 'build',

// Function form: precise control
apply(config, { command }) {
  return command === 'build' && !config.build.ssr
}

Plugin Arrays and Falsy Values

Falsy plugins are ignored. Arrays are flattened. This enables conditional plugins:

plugins: [
  myPlugin(),
  condition ? optionalPlugin() : null,
  [pluginA(), pluginB()],
]

Critical Warnings

NEVER inject plugins inside the config hook -- user plugins resolve BEFORE the config hook runs, so injected plugins have no effect.

NEVER rely on the moduleParsed hook during dev -- Vite does NOT call it for performance reasons. It only runs during production builds.

ALWAYS prefix virtual module IDs with \0 internally -- this prevents other plugins from processing them. The virtual: prefix is for user-facing imports only.

ALWAYS use normalizePath() on file paths in plugins -- Vite uses forward slashes internally, even on Windows.

ALWAYS return null from resolveId and load hooks when a module is NOT handled by your plugin -- returning undefined silently breaks the plugin chain.

Read the full file on GitHub · 333 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. 2mo ago First seen · 333 lines · 143 tokens per session scan A 63858681b016

Subscribe to this mod's changes

vite-syntax-plugin-api is a skill published in the GitHub repository OpenAEC-Foundation/OpenAEC-Workspace-Composer (8 stars, last pushed 2mo ago), licensed MIT. It adds 143 tokens to every session and 2,109 once invoked, about $0.0006 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-09-03.

Related

vite-syntax-plugin-api compared with skills from other repositories

vite-syntax-plugin-api next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vite-syntax-plugin-apiOpenAEC-Foundation/OpenAEC-Workspace-ComposerSkill82mo agoMITA143Claude 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