All skills
paulrberg avatar

/vitest

@56b7c32
by Paul Bergpaulrberg/agent-skills94 stars
7

Use for Vitest in TypeScript projects (Node, bun, React/Next.js, Effect): write, run, or debug unit/component tests, mocks, testing utilities, and coverage.

Use this Skill: https://skilld.dev/gh/paulrberg/agent-skills/vitest

This session only. Nothing lands on disk.

SKILL.md

≈41 tokens always: the name and description. ≈388 when used: this file. ≈1.8k more on demand in 5 files.

Vitest

Repository configuration, projects, setup, imports/globals, environments, aliases, test placement, and cleanup own the test contract. Inspect them and nearby tests before adding generic patterns. Do not add globals, jsdom, coverage, new setup, or browser mode by default.

Workflow

Define the behavior or regression, test its observable public result, and mock system boundaries rather than the behavior under test. Follow local fixture and cleanup ownership. In Effect repositories, use established @effect/vitest conventions such as it.effect, Layers, and TestClock rather than generic replacements. For a bug fix, reproduce the failure before relying on a passing result when practical.

Read patterns for component, async, fixture, snapshot, tag, or browser questions; mocking for module, timer, spy, or global boundaries; configuration for projects, migration, coverage, or reporter selection; and troubleshooting for hangs, discovery, resolution, or flaky state.

Run the narrowest established command for the changed behavior, then the affected package suite only when shared setup or contracts changed. Use nlx vitest run only when no project recipe or script exists. Completion requires a meaningful passing focused test under repository configuration and concise command/result evidence. Use ### 🧪 Regression covered when red-before-green evidence exists; otherwise ### 🧪 Tests verified.

Source: SKILL.md on GitHub

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    The skill provides comprehensive instructions for Vitest testing workflows, including configuration, mocking, and troubleshooting. It uses standard developer tools and refers to official Vitest documentation. A minor risk exists regarding indirect prompt injection, as the skill executes code from the repository it operates on, which is typical for development-oriented agents.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: LOW · No issues

Signed by skilld at 56b7c32. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago

README badge

README badge for paulrberg/agent-skills/vitest