This is a prioritized collection of 44 Vitest testing rules organized into eight categories, from critical async patterns and test isolation down to lower priority concerns like test organization. What makes it useful is the explicit priority system: you know to fix async await issues and mock cleanup before worrying about snapshot formatting. It covers the tricky parts like vi.mock hoisting behavior, choosing between spyOn and mock, and performance tuning with pools and sharding. The quick reference table lets you scan by impact level, which beats scrolling through alphabetical lists when you're debugging flaky tests at 3pm. If you're migrating from Jest or trying to speed up your CI pipeline, the performance and mocking sections are worth reading first.

skills.sh installs
7.2K
GitHub stars
222
last updated
Aug 21, 2026

Install

$ npx -y skills add pproenca/dot-skills --skill vitest --agent claude-code

Installs into .claude/skills of the current project.

Files

Vitest Best Practices

Comprehensive performance optimization and best practices guide for Vitest testing framework. Contains 44 rules across 8 categories, prioritized by impact to guide test writing, refactoring, and code review.

When to Apply

Reference these guidelines when:

  • Writing new Vitest tests
  • Debugging flaky or slow tests
  • Setting up test configuration
  • Reviewing test code in PRs
  • Migrating from Jest to Vitest
  • Optimizing CI/CD test performance

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Async PatternsCRITICALasync-
2Test Setup & IsolationCRITICALsetup-
3Mocking PatternsHIGHmock-
4PerformanceHIGHperf-
5Snapshot TestingMEDIUMsnap-
6EnvironmentMEDIUMenv-
7AssertionsLOW-MEDIUMassert-
8Test OrganizationLOWorg-

Quick Reference

1. Async Patterns (CRITICAL)

Sponsors

Details

Repository
github.com/pproenca/dot-skills
Categories
Backend & APIs, Testing & QA, Documentation, Debugging
First seen
May 16, 2026

More from pproenca/dot-skills

All 100
1alpic-ai avatarchatgpt-app-builderalpic-ai/skybridgeGuide developers through creating and updating ChatGPT apps. Covers the full lifecycle: brainstorming ideas against UX guidelines, bootstrapping projects, imple7.2Kskills.sh installs
2anthropics avatarbuild-mcp-appanthropics/claude-plugins-officialThis skill should be used when the user wants to build an "MCP app", add "interactive UI" or "widgets" to an MCP server, "render components in chat", build "MCP7.1Kskills.sh installs
3agricidaniel avatarseo-googleagricidaniel/claude-seoGoogle SEO APIs: Search Console (Search Analytics, URL Inspection, Sitemaps), PageSpeed Insights v5, CrUX field data with 25-week history, Indexing API v3, and 7.1Kskills.sh installs
4pixijs avatarpixijs-scene-graphicspixijs/pixijs-skillsUse this skill when drawing vector shapes and paths in PixiJS v8. Covers the Graphics API: shape-then-fill methods (rect/circle/ellipse/poly/roundRect/star/regu7.1Kskills.sh installs
5trailofbits avatargh-clitrailofbits/skillsEnforces authenticated gh CLI workflows over unauthenticated curl/WebFetch patterns. Use when working with GitHub URLs, API access, pull requests, or issues.7.1Kskills.sh installs
6rorkai avatarasc-subscription-localizationrorkai/app-store-connect-cli-skillsBulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 reso7Kskills.sh installs