LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

vitest

Set up Vitest testing in any project — detects type (Cloudflare Workers, React, Node, library), generates vitest.config.ts, test setup, utilities, and a sample test. Covers mocking patterns, coverage config, workspace setup, Jest migration. Use whenever the user mentions adding tests, setting up Vitest, configuring tests, migrating from Jest, fixing testing infrastructure, or asks 'how do I test this'.

974stars102forksUpdated 8/20/2026
Web DevelopmentTesting & QA#vitest#react#testing#cloudflare-workers#typescript#javascript

Security Assessment

Safe(95/100)
Security Score95/100

About vitest

This skill sets up Vitest testing infrastructure in an existing project by detecting the project type and generating tailored configuration and working test files. It solves the common friction of standing up a correct testing setup: rather than a reference card, it actively creates vitest.config.ts, a test setup file, utilities, and a sample test, then wires up package.json scripts and TypeScript config. It also supports migrating an existing Jest setup to Vitest.

The workflow is: detect, configure, scaffold, and wire up. Detection reads project files (package.json, tsconfig.json, wrangler.toml, vite.config.ts, existing vitest/jest config, and src structure) to classify the project as Cloudflare Workers, React (Vite), React SSR/TanStack Start, Node/Hono API, or a plain library, and to choose the right test environment (node, jsdom, or a split setup). It generates the appropriate install command using the project's detected package manager (pnpm, yarn, bun, or npm), including framework-specific dev dependencies and Cloudflare's vitest-pool-workers where relevant, and it removes Jest packages when migrating. It then emits the matching vitest.config.ts (extending an existing vite.config.ts rather than duplicating it), a React setup file importing jest-dom matchers, a tsconfig types entry for vitest globals, standard test scripts (test, test:run, test:coverage, test:ui), and a sample test that reflects the specific project. Coverage config via the v8 provider is included.

Target users are JavaScript and TypeScript developers and AI agents who want a correct, project-aware Vitest setup quickly, or who are migrating from Jest. As a test-scaffolding skill that installs dev dependencies and writes local config/test files, it performs only standard, benign development operations.

FAQ

What project types does it detect?

Cloudflare Workers, React (Vite), React SSR/TanStack Start, Node/Hono APIs, and plain libraries, each mapped to the correct Vitest environment (node, jsdom, or a split setup).

Does it create files or just give advice?

It creates files: vitest.config.ts, a test setup file, utilities, a sample test, plus package.json scripts and TypeScript config entries.

Can it migrate a project from Jest?

Yes. It detects a Jest config as a migration candidate and includes a command to remove Jest packages (jest, ts-jest, @types/jest, jest-environment-jsdom, babel-jest) as part of the switch.

Which package manager does it use?

It detects the project's package manager by lockfile (pnpm-lock.yaml, yarn.lock, bun.lockb, or package-lock.json) and generates install commands accordingly.

Does it handle existing Vite config?

Yes. If a vite.config.ts already exists it adds the test block to it rather than creating a separate vitest.config.ts, since Vitest reads Vite config natively.

Install vitest

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

jezweb/claude-skills

Related Skills

short-form-video

14

multi-asset-morning-briefing

7,907

content-strategy

2,901

doherty-threshold

2,901