Vitest 3 Features
Automates Vitest tests, ensuring JavaScript component functionality aligns with specified features and expectations.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add vitest-3-features npx -- -y @trustedskills/vitest-3-features
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"vitest-3-features": {
"command": "npx",
"args": [
"-y",
"@trustedskills/vitest-3-features"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides comprehensive knowledge of Vitest 3.x features and modern testing patterns, focusing on improvements released since January 2025. It enables AI agents to automate Vitest tests, specifically leveraging new capabilities like the Annotation API, Line Number Filtering, and Enhanced Watch Mode for JavaScript component functionality. The skill also includes guidelines for file path handling on Windows systems.
When to use it
- When needing to add custom metadata, messages, or attachments to test results (e.g., debugging information, links to external resources).
- To execute specific tests directly from an IDE by line number.
- For faster and more accurate test execution during development with improved change detection in watch mode.
- When working on Windows systems and needing to ensure correct file path formatting.
Key capabilities
- Annotation API: Allows adding custom metadata, messages, and attachments to tests for reporting across various formats (UI, HTML, JUnit, TAP, GitHub Actions).
- Line Number Filtering: Enables running specific tests by their line number within a file.
- Enhanced Watch Mode: Provides smarter change detection, faster rebuilds, and improved file watching, especially on Windows.
- Windows File Path Handling: Enforces the use of backslashes (
\) in file paths when using Edit or Write tools on Windows systems.
Example prompts
- "Add an annotation to this test indicating it's testing OAuth2 flow with external provider and attach the oauthConfig."
- "Run the test located at line 42 of tests/user.test.js."
- "How do I configure watch mode in Vitest?"
Tips & gotchas
- Windows File Paths: Always use backslashes (
\) when specifying file paths on Windows systems within Edit or Write tools. For example,D:\repos\project\file.tsxinstead ofD:/repos/project/file.tsx. - Documentation: The skill prioritizes updating existing documentation rather than creating new files.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.