vitest

vitest is a skill for Claude Code from prowler-cloud/prowler. It costs 56 tokens per session (1,447 once invoked), scanned A, original, Apache-2.0.

A testing guide for Vitest and React Testing Library. Vitest runs JavaScript tests, while React Testing Library checks how users interact with rendered components.

In plain words
What is it for?
Use it to test React components, hooks, and utilities with Given/When/Then structure, behavior-based groups, user actions, and accessible element queries.
Why use it?
It makes component tests easier to organize and keeps queries focused on accessible, user-visible behavior. It also separates unit and integration tests from end-to-end browser tests.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to test React components, hooks, and utilities with Given/When/Then structure, behavior-based groups, user actions, and accessible element queries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/prowler-cloud/prowler/vitest
About the project

Prowler is an open-source cloud security platform that checks cloud environments for security issues and compliance with standards such as CIS, NIST, and GDPR. Security teams use it to assess configurations, prioritize findings, produce reports, and guide remediation.

prowler-cloud/prowler · 15,347 stars · on GitHub · prowler.com

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 prowler-cloud/prowler --skill vitest
Clone the repo
git clone --depth 1 https://github.com/prowler-cloud/prowler

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 vitest

README.md
[![agentmods](https://agentmods.dev/badge/skills/prowler-cloud/prowler/vitest/github.svg)](https://agentmods.dev/skills/prowler-cloud/prowler/vitest)
Your own site
<a href="https://agentmods.dev/skills/prowler-cloud/prowler/vitest"><img src="https://agentmods.dev/badge/skills/prowler-cloud/prowler/vitest/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 vitest

Your own site · 80×15
<a href="https://agentmods.dev/skills/prowler-cloud/prowler/vitest"><img src="https://agentmods.dev/badge/skills/prowler-cloud/prowler/vitest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,447 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00056 $0.01447
Opus 5.5 $0.00022 $0.00579
Sonnet 5.5 $0.00011 $0.00289
Haiku 4.5 $0.00006 $0.00145

Measured 25d ago against content hash 127becfea76c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vitest scanned grade A with 1 finding 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 25d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

expect(axios.get).toHaveBeenCalled();
skills/vitest/SKILL.md · 201 lines

How it starts

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

For E2E tests: Use prowler-test-ui skill (Playwright). This skill covers unit/integration tests with Vitest + React Testing Library.

Prowler UI Test Projects (ui/vitest.config.ts)

Project Files Environment Setup
unit **/*.test.{ts,tsx} (excludes tests/**, *.integration.test.*) jsdom, no React Compiler vitest.setup.ts (jest-dom matchers, storage mock)
integration **/*.integration.test.{ts,tsx} Vitest browser mode, Playwright Chromium, React Compiler vitest.integration.setup.ts (MSW worker, globals.css, mocks for @/auth.config, next/cache, server-only)
  • Tests are co-located next to the code (foo.ts -> foo.test.ts); shared fixtures live in ui/__tests__/.
  • Config sets globals, restoreMocks, mockReset, unstubEnvs, unstubGlobals: do not add afterEach(vi.restoreAllMocks) boilerplate.
  • Integration tests import page/userEvent from vitest/browser, render with @/__tests__/render-browser, and mock HTTP with MSW (ui/__tests__/msw/), not vi.mock of fetch.

Test Structure (REQUIRED)

Use Given/When/Then (AAA) pattern with comments:

it("should update user name when form is submitted", async () => {
  // Given - Arrange
  const user = userEvent.setup();
  const onSubmit = vi.fn();
  render(<UserForm onSubmit={onSubmit} />);

  // When - Act
  await user.type(screen.getByLabelText(/name/i), "John");
  await user.click(screen.getByRole("button", { name: /submit/i }));

  // Then - Assert
  expect(onSubmit).toHaveBeenCalledWith({ name: "John" });
});

Describe Block Organization

describe("ComponentName", () => {
  describe("when [condition]", () => {
    it("should [expected behavior]", () => {});
  });
});

Group by behavior, NOT by method.


Query Priority (REQUIRED)

Priority Query Use Case
1 getByRole Buttons, inputs, headings
2 getByLabelText Form fields
3 getByPlaceholderText Inputs without label
4 getByText Static text
5 getByTestId Last resort only

Read the full file on GitHub · 201 lines

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. 25d ago Changed · -1 lines · +28 tokens per session 127becfea76c
  2. 3mo ago First seen · 202 lines · 28 tokens per session scan A a9effb75bbd3

Subscribe to this mod's changes

vitest is a skill published in the GitHub repository prowler-cloud/prowler (15,347 stars, last pushed 3d ago), licensed Apache-2.0. It adds 56 tokens to every session and 1,447 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

vitest compared with skills from other repositories

vitest next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vitestprowler-cloud/prowlerSkill15k3d agoApache-2.0A56Claude Code
performing-aws-account-enumeration-with-scout-suitexalgorix/xalgorixSkill1.5kyesterdayApache-2.0A39Claude Code, Codex
shannonKeygraphHQ/shannonSkill52k4d agoAGPL-3.0A51Claude Code
ponytail-sec-auditandypitcher/ponytail-secSkill62todayMITA73Claude Code
ponytail-secandypitcher/ponytail-secSkill62todayMITA73Claude Code
ponytail-sec-triageandypitcher/ponytail-secSkill62todayMITA60Claude Code
cis-aws-database-3.11CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A17Claude Code, Codex