optimizetests

Benchmarks and optimizes Kova test performance to reduce Vitest CI wall time.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/chiragborse1/KovaLab --skill optimizetests-chiragborse1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimizetests
Source: https://github.com/chiragborse1/KovaLab/tree/main/.agents/skills/optimizetests
Command: npx skills add https://github.com/chiragborse1/KovaLab --skill optimizetests-chiragborse1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves slow Kova CI test runtime and developer feedback delays by identifying and removing performance bottlenecks while preserving coverage and test integrity.

Core Features & Use Cases

  • Benchmark-driven optimization: Measures full-suite and targeted Vitest performance to find the highest-return areas to change first.
  • Import and setup hotspot reduction: Targets slow imports, broad barrel usage, repeated module resets, and duplicated fixture construction to reduce per-test overhead.
  • CI-safe coverage preservation: Verifies improvements by re-running the proving test lane and broader gates as needed, explicitly avoiding tactics that weaken assertions or reduce coverage.

Use case example: When Kova PRs spend too long in the test lane, use this Skill to pinpoint import/setup hotspots and apply production-quality refactors (e.g., narrowing runtime seams or improving fixture reuse), then confirm the result with the same benchmark evidence.

Quick Start

Use the optimizetests skill to benchmark slow Kova test hotspots, apply performance-focused refactors that preserve coverage, and re-run the proving lane to confirm reduced wall time and Vitest duration.

Frequently Asked Questions about optimizetests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Vitest CI wall time without losing test coverage?

To reduce Vitest CI wall time without losing coverage, apply benchmark-driven optimization to target slow imports, module resets, and setup bottlenecks while re-running proving test lanes to validate that coverage remains intact.

What causes slow Vitest execution in large test suites?

Slow Vitest execution is often caused by expensive repeated imports, broad barrel usage, duplicated fixture construction, and repeated module resets that add heavy per-test overhead and bottleneck gateway or server/client setup.

How do I benchmark Vitest performance to find test optimization hotspots?

You can benchmark Vitest performance by measuring full-suite and targeted execution times to identify high-return hotspots, then prioritizing refactors like narrowing runtime seams and improving fixture reuse based on the evidence.

Can I optimize test setup bottlenecks without weakening assertions?

Yes, you can optimize gateway and server/client setup bottlenecks by safely reusing fixtures and narrowing imports, explicitly avoiding coverage-weakening changes or reduced assertions while validating improvements through the same test gates.

Does this approach work for CI test lanes that take too long to run?

Yes, this approach targets CI test lanes directly by pinpointing import and setup hotspots, applying production-quality refactors to reduce per-test overhead, and confirming the result with benchmark evidence from the proving lane.