Index of every page on this site: llms.txt
All skills
paulrberg avatar

/vitest

@c9e5a34
by Paul Bergpaulrberg/agent-skills106 stars
11
Run it yourself

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

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈41 tokens for metadata: the name and description. ≈465 when used: this file. ≈2.2k more on demand in 5 files.

Description uses 2.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈165 characters, or 2.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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. 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. Read mocking for module, timer, spy, or global boundaries. Read configuration for projects, migration, coverage, or reporter selection. Read troubleshooting for hangs, discovery, resolution, or flaky state.

For test changes, 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. Reuse passing results until new edits, failures, or unresolved concerns justify another run.

Completion requires a meaningful passing focused test under repository configuration and concise command/result evidence for test changes. A read-only explanation instead requires supporting configuration or API evidence. Do not add or run tests merely to satisfy the change workflow. When red-before-green evidence exists, use ### 🧪 Regression covered. Otherwise, use ### 🧪 Tests verified for executed tests.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts5d3 checks · Risk SAFE
  • Gen Agent Trust Hub5d

    This skill provides technical instructions for using the Vitest testing framework in TypeScript projects. It includes detailed guidance on configuration, mocking, and test execution. The analysis found no malicious patterns; the skill uses standard development tools and references official utilities from well-known services.

  • Socket5d

    No alerts

  • Snyk5d

    Risk: LOW · No issues

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

Last checked against GitHub 3 days ago.

Activeupdated 2 months ago

README badge

README badge for paulrberg/agent-skills/vitest