Run Vitest tests for a specific component with coverage. Use when making changes to React components to ensure tests pass and coverage is maintained.
Scanned 2/12/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: component-tester
description: Run Vitest tests for a specific component with coverage. Use when making changes to React components to ensure tests pass and coverage is maintained.
---
# Component Tester Skill
This Skill automatically runs Vitest tests when React components are modified to ensure code quality and test coverage.
## When to Activate
- After creating a new React component
- When modifying existing component implementation
- Before creating a pull request with component changes
- When fixing bugs in components
## Actions Performed
1. **Identify Component**: Determine which component was created or modified
2. **Run Tests**: Execute `pnpm test -- <component-path>` without watch mode
3. **Check Coverage**: Verify test coverage meets project thresholds
4. **Report Results**: Provide clear feedback on:
- Test pass/fail status
- Coverage percentages (statements, branches, functions, lines)
- Specific failing tests with error messages
- Coverage gaps requiring additional tests
## Example Usage
```typescript
// User modifies: src/app/blog/_components/progress-bar.tsx
// Skill automatically runs:
// pnpm test -- src/app/blog/_components/progress-bar
// Output:
// ✓ should render progress bar with correct width
// ✓ should update progress on scroll
// ✓ should hide when not scrolled
// Coverage: 95% statements, 90% branches, 100% functions, 95% lines
```
## Tools Used
- **Read**: Examine component files and test files
- **Grep**: Locate related test files
- **Bash**: Execute `pnpm test` commands
## Test Naming Convention
All tests should follow the "should" convention:
- ✅ "should render title and children"
- ✅ "should display empty state when data is empty"
- ❌ "renders title and children"
## Coverage Thresholds
Flag components with coverage below:
- Statements: 80%
- Branches: 75%
- Functions: 80%
- Lines: 80%
## Related Files
- Test location: `__tests__/` directories next to components
- Test suffix: `.test.ts` or `.test.tsx`
- Configuration: `vitest.config.ts` in project root
No comments yet. Be the first to comment!
Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.
SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.
Python backend development expertise for FastAPI, security patterns, database operations, Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI, (2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases, (4) Integrating Redis/Upstash caching, (5) Refactoring AI-generated Python code (deslopification), (6) Designing API patterns, or (7) Optimizing backend performance.
Drive the full internationalization journey for a project — detect the stack, recommend a library, set up the chosen library, wrap existing strings, and optionally connect a translation platform. Use when the user asks to add or configure i18n, internationalization, localization, multi-language support, or translations — including when they explicitly mention LinguiJS, Lingui, next-intl, "wrap strings", "find hardcoded text", "make my app translatable", or "set up translations". Triggers on g...
PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.