test-tier-selection

v2026.09.24

Decide which test tier a change needs — unit, integration, or E2E — from its scope; runs nothing itself. Use when deciding how much of the suite to run after a change.

GitHub
Install command
npx skhub add laurigates/test-tier-selection
Markdown
SKILL.md

Test Tier Selection

Automatic guidance for selecting appropriate test tiers based on change context and scope.

When to Use This Skill

Use this skill when...Use test-consult instead when...
Mechanically deciding which tier to run for a given changeReviewing overall test pyramid balance or strategy
Mapping change type (refactor, API, UI) to required tiersDesigning a new feature's test approach
Justifying why an E2E run is or isn't neededDiagnosing flaky tests in an existing suite
Picking between test-quick, test-run, and test-fullSetting up a project's test infrastructure (use test-setup)

Test Tier Definitions

TierDurationScopeWhen to Run
Unit< 30sSingle function/moduleAfter every code change
Integration< 5minComponent interactionsAfter feature completion
E2E< 30minFull user flowsBefore commit/PR

Decision Matrix

Change Type → Test Tier

Change TypeUnitIntegrationE2E
Single function fixRequiredSkipSkip
New feature (1 file)RequiredRequiredSkip
Multi-file featureRequiredRequiredRequired
RefactoringRequiredRequiredOptional
API changesRequiredRequiredRequired
UI changesRequiredOptionalRequired
Bug fix (isolated)RequiredOptionalSkip
Database changesRequiredRequiredRequired
Config changesRequiredRequiredOptional

Escalation Signals

Escalate to Integration when:

  • Changes span multiple files
  • Business logic affected
  • Service boundaries modified
  • Database queries changed

Escalate to E2E when:

  • User-facing features modified
  • Authentication/authorization changes
  • Critical path functionality
  • Before creating PR

Commands by Tier

# Tier 1: Unit (fast feedback)
/test:quick

# Tier 2: Integration (feature completion)
/test:full --coverage

# Tier 3: E2E (pre-commit)
/test:full

Agent Consultation Triggers

Consult test-architecture agent when:

  • New feature module created
  • Coverage drops > 5%
  • 3 flaky tests detected

  • Framework questions arise
  • Test strategy needs adjustment

Consult test-runner agent when:

  • Need test execution with analysis
  • Multiple failures to diagnose
  • Want concise failure summary

Consult system-debugging agent when:

  • Integration test failures with unclear cause
  • Environment/timing issues
  • Flaky tests related to concurrency

Quick Reference

After Small Change

1. Run /test:quick
2. If pass: Continue working
3. If fail: Fix immediately

After Feature Completion

1. Run /test:full --coverage
2. Check coverage targets met
3. If gaps: /test:consult coverage

Before Commit/PR

1. Run /test:full
2. All tiers must pass
3. Review coverage report

For New Features

1. /test:consult new-feature
2. Write tests (TDD)
3. Run /test:quick during development
4. Run /test:full before PR

Activation Triggers

This skill auto-activates when:

  • User mentions "test", "run tests", "testing"
  • After code modification by Claude
  • During TDD workflow
  • When /test:* commands invoked
  • When discussing test strategy
Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.24

Published

Sep 24, 2026

Category

Uncategorized

License

MIT

Source path

testing-plugin/skills/test-tier-selection

Default branch

main

Latest commit

1668324

Tree SHA

b2d4cc3