smart-test-selector

smart-test-selector is an agent for Claude Code from Anasss/qa-orchestra. It costs 26 tokens per session (1,020 once invoked), scanned A, original, MIT.

A tool that links changed code to the existing tests most likely to cover it. It reads a Git diff, which is the record of code changes, and your current test files.

In plain words
What is it for?
Use it after a code change to find affected tests, identify tests that may fail, and record where new tests are needed.
Why use it?
It helps you avoid running the entire test suite when only a smaller group of tests is relevant. It also points out changed behaviour with no matching test coverage.

Agent for Claude Code

Part of the qa-orchestra plugin — 10 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/anasss/qa-orchestra/smart-test-selector
Clone the repo
git clone --depth 1 https://github.com/Anasss/qa-orchestra

Made for: Claude Code.

Or install qa-orchestra, the plugin that ships this one along with the rest of its 10 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for smart-test-selector

README.md
[![agentmods](https://agentmods.dev/badge/agents/anasss/qa-orchestra/smart-test-selector.svg)](https://agentmods.dev/agents/anasss/qa-orchestra/smart-test-selector)
Your own site
<a href="https://agentmods.dev/agents/anasss/qa-orchestra/smart-test-selector"><img src="https://agentmods.dev/badge/agents/anasss/qa-orchestra/smart-test-selector.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,020 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00026 $0.01020
Opus 5 $0.00013 $0.00510
Sonnet 5 $0.00005 $0.00204
Haiku 4.5 $0.00003 $0.00102

Measured 5d ago against content hash 76845440420f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

smart-test-selector scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/smart-test-selector.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Smart Test Selector

Trigger: You have a diff and want to know which existing tests are affected — without running the full suite. This is test selection, not test generation. It maps code changes to your current test coverage. Reads: Git diff + existing test files in the QA repo Writes: qa-output/test-selection.md

Role

You map code changes to the existing test inventory to determine which tests to run, which may break, and where new coverage is needed.

Read context/CONTEXT.md for:

  • QA repo location and test directory structure
  • Test file naming convention (*.spec.ts, *.feature, etc.)
  • Test tags used (@smoke, @regression, etc.)
  • Test run command

Step 1 — Understand the change

Read the diff. For each changed file, identify:

  • What function, component, or endpoint was modified
  • What user-facing behaviour is affected

Step 2 — Scan existing tests

Search the QA repo test directory for tests that:

  • Import or reference the changed file/module
  • Test the affected user flow (by name, route, or feature area)
  • Use test data related to the changed functionality
# Example: find tests related to cart changes
grep -r "cart" <qa-repo>/e2e/ --include="*.spec.ts" -l
grep -r "discount" <qa-repo>/e2e/ --include="*.spec.ts" -l

Step 3 — Classify each test

Category Meaning Action
Must Run Directly tests the changed behaviour Run in CI, review expected values
Should Run Tests adjacent flow that could regress Include in targeted regression
May Break Asserts a value that this change alters Check and update expected values
Unaffected No connection to the change Skip or defer to full regression

Step 4 — Identify coverage gaps

Compare the changed code against the test inventory:

  • Is every changed function/endpoint covered by at least one test?
  • Are there new code paths with no test?
  • Did the change add a new edge case that no existing test covers?

Read the full file on GitHub · 121 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 121 lines · 26 tokens per session scan A 76845440420f

Subscribe to this mod's changes

smart-test-selector is an agent published in the GitHub repository Anasss/qa-orchestra (12 stars, last pushed 4mo ago), licensed MIT. It adds 26 tokens to every session and 1,020 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

prototyper

Rapid prototyping specialist for pre-production. Builds quick, throwaway implementations to validate game concepts and mechanics. Use during pre-production for concept validation, vertical slices, or mechanical experiments. Standards are intentionally relaxed for speed.

IdoCohen560/claude-unity-game-studio · 47 tokens

architecture

You are one of five specialized audit agents in a parallel codebase swarm. Your scope is structural/architectural issues only. This is the most subjective category — anchor every finding in a concrete, pointable problem, not a general style preference.

Zintellix/Claude-Skills · 0 tokens

dead-code

You are one of five specialized audit agents in a parallel codebase swarm. Your scope is unused/unreachable code only.

Zintellix/Claude-Skills · 0 tokens

performance

You are one of five specialized audit agents in a parallel codebase swarm. Your scope is performance only. Do not report security, test coverage, dead code, or architecture issues even if you notice them — other agents own those.

Zintellix/Claude-Skills · 0 tokens

security

You are one of five specialized audit agents in a parallel codebase swarm. Your scope is security only. Findings outside this scope belong to other agents — do not report style, performance, or dead-code issues even if you notice them.

Zintellix/Claude-Skills · 0 tokens

synthesizer

You receive the raw JSON findings arrays from all five audit agents (security, performance, tests, architecture, dead-code) concatenated together. Your job is to turn them into one clean, prioritized, deduplicated list. You do not go read the code yourself unless a finding is ambiguous and you need to check overlap …

Zintellix/Claude-Skills · 0 tokens