Skip to main content
skill CX Codex

risk-based-testing · proffesor-for-testing — Claude Code skill: what it does, how to install

risk-based-testing directs QA effort to high-risk areas using a 1-5 probability and impact scale, adjusting test depth dynamically.

MIT 128 installs ★ 533 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add proffesor-for-testing/agentic-qe --skill risk-based-testing -a claude-code
Open on GitHub

What risk-based-testing does

The skill scores components by multiplying probability and impact ratings on a 1 to 5 scale. Critical scores (20–25) receive 60% of the testing budget, high risk (12–19) takes 25%, medium (6–11) gets 10%, and low risk (1–5) receives 5% for smoke tests.

Execution coordinates four agents: qe-regression-risk-analyzer, qe-test-generator, qe-production-intelligence, and qe-quality-gate. It relies on a gradient boosting model to forecast risk scores using code complexity, change frequency, author experience, and file age.

Scores update dynamically. A production incident immediately raises the failure probability for affected features, shifting them into deeper test suites. Without historical bug databases and commit logs, the machine learning risk model cannot calculate file-level risk predictions.

What it helps with

  • prioritize test coverage for release planning
  • allocate automation effort based on failure probability and impact
  • adjust component risk scores dynamically after production incidents
  • filter test execution in CI/CD pipelines by risk thresholds

Example prompts for the agent

  • Assess component risk for payment and search features and generate test plans
  • Update risk scores for search after the recent production incident
  • Coordinate qe-test-generator to apply comprehensive depth to checkout

How to install risk-based-testing

1Skills CLI (Vercel)

npx skills add proffesor-for-testing/agentic-qe --skill risk-based-testing -a claude-code

2Manually: put the files in place

~/.claude/skills/risk-based-testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/risk-based-testing/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about risk-based-testing

How do I install risk-based-testing in Claude Code?

Run npx skills add proffesor-for-testing/agentic-qe --skill risk-based-testing -a claude-code. The file will be saved to ~/.claude/skills/risk-based-testing/SKILL.md.

What is the effort allocation formula?

It allocates 60% of testing effort to critical items, 25% to high priority, 10% to medium, and 5% to low-risk areas.

Which subagents does this skill coordinate?

It orchestrates qe-regression-risk-analyzer, qe-test-generator, qe-production-intelligence, and qe-quality-gate sequentially.

Source text

SKILL.md · MIT
---
name: risk-based-testing
description: "Focus testing effort on highest-risk areas using risk assessment and prioritization. Use when planning test strategy, allocating testing resources, or making coverage decisions."
category: testing-methodologies
priority: high
tokenEstimate: 1000
agents: [qe-regression-risk-analyzer, qe-test-generator, qe-production-intelligence, qe-quality-gate]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2025-12-02
dependencies: []
quick_reference_card: true
tags: [risk, prioritization, test-planning, coverage, impact-analysis]
trust_tier: 3
validation:
  schema_path: schemas/output.json
  validator_path: scripts/validate-config.json
  eval_path: evals/risk-based-testing.yaml
---

# Risk-Based Testing

<default_to_action>
When planning tests or allocating testing resources:
1. IDENTIFY risks per component (use 1-5 scale for probability and impact)
2. PRIORITIZE: Critical (20+) → High (12-19) → Medium (6-11) → Low (1-5)
3. ALLOCATE effort: 60% critical, 25% high, 10% medium, 5% low
4. REASSESS continuously: Production incidents raise risk; stable code lowers it
</default_to_action>

## Quick Reference Card

### When to Use
- Planning sprint/release test strategy
- Deciding what to automate first
- Allocating limited testing time
- Justifying test coverage decisions

### Effort Allocation by Risk Score
| Score | Priority | Effort | Action |
|-------|----------|--------|--------|
| 20-25 | Critical | 60% | Comprehensive testing, multiple techniques |
| 12-19 | High | 25% | Thorough testing, automation priority |
| 6-11 | Medium | 10% | Standard testing, basic automation |
| 1-5 | Low | 5% | Smoke test, exploratory only |

---

## Apply Test Depth by Risk
```typescript
await Task("Risk-Based Test Generation", {
  critical: {
    features: ['checkout', 'payment'],
    depth: 'comprehensive',
    techniques: ['unit', 'integration', 'e2e', 'performance', 'security']
  },
  high: {
    features: ['auth', 'user-profile'],
    depth: 'thorough',
    techniques: ['unit', 'integration', 'e2e']
  },
  medium: {
    features: ['search', 'notifications'],
    depth: 'standard',
    techniques: ['unit', 'integration']
  },
  low: {
    features: ['admin-panel', 'settings'],
    depth: 'smoke',
    techniques: ['smoke-tests']
  }
}, "qe-test-generator");
```

### Step 3: Reassess Dynamically
```typescript
// Production incident increases risk
await Task("Update Risk Score", {
  feature: 'search',
  event: 'production-incident',
  previousRisk: 9,
  newProbability: 5,  // Increased due to incident
  newRisk: 15         // Now HIGH priority
}, "qe-regression-risk-analyzer");
```

---

## ML-Enhanced Risk Analysis

```typescript
// Agent predicts risk using historical data
const riskAnalysis = await Task("ML Risk Analysis", {
  codeChanges: changedFiles,
  historicalBugs: bugDatabase,
  prediction: {
    model: 'gradient-boosting',
    factors: ['complexity', 'change-frequency', 'author-experience', 'file-age']
  }
}, "qe-regression-risk-analyzer");

// Output: 95% accuracy risk prediction per file
```

---

## Agent Coordination Hints

### Memory Namespace
```
aqe/risk-based/
├── risk-scores/*        - Current risk assessments
├── historical-bugs/*    - Bug patterns by area
├── production-data/*    - Incident data for risk
└── coverage-map/*       - Test depth by risk level
```

### Fleet Coordination
```typescript
const riskFleet = await FleetManager.coordinate({
  strategy: 'risk-based-testing',
  agents: [
    'qe-regression-risk-analyzer',  // Risk scoring
    'qe-test-generator',            // Risk-appropriate tests
    'qe-production-intelligence',   // Production feedback
    'qe-quality-gate'               // Risk-based gates
  ],
  topology: 'sequential'
});
```

---

## Integration with CI/CD

```yaml
# Risk-based test selection in pipeline
- name: Risk Analysis
  run: aqe risk-analyze --changes ${{ github.event.pull_request.files }}

- name: Run Critical Tests
  if: risk.critical > 0
  run: npm run test:critical

- name: Run High Tests
  if: risk.high > 0
  run: npm run test:high

- name: Skip Low Risk
  if: risk.low_only
  run: npm run test:smoke
```

---

## Related Skills
- [agentic-quality-engineering](../agentic-quality-engineering/) - Risk-aware agents
- [context-driven-testing](../context-driven-testing/) - Context affects risk
- [regression-testing](../regression-testing/) - Risk-based regression selection
- [shift-right-testing](../shift-right-testing/) - Production informs risk

---

## Remember

**With Agents:** Agents calculate risk using ML on historical data, select risk-appropriate tests, and adjust scores from production feedback. Use agents to maintain dynamic risk profiles at scale.

© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe

Similar skills

All skills for Testing and QA →

risk-based-testing by other authors comes first.

risk-based-testing kindlmann risk-based-testing builds a risk matrix scored by business impact and probability, runs failure mode analysis on the top items, and maps test coverage to risk zones. Run it before test-strategy. CX Codex +1 1,800installs gitnexus-impact-analysis abhigyanpatwari gitnexus-impact-analysis is a Claude Code skill that calculates the blast radius of code modifications. Runs dependency checks before edits or commits using GitNexus. CX Codex +1 2,000installs forward-risk JoelLewis forward-risk estimates future portfolio losses with parametric VaR, Expected Shortfall, Monte Carlo simulation and scenario analysis. Useful when you need tail risk on current positions. CX Codex +1 766installs impediment-prioritization official ajenns impediment-prioritization is a GitHub Copilot skill that scores impediments and their countermeasures with a value-stream model. It activates for remediation backlogs, audit findings, risks, and improvement items. CX Codex +1 68installs llmquant-risk LLMQuant llmquant-risk routes risk requests to panic scoring, VIX regimes, hedge design, and research health checks when those workflows are needed. CX Codex +1 561installs risk-manager VoltAgent Community risk-manager — a Claude Code subagent for enterprise risk work: financial, operational, regulatory, strategic. It activates when you need exposure assessment, a control framework, or model validation. CX Codex 550installs testing-strategy official anthropics testing-strategy is a Claude Code skill that designs test strategies and plans for components. It triggers on questions like how should we test or what tests do we need. CX Codex +1 6,800installs

From the same set73

The whole set →
a11y-ally The a11y-ally skill audits pages for WCAG issues and suggests fixes based on page context. Use it to review a site or assess video accessibility. CX Codex +1 131installs contract-testing Guides consumer-driven contract testing for microservices using Pact, catching breaking API changes before deploy. CX Codex +1 130installs qe-quality-assessment qe-quality-assessment reviews code quality through complexity, lint, code smells, and test health. Use it for release scoring, quality gates, and deployment checks. CX Codex +1 129installs qe-defect-intelligence qe-defect-intelligence identifies high-risk code before bugs escape by analyzing change frequency, complexity metrics, and past defect patterns. Flags risky PRs and runs root cause analysis on test failures. CX Codex +1 129installs n8n-trigger-testing-strategies n8n-trigger-testing-strategies — a skill for testing how n8n workflows get triggered: webhooks, cron schedules, service events, polling. Useful when a workflow fires at the wrong moment or not at all. CX Codex +1 128installs n8n-expression-testing n8n-expression-testing is a Claude Code skill that checks n8n expressions against different data contexts, including missing values, while debugging data transformations. CX Codex +1 127installs qe-coverage-analysis qe-coverage-analysis inspects Istanbul, c8, and lcov data to detect untested paths with risk scoring. Useful when prioritizing test efforts or checking PR quality gates. CX Codex +1 127installs test-reporting-analytics test-reporting-analytics generates quality dashboards, executive reports, and failure predictions based on code diffs. Useful when tracking CI/CD trends or preparing release gates. CX Codex +1 126installs

Project sponsors

Companies that keep this analytics open