agentleFS
FirzusFirzus/agent-skills/skills/web/vite-plus/SKILL.md

vite-plus

Skill4 starsChanged 21 days agoMITView on GitHub

Vite+ projects using vite-plus and the vp CLI. Use when setting up, migrating to, or updating Vite+, configuring its checks, tests or library builds, debugging built-in versus script execution, or configuring workspace tasks and caching. Applies to Vite+ integrations, not every standalone Vite project.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the target package and workspace manifests, lockfile, scripts, vite.config.*, TypeScript configuration, and CI commands.

    line 20
  2. Very specific:

    Import defineConfig from vite-plus, preserve existing plugins and unrelated options, and add only the blocks the task needs:

    line 57
  3. Very specific:

    Make sure .gitignore or ignore patterns exclude dependencies and generated output.

    line 76
  4. Very specific:

    Import test APIs from vite-plus/test.

    line 80
  5. Very specific:

    Run vp check, the relevant finite tests, and the owning app or library build, through the project's script when it adds required steps.

    line 111
  6. Distinctive:

    When changing validation or cache configuration, prove the failure boundary in an isolated fixture: introduce a type error, failing …

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Vite+

Work within a project's Vite+ toolchain: choose the command that owns each action, change only the configuration the task needs, and prove the result with the project's real checks. These rules assume the latest Vite+ release is installed. Ordinary feature work uses the toolchain as it is; setting it up, migrating to it, or updating it is a separate, explicit change.

1. Read the project's setup

Read the target package and workspace manifests, lockfile, scripts, vite.config.*, TypeScript configuration, and CI commands. Identify whether the project runs a global vp or only its local vite-plus binary through the package manager. Before using an option not shown here, read vp help <command>.

RequestRead next
Install, scaffold, migrate, update, or change CI setupsetup-and-migration.md
Workspace targeting, shared lint/format policy, or cached tasksworkspaces.md

Done: target package, current command path, and required validation identified.

2. Map each action to its owning command

Intended actionCommand
Bundled app dev server / production buildvp dev / vp build
Existing framework or custom build scriptvp run build
Configured script or taskvp run <name>
Static validation (format, lint, types)vp check
Apply formatting and lint fixesvp check --fix
Check formatting without writing / write itvp fmt --check / vp fmt
Bundled tests, one finite runvp test
Interactive test watchingvp test watch
Library buildvp pack

Built-ins never dispatch to a same-named script: vp build runs the bundled Vite build, while vp run build runs the build script. Keep a script that generates code or calls a framework CLI on its vp run path, and keep any supplemental checks the project already requires.

Done: each requested action mapped to the built-in, script, or task that actually owns it.

3. Configure only the relevant blocks

Import defineConfig from vite-plus, preserve existing plugins and unrelated options, and add only the blocks the task needs:

import { defineConfig } from 'vite-plus';

export default defineConfig({
  lint: {
    options: { typeAware: true, typeCheck: true },
  },
  test: {
    include: ['src/**/*.test.ts'],
  },
});

vp check validates types only when typeAware and typeCheck are enabled and the files belong to its TypeScript projects. Before treating a green exit as full coverage, inspect check.fmt, check.lint, ignore patterns, and CLI skips. Make sure .gitignore or ignore patterns exclude dependencies and generated output. Keep framework-specific type checkers until equivalent coverage is proven.

Import test APIs from vite-plus/test. Import a vite-plus/test/* subpath only when the installed package's exports declares it.

import { expect, test } from 'vite-plus/test';
import { add } from './index';

test('adds two numbers', () => {
  expect(add(2, 3)).toBe(5);
});

For a library, add a pack block with only the formats consumers need:

pack: {
  entry: ['src/index.ts'],
  dts: true,
  format: ['esm', 'cjs'],
}

Inspect the emitted files and align package.json exports and types with their actual names. vp pack only builds: it neither publishes nor replaces a package-manager tarball check.

Done: the changed configuration loaded by the command that uses it, not merely accepted by an editor.

4. Verify the requested behavior

  1. Run vp check, the relevant finite tests, and the owning app or library build, through the project's script when it adds required steps.
  2. Inspect build artifacts. For a library change, import it from a consumer.
  3. When changing validation or cache configuration, prove the failure boundary in an isolated fixture: introduce a type error, failing assertion, or changed task input, require the expected nonzero exit or cache miss, then restore it and require a passing run. A cached replay is not a fresh execution.

scripts/smoke.mjs checks these rules in a temporary Node-mode fixture: commands, failure boundaries, and task caching. Run it with Node when they must be confirmed on a host. It installs the latest vite-plus from npm and calls vp from PATH, so it requires authorization for network installs; it keeps the fixture and logs for review.

Done: exact commands and results reported, with untested scope named. Browser mode, framework migrations, other package managers, and remote CI remain untested unless exercised directly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.