smart-test

Execute only tests affected by code changes in a git branch or working tree.

Updated May 31, 2026
One-click install
npx skills add https://github.com/zizzfizzix/agentic-engineering-framework --skill smart-test-zizzfizzix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-test
Source: https://github.com/zizzfizzix/agentic-engineering-framework/tree/main/core/ai/skills/smart-test
Command: npx skills add https://github.com/zizzfizzix/agentic-engineering-framework --skill smart-test-zizzfizzix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures that only the tests relevant to the changes made to the codebase are executed, reducing unnecessary test runs and saving time.

Core Features & Use Cases

  • Selective Testing: Execute only the tests that are affected by the code changes.
  • Caching: Utilizes a cache to store and reuse test plans, avoiding redundant analysis for unchanged code.
  • Multi-Test Type Support: Handles both Jest unit tests and Playwright integration tests.
  • Use Case: When you make a change to your codebase, you can use this Skill to run only the tests that are relevant to that change, rather than running the entire test suite.

Quick Start

Run the smart-test skill to execute only the affected tests for your current branch or working tree.

Frequently Asked Questions about smart-test

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

FAQPage Schema
How do I run only tests affected by changed code in a git branch?

Selective testing executes only the relevant tests for code changes in a branch or working tree. This approach reduces unnecessary test runs and saves time by avoiding the full test suite.

Can I use selective testing for both Jest and Playwright tests?

Yes, selective testing supports both Jest unit tests and Playwright integration tests. It analyzes your code changes to determine and execute only the relevant tests for those modifications.

How does caching avoid redundant test analysis for unchanged code?

Caching stores and reuses test plans in a `.test-cache.json` file to avoid redundant analysis for unchanged code. This mechanism ensures previous computations are retained, speeding up subsequent test runs.

Do I need a local git repository to run affected tests selectively?

Yes, you need a local git repository containing a `.test-cache.json` file to run affected tests selectively. The git history is required to identify code changes in your branch or working tree.

What is the best way to reduce test execution time when modifying a codebase?

Running only the tests affected by your code changes is the best way to reduce execution time. This selective testing approach skips unaffected tests, preventing unnecessary runs across the entire suite.

Why does selective testing require a `.test-cache.json` file in my repository?

Selective testing requires a `.test-cache.json` file to store and retrieve cached test plans. Without this cache file, the Skill cannot avoid redundant analysis for unchanged code, losing its time-saving benefit.