Agent skill

Vitest Skill

by sickn33 in sickn33/agentic-awesome-skills

Generates Vitest tests in JavaScript/TypeScript with Vite-native speed.

MITAuto-check passedTesting & QA

Install Vitest Skill

skills CLI
$ npx skills add sickn33/agentic-awesome-skills --skill vitest-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills vitest-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/vitest-skill .claude/skills/vitest-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vitest-skill
GitHub stars
47k
Used in
1 other repo
Token cost
~1.2k tokens
SKILL.md length
235 words
Files
1
Skills in repo
1,354
Repo updated
First seen
Licence
MIT

At a glance

Generates Vitest tests in JavaScript/TypeScript with Vite-native speed.

  • User mentions Vitest
  • SKILL.md covers When to Use, Core Patterns, Quick Reference and vitest.config.ts, plus 2 more sections
  • Calls npx
  • Tasks that involve Unit testing

What it does

Vitest Skill is an agent skill from sickn33/agentic-awesome-skills. Generates Vitest tests in JavaScript/TypeScript with Vite-native speed. Jest-compatible API with ESM support and HMR. Use when user mentions "Vitest", "vi.mock", "vitest.config". Triggers on: "Vitest", "vi.mock", "vi.fn", "Vite test", "vitest config".

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Unit testing. It works with Vitest, Jest, Vite and TypeScript. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.

When your agent uses it

  • User mentions Vitest
  • Tasks that involve Unit testing

Example prompts

  • “Vitest”
  • “vi.mock”
  • “vitest.config”
  • “/vitest-skill”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit ec02547. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vitest Skill loads about 1.2k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 235 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sickn33/agentic-awesome-skills at commit ec02547, republished under its MIT licence (© sickn33). 235 words, ~1,202 tokens.

Download SKILL.mdSave it as .claude/skills/vitest-skill/SKILL.md (or your agent's skills folder).
name
vitest-skill
description
Generates Vitest tests in JavaScript/TypeScript with Vite-native speed. Jest-compatible API with ESM support and HMR. Use when user mentions "Vitest", "vi.mock", "vitest.config". Triggers on: "Vitest", "vi.mock", "vi.fn", "Vite test", "vitest config".
risk
critical
source
https://github.com/LambdaTest/agent-skills/tree/main/vitest-skill
source_repo
LambdaTest/agent-skills
source_type
community
date_added
2026-07-01
license
MIT
license_source
https://github.com/LambdaTest/agent-skills/blob/main/LICENSE

Vitest Testing Skill

When to Use

Use this skill when you need generates Vitest tests in JavaScript/TypeScript with Vite-native speed. Jest-compatible API with ESM support and HMR. Use when user mentions "Vitest", "vi.mock", "vitest.config". Triggers on: "Vitest", "vi.mock", "vi.fn", "Vite test", "vitest config".

Core Patterns

Basic Test
typescript
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { Calculator } from './calculator';

describe('Calculator', () => {
  let calc: Calculator;
  beforeEach(() => { calc = new Calculator(); });

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

  it('throws on divide by zero', () => {
    expect(() => calc.divide(10, 0)).toThrow();
  });
});
Mocking (vi instead of jest)
typescript
import { vi } from 'vitest';

// Mock module
vi.mock('./database', () => ({
  getUser: vi.fn().mockResolvedValue({ name: 'Alice' }),
  saveUser: vi.fn().mockResolvedValue(true),
}));

// Mock function
const mockFn = vi.fn();
mockFn.mockReturnValue(42);
mockFn.mockResolvedValue({ data: 'test' });

// Spy
const spy = vi.spyOn(console, 'log').mockImplementation(() => {});
expect(spy).toHaveBeenCalledWith('message');
spy.mockRestore();

// Timers
vi.useFakeTimers();
vi.advanceTimersByTime(1000);
vi.runAllTimers();
vi.useRealTimers();
In-Source Testing
typescript
// src/math.ts — tests alongside code!
export function add(a: number, b: number) { return a + b; }
export function multiply(a: number, b: number) { return a * b; }

if (import.meta.vitest) {
  const { it, expect } = import.meta.vitest;
  it('adds', () => { expect(add(2, 3)).toBe(5); });
  it('multiplies', () => { expect(multiply(3, 4)).toBe(12); });
}
Snapshot Testing
typescript
it('serializes user', () => {
  expect(serializeUser(user)).toMatchSnapshot();
});

it('inline snapshot', () => {
  expect(serializeUser(user)).toMatchInlineSnapshot(`
    { "name": "Alice", "email": "alice@test.com" }
  `);
});
React Component Testing
typescript
import { render, screen } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import Button from './Button';

describe('Button', () => {
  it('renders with label', () => {
    render(<Button label="Click me" />);
    expect(screen.getByText('Click me')).toBeDefined();
  });
});
Anti-Patterns
BadGoodWhy
jest.fn()vi.fn()Vitest uses vi
jest.mock()vi.mock()Different namespace
No type safetyTypeScript + strictVitest is TS-first

Quick Reference

TaskCommand
Run oncenpx vitest run
Watchnpx vitest (default)
UInpx vitest --ui
Coveragenpx vitest --coverage
Specific filenpx vitest run src/math.test.ts
Filternpx vitest run -t "adds"

vitest.config.ts

typescript
import { defineConfig } from 'vitest/config';
export default defineConfig({
  test: {
    globals: true,
    environment: 'jsdom',
    coverage: { provider: 'v8', reporter: ['text', 'html'] },
    include: ['src/**/*.{test,spec}.{js,ts,tsx}'],
    includeSource: ['src/**/*.{js,ts}'],
  },
});

Deep Patterns → reference/playbook.md

§SectionLines
1Production ConfigurationConfig, workspace, setup file
2Mocking Patternsvi.mock, spies, timers, fetch
3React Testing LibraryComponents, hooks, providers
4Snapshot & Inline SnapshotsFile, inline, serializers
5Table-Driven Teststest.each, describe.each
6In-Source TestingCo-located tests in source
7API / Integration TestingServer tests with fetch
8CI/CD IntegrationGitHub Actions, scripts
9Debugging Quick-Reference10 common problems
10Best Practices Checklist13 items

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/vitest-skill of sickn33/agentic-awesome-skills.

Open the folder on GitHubat commit ec02547

Used in 1 other repository

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Vitest Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vitest Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vitest Skill this skillsickn33/agentic-awesome-skills47k1 repos~1.2kAutomated safety check: PassMIT
Vitestjezweb/claude-skills1.1k—~3kAutomated safety check: PassMIT
Vitest Testingsecondsky/claude-skills227—~1.2kAutomated safety check: NotesMIT
Vitestsupabase/supabase111k12 repos~1.1kAutomated safety check: PassApache-2.0
Test Coveragescott-fryxell/brayness124—~1.6kAutomated safety check: PassMIT
Vitest Migrationnrwl/nx29k—~7.3kAutomated safety check: PassMIT

Similar skills

  • Vitest

    jezweb/claude-skills

    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.

    1.1k GitHub stars~3k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Vitest Testing

    secondsky/claude-skills

    Modern TypeScript/JavaScript testing with Vitest. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.2k tokensUpdated 10 days ago
    Testing & QAAuto-check: notes
  • Vitest

    supabase/supabase

    Official

    Vitest API and config reference (Jest-compatible) — mocking with vi., spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering.

    111k GitHub starsUsed in 12 repos~1.1k tokens
    Testing & QAAuto-check passed
  • Test Coverage

    scott-fryxell/brayness

    Write Vitest specs for Vue 3 JavaScript (Vite Plus, happy-dom, @vue/test-utils) and analyze V8 coverage + Fallow health to prioritize test-first refactors.

    124 GitHub stars~1.6k tokensUpdated 11 days ago
    Testing & QAAuto-check passed
  • Migrate an Nx repo package's unit tests from Jest to Vitest, reusing the shared setup that packages/workspace established.

    29k GitHub stars~7.3k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Testing Fundamentals

    DanielPodolsky/ownyourcode

    Guides test strategy for unit, integration, and E2E testing.

    290 GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed

More from sickn33/agentic-awesome-skills

All 1,354 skills in this repo
  • Liuguang Banlan UI

    sickn33/agentic-awesome-skills

    Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Find Complementary Founders

    sickn33/agentic-awesome-skills

    Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.

    47k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Cline Pilot

    sickn33/agentic-awesome-skills

    Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.

    47k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed
  • Content Creator

    sickn33/agentic-awesome-skills

    Drafts and reviews audience-specific content from supplied brand examples, with local scripts for brand voice and SEO diagnostics, channel templates and a content calendar.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed

Categories

Questions about Vitest Skill

What does Vitest Skill do?

Generates Vitest tests in JavaScript/TypeScript with Vite-native speed. Vitest Skill is an agent skill from sickn33/agentic-awesome-skills. Generates Vitest tests in JavaScript/TypeScript with Vite-native speed.

When should I use Vitest Skill?

Vitest Skill fits situations like: user mentions Vitest; tasks that involve Unit testing.

How do I install Vitest Skill in Claude Code?

Run `npx skills add sickn33/agentic-awesome-skills --skill vitest-skill -a claude-code`. Or copy the skill folder (skills/vitest-skill in sickn33/agentic-awesome-skills) into .claude/skills/vitest-skill in your project. Claude Code loads it when a task matches its description.

How do I install Vitest Skill in Codex?

Run `npx skills add sickn33/agentic-awesome-skills --skill vitest-skill -a codex`. Or copy the skill folder (skills/vitest-skill in sickn33/agentic-awesome-skills) into .agents/skills/vitest-skill in your project. Codex loads it when a task matches its description.

Can I use Vitest Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill vitest-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vitest-skill, .gemini/skills/vitest-skill, .github/skills/vitest-skill and .opencode/skills/vitest-skill in your project.

What does Vitest Skill need to run?

Going by SKILL.md and its folder, Vitest Skill needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Vitest Skill access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Vitest Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vitest Skill use?

Vitest Skill is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vitest Skill use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Vitest Skill?

Skills that share tags, products or a category with Vitest Skill: Vitest (jezweb/claude-skills, 1.1k stars), Vitest Testing (secondsky/claude-skills, 227 stars), Vitest (supabase/supabase, 111k stars) and Test Coverage (scott-fryxell/brayness, 124 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vitest Skill?

sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,343 GitHub stars. The repository holds 1,354 skills in this directory. The repository was last updated on October 7, 2026.

Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.