regression-testing — Claude Code skill: what it does, how to install
Selects affected tests using git diff and impact analysis instead of running the whole suite. Cuts commit test execution down to 5–10 minutes.
npx skills add proffesor-for-testing/agentic-qe --skill regression-testing -a claude-codeWhat regression-testing does
The skill organizes regression testing after code modifications. It coordinates specialized agents like qe-regression-risk-analyzer and qe-test-executor to inspect your git diff, map changed files to test coverage, and prioritize execution order. Test selection uses change analysis, risk scoring, or fixed time budgets.
Execution follows three stages: smoke tests with changed modules for per-commit checks, an extended nightly run, and a full pre-release suite. The skill also generates regression cases directly from production bug reports, storing traces under the aqe/regression-testing/ memory space.
AI assistants frequently default to running every test despite explicit instructions to filter. Constrain runs with --affected or provide concrete file lists. Change-based selection overlooks transitive dependencies across multiple layers, so container runs need --workers=2 and test sharding to avoid memory crashes.
What it helps with
- select affected test suites based on git diff
- keep per-commit test runs within a 5–10 minute window
- generate regression tests from production bug tickets
- configure test sharding and concurrency to avoid CI memory limits
Example prompts for the agent
- Run regression-testing on git diff to select only affected test suites
- Plan a 15-minute regression test run using regression-testing
- Generate a regression test for production issue BUG-567
How to install regression-testing
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill regression-testing -a claude-code2Manually: put the files in place
~/.claude/skills/regression-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/regression-testing/
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill regression-testing -a codex2Manually: put the files in place
.agents/skills/regression-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill regression-testing -a cursor2Manually: put the files in place
.cursor/skills/regression-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install proffesor-for-testing/agentic-qe regression-testing2Manually: put the files in place
.github/skills/regression-testing/SKILL.md1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill regression-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/proffesor-for-testing/agentic-qe --path assets/skills/regression-testingManually: put the files in place
.devin/skills/regression-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill regression-testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about regression-testing
How to install regression-testing in Claude Code?
Run npx skills add proffesor-for-testing/agentic-qe --skill regression-testing -a claude-code. The file will be placed in ~/.claude/skills/regression-testing/SKILL.md.
What does regression-testing do?
It prioritizes and filters tests according to code changes and risk factors. This workflow isolates impacted code and cuts down unnecessary test executions in CI pipelines.
Why does the agent report zero regressions when changes are broken?
The agent sometimes outputs zero regressions if tests failed to execute altogether. Always check the total test count in the output rather than trusting a bare pass status.
Source text
SKILL.md · MIT
---
name: regression-testing
description: "Strategic regression testing with test selection, impact analysis, and continuous regression management. Use when verifying fixes don't break existing functionality, planning regression suites, or optimizing test execution for faster feedback."
category: specialized-testing
priority: high
tokenEstimate: 1000
agents: [qe-regression-risk-analyzer, qe-test-executor, qe-coverage-analyzer]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2025-12-02
dependencies: []
quick_reference_card: true
tags: [regression, test-selection, impact-analysis, ci-cd, change-based, risk-based]
trust_tier: 3
validation:
schema_path: schemas/output.json
validator_path: scripts/validate-config.json
eval_path: evals/regression-testing.yaml
---
# Regression Testing
<default_to_action>
When verifying changes don't break existing functionality:
1. ANALYZE what changed (git diff, impact analysis)
2. SELECT tests based on change + risk (not everything)
3. RUN in priority order (smoke → selective → full)
4. OPTIMIZE execution (parallel, sharding)
5. MONITOR suite health (flakiness, execution time)
**Quick Regression Strategy:**
- Per-commit: Smoke + changed code tests (5-10 min)
- Nightly: Extended regression (30-60 min)
- Pre-release: Full regression (2-4 hours)
**Critical Success Factors:**
- Smart selection catches 90% of regressions in 10% of time
- Flaky tests waste more time than they save
- Every production bug becomes a regression test
</default_to_action>
## Quick Reference Card
### When to Use
- After any code change
- Before release
- After dependency updates
- After environment changes
### Test Selection Strategies
| Strategy | How | Reduction |
|----------|-----|-----------|
| **Change-based** | Git diff analysis | 70-90% |
| **Risk-based** | Priority by impact | 50-70% |
| **Historical** | Frequently failing | 40-60% |
| **Time-budget** | Fixed time window | Variable |
---
## Change-Based Test Selection
```typescript
// Analyze changed files and select impacted tests
function selectTests(changedFiles: string[]): string[] {
const testsToRun = new Set<string>();
for (const file of changedFiles) {
// Direct tests
testsToRun.add(`${file.replace('.ts', '.test.ts')}`);
// Dependent tests (via coverage mapping)
const dependentTests = testCoverage[file] || [];
dependentTests.forEach(t => testsToRun.add(t));
}
return Array.from(testsToRun);
}
// Example: payment.ts changed
// Runs: payment.test.ts, checkout.integration.test.ts, e2e/purchase.test.ts
```
---
## CI/CD Integration
```yaml
# .github/workflows/regression.yml
jobs:
quick-regression:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Analyze changes
id: changes
uses: dorny/paths-filter@v2
with:
filters: |
payment:
- 'src/payment/**'
auth:
- 'src/auth/**'
- name: Run affected tests
run: npm run test:affected
- name: Smoke tests (always)
run: npm run test:smoke
nightly-regression:
if: github.event_name == 'schedule'
timeout-minutes: 120
steps:
- run: npm test -- --coverage
```
---
## Agent-Driven Regression
```typescript
// Smart test selection
await Task("Regression Analysis", {
pr: 1234,
strategy: 'change-based-with-risk',
timeBudget: '15min'
}, "qe-regression-risk-analyzer");
// Returns:
// {
// mustRun: ['payment.test.ts', 'checkout.integration.test.ts'],
// shouldRun: ['order.test.ts'],
// canSkip: ['profile.test.ts', 'search.test.ts'],
// estimatedTime: '12 min',
// riskCoverage: 0.94
// }
// Generate regression test from production bug
await Task("Bug Regression Test", {
bug: { id: 'BUG-567', description: 'Checkout fails > 100 items' },
preventRecurrence: true
}, "qe-test-generator");
```
---
## Agent Coordination Hints
### Memory Namespace
```
aqe/regression-testing/
├── test-selection/* - Impact analysis results
├── suite-health/* - Flakiness, timing trends
├── coverage-maps/* - Test-to-code mapping
└── bug-regressions/* - Tests from production bugs
```
### Fleet Coordination
```typescript
const regressionFleet = await FleetManager.coordinate({
strategy: 'comprehensive-regression',
agents: [
'qe-regression-risk-analyzer', // Analyze changes, select tests
'qe-test-executor', // Execute selected tests
'qe-coverage-analyzer', // Analyze coverage gaps
'qe-quality-gate' // Go/no-go decision
],
topology: 'sequential'
});
```
---
## Related Skills
- [risk-based-testing](../risk-based-testing/) - Risk-based prioritization
- [test-automation-strategy](../test-automation-strategy/) - Automation pyramid
- [continuous-testing-shift-left](../continuous-testing-shift-left/) - CI/CD integration
---
## Remember
**With Agents:** `qe-regression-risk-analyzer` provides intelligent test selection achieving 90% defect detection in 10% of execution time. Agents generate regression tests from production bugs automatically.
## Skill Composition
- **Test failing?** → Use `/test-failure-investigator` to diagnose root cause
- **File a bug** → Use `/bug-reporting-excellence` for proper bug reporting
- **Test selection** → Use `/risk-based-testing` for risk-based prioritization
## Gotchas
- Agent defaults to "run everything" despite being told to select — explicitly constrain with `--affected` or file list
- Change-based selection misses transitive dependencies — a model change can break a controller test 3 hops away
- Flaky tests in regression suites erode trust faster than missing tests — quarantine immediately, don't skip
- Agent may report "0 regressions" when tests simply weren't run — verify test count in output, not just pass/fail
- Running full regression in containers often OOMs — use `--workers=2` and `--shard` for CI environments
© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe