test-scope

Detect affected code scopes from git diffs and run dependency-ordered tests.

9|2|Updated Nov 29, 2024
One-click install
npx skills add https://github.com/bbvch-ai/aihub-core --skill test-scope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-scope
Source: https://github.com/bbvch-ai/aihub-core/tree/main/.claude/skills/test-scope
Command: npx skills add https://github.com/bbvch-ai/aihub-core --skill test-scope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the wasted time of running full, irrelevant test suites after making code changes, so you only execute tests for the scopes actually impacted by your work.

Core Features & Use Cases

  • Auto-Detection of Affected Scopes: Automatically identifies which code scopes have changed from your git diff, no manual scope listing required.
  • Dependency-Aware Test Ordering: Runs tests in the correct dependency order (e.g., core before agent, agent before process) to avoid false failures from untested upstream code.
  • Clear Pass/Fail Reporting: Generates a simple summary table showing which scopes passed, failed, or were skipped, so you can quickly identify issues.
  • Use Case: If you modified code in the packages/api scope, the Skill automatically runs tests for the foundational packages/core scope first, then packages/api, and skips unrelated scopes like packages/web entirely.

Quick Start

Ask the AI to run tests for all scopes affected by your current uncommitted git changes.

Frequently Asked Questions about test-scope

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

FAQPage Schema
How do I run targeted tests for only changed scopes in a monorepo?

This approach runs targeted tests by detecting affected code scopes directly from git diffs, eliminating unnecessary full test suite runs and saving CI time.

How does dependency-aware test ordering prevent false failures in monorepos?

Dependency-aware test ordering runs foundational packages before dependent ones, preventing false failures caused by testing downstream code before untested upstream code passes.

Can I automatically skip unrelated test scopes based on git diff?

Yes, auto-detection identifies changed scopes from git diff and skips unrelated scopes entirely, ensuring only impacted packages undergo test execution.

What is the best way to get clear pass/fail reporting for scoped monorepo tests?

Generate clear pass/fail reporting by outputting a simple summary table showing which specific scopes passed, failed, or were skipped during targeted test execution.

Do I need to manually specify changed packages for scoped testing?

No manual scope listing is required, as the system automatically identifies which code scopes have changed from your current uncommitted git changes.

When should I avoid running full test suites in CI optimization?

Avoid full test suites when working in monorepo development workflows with interdependent packages, utilizing targeted dependency-ordered test execution after code modifications instead.