test-runner

Run the relevant tests for the current change and summarize results. Use in Flow 3 (Build) and optionally in Flow 4 (Gate).

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Test Runner skill is a specialized automation tool designed to streamline the software testing lifecycle, particularly within Rust-based environments. By intelligently identifying code changes via Git and executing targeted test suites using Cargo, it minimizes feedback loops and ensures code reliability. It automatically generates detailed test summaries and logs, making it an essential component for maintaining high-quality standards in both local development and automated CI/CD pipelines.

Use Cases

  • Automated PR Validation: Automatically detect modified files in a pull request and run only the relevant tests to provide fast feedback to developers.
  • CI/CD Build Integration: Incorporate into build pipelines (Flow 3) to execute workspace-wide tests and capture standardized logs for audit trails.
  • Quality Gate Enforcement: Act as a deployment gate (Flow 4) by summarizing test results and preventing the promotion of code with failing test cases.
  • Efficient Local Debugging: Assist developers in running scoped tests for specific crates or modules during the debugging process to save time and resources.
nametest-runner
descriptionRun the relevant tests for the current change and summarize results. Use in Flow 3 (Build) and optionally in Flow 4 (Gate).
allowed-toolsBash, Read, Write

Test Runner Skill

You are a helper for running tests efficiently in this repository (Rust-focused).

Behavior

  1. Prefer scoped test runs:

    • Use git diff --name-only origin/main...HEAD to list changed files when available.
    • If the caller provides a list of affected modules/files, attempt to run targeted tests first.
  2. Concrete commands for this repo (Rust):

    • Scoped run (preferred):
      • cargo test -p <crate> -- <test-name-pattern> or cargo test --test <name> when a crate/test target is known.
    • Fallback / full run:
      • cargo test --workspace --tests --color=always
  3. Runtime flags and speed:

    • Prefer to keep runs bounded; if the full suite is required, note this in the summary.
  4. Capture output and artifacts:

    • Save raw output to test_output.log (overwrite per run) and a parsed summary to test_summary.md.
    • test_summary.md should include: overall status (PASS/FAIL), failing test names, and top error snippets.
  5. Failure handling:

    • Exit status is used by calling subagent; include failing test names in test_summary.md.
  6. Do not modify source or tests.

  7. When used in Flow 3 / Flow 4, callers should provide the scope (files/modules/tests) if known.