/vitest-4:reviewing-vitest-configfrom vitest-4
Review Vitest configuration for deprecated patterns and best practices. Use when reviewing test configuration or vitest setup.
Ships in vitest-4. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This review skill validates Vitest configurations for deprecated patterns and best practices specific to Vitest 4.x.
This skill reviews:
maxThreads or maxForks (use maxWorkers)singleThread or singleFork (use maxWorkers: 1, isolate: false)poolOptions (flatten to top-level)coverage.include patternscoverage.ignoreEmptyLinescoverage.allcoverage.extensionsdefineWorkspace (use defineConfig with projects)poolMatchGlobs or environmentMatchGlobsplaywright()instances array, not browser.namevitest/browser, not @vitest/browser/contextserver.deps, not top-level depsreporters: ['basic'] (use default + summary: false)VITE_NODE_DEPS_MODULE_DIRECTORIES in envvitest/execute importsFinding:
test: {
maxThreads: 4,
}
Severity: Critical
Remediation:
test: {
maxWorkers: 4,
}
Finding:
coverage: {
provider: 'v8',
}
Severity: Critical
Remediation:
coverage: {
provider: 'v8',
include: ['src/**/*.{ts,tsx}'],
}
Finding:
import { defineWorkspace } from 'vitest/config';
export default defineWorkspace([...]);
Severity: Critical
Remediation:
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
projects: [...],
},
});
Finding:
import { page } from '@vitest/browser/context';
Severity: Critical
Remediation:
import { page } from 'vitest/browser';
Finding:
browser: {
provider: 'playwright',
name: 'chromium',
}
Severity: Critical
Remediation:
import { playwright } from '@vitest/browser-playwright';
browser: {
provider: playwright(),
instances: [{ browser: 'chromium' }],
}
Finding:
test: {
deps: {
inline: ['vue'],
},
}
Severity: Deprecated
Remediation:
test: {
server: {
deps: {
inline: ['vue'],
},
},
}
glob "vitest.config.{ts,js,mts,mjs}"
glob "vite.config.{ts,js,mts,mjs}"
Search for deprecated options:
grep -E "(maxThreads|maxForks|singleThread|poolOptions)" vitest.config.ts
Verify include patterns:
grep -A 10 "coverage:" vitest.config.ts | grep "include:"
Search for deprecated workspace:
grep "defineWorkspace" vitest.config.ts
Verify provider and instances:
grep -A 5 "browser:" vitest.config.ts
Find wrong imports:
grep -r "@vitest/browser/context" tests/
For detailed review workflow, see references/review-workflow.md
# Vitest Configuration Review
## Summary
- Config files reviewed: X
- Test files reviewed: Y
- Critical issues: Z
- Deprecated patterns: W
- Best practice suggestions: V
## Critical Issues
### 1. [File]: [Issue]
**Pattern:** [Code snippet]
**Problem:** [Description]
**Remediation:** [Fix]
## Deprecated Patterns
### 1. [File]: [Issue]
**Pattern:** [Code snippet]
**Problem:** [Description]
**Remediation:** [Fix]
## Best Practices
### 1. [File]: [Suggestion]
**Current:** [Code snippet]
**Suggestion:** [Improvement]
For reviewing test quality beyond configuration, use the reviewing-test-quality skill for patterns on coverage, React 19 APIs, and anti-patterns.
For detailed information:
For migration guide, see @vitest-4/skills/migrating-to-vitest-4
For configuration patterns, see @vitest-4/skills/configuring-vitest-4
For complete API reference, see @vitest-4/knowledge/vitest-4-comprehensive.md
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/configuring-vitest-4Configure Vitest 4.x with correct pool architecture, coverage settings, and multi-project setup. Use when creating or modifying vitest.config files or setting up test infrastructure./migrating-to-vitest-4Migrate from Vitest 2.x/3.x to 4.x with pool options, coverage config, workspace to projects, and browser mode updates. Use when upgrading Vitest versions or encountering deprecated patterns./using-browser-modeSet up Vitest browser mode with Playwright or WebDriverIO providers, use page and userEvent APIs, test components. Use when testing browser-specific code or UI components./writing-vitest-testsWrite Vitest tests with describe/test blocks, expect assertions, vi mocking, async testing, and parameterized tests. Use when creating or modifying test files.npx claudepluginhub djankies/claude-configs --plugin vitest-4