vitest-config-generator_skill

This skill generates a complete Vitest configuration file (vitest.config.ts) with test environment, coverage, and setup for fast unit tests.
  • TypeScript

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill ehtbanton/claudeskillsrepo --skill vitest-config-generator

  • SKILL.md944 B

Overview

This skill generates complete Vitest configuration files (vitest.config.ts) for fast unit and integration testing in JavaScript and TypeScript projects. It creates valid Vitest 1.x configurations with sensible defaults for environment, globals, coverage, and setup files. Use it to quickly scaffold test configs for frameworks like React or plain Node projects.

How this skill works

When triggered, the skill outputs a ready-to-use vitest.config.ts file that conforms to Vitest 1.x syntax. It selects test environment (jsdom or node), toggles globals, and can include coverage settings, setup files, and common aliases. The generated config is minimal by default but can be expanded to include reporters, transform options, or custom hooks.

When to use it

  • Starting a new JavaScript/TypeScript project and you need a test runner config.
  • Adding unit tests to a React app and you want jsdom plus coverage enabled.
  • Converting a Jest setup to Vitest and you need a baseline configuration.
  • Quickly scaffolding CI-friendly test settings with coverage thresholds.
  • Creating an integration test environment that needs specific setup files.

Best practices

  • Choose 'jsdom' for browser-like tests (React) and 'node' for pure backend tests.
  • Enable globals when using describe/it/test without importing them in every file.
  • Add a setup file to initialize test utilities, mocks, or global state.
  • Include coverage config and thresholds in CI to prevent regressions.
  • Keep the config minimal and add transforms or plugins only as needed.

Example use cases

  • Create vitest config for React with jsdom, globals, and coverage enabled.
  • Generate a Node-focused config with environment set to 'node' and no jsdom.
  • Add a setupFiles option to initialize testing-library or global mocks.
  • Produce a CI-ready config that outputs coverage reports in lcov and text formats.
  • Generate TypeScript-aware config with proper module resolution and alias support.

FAQ

It produces a vitest.config.ts file with valid Vitest 1.x configuration.

Which environment should I choose for React?

Use 'jsdom' for React to simulate a browser environment; use 'node' for backend code.

Can it enable coverage automatically?

Yes. The generated config can include coverage settings and common report formats.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
vitest-config-generator skill by ehtbanton/claudeskillsrepo | VeilStrat