Token导航 LogoToken导航

Agent Skill · 研究检索

risk-based-testing(基于风险的测试)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

risk-based-testing 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,674 个 Skill 里排第 63,254。

总安装 318周安装 13GitHub Stars 4下载 102核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:risk-based-testing(基于风险的测试)
来源仓库:https://github.com/petrkindlmann/qa-skills
仓库路径:skills/risk-based-testing
安装命令:
npx skills add https://github.com/petrkindlmann/qa-skills --skill risk-based-testing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/petrkindlmann/qa-skills --skill risk-based-testing

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助测试设计与自动化用例整理,适合基于风险的优先级排序场景。可帮助编写单元测试、端到端测试或根据失败日志定位问题。通过 GitHub 安装,支持 Codex、Claude、Cursor、Gemini CLI 等宿主环境。需确认项目测试框架与运行命令,避免为通过测试而破坏真实逻辑;涉及外部服务时应区分环境与模拟。

risk-based-testing 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/risk-based-testing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/petrkindlmann/qa-skills --skill risk-based-tes…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

risk-based-testing 怎么安装?

在终端执行 npx skills add https://github.com/petrkindlmann/qa-skills --skill risk-based-testing。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

risk-based-testing 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

risk-based-testing 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

risk-based-testing 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

risk-based-testing 用的人多吗?

公开数据是累计安装 318 次,近一周安装 13 次,下载 102 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

risk-based-testing 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
risk-based-testing

基于风险的测试 · 本页

3184需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文


Discovery Questions

Before building a risk model, gather context from stakeholders across engineering, product, and operations. Check .agents/qa-project-context.md first -- if it exists, use it as the foundation and skip questions already answered there.

Revenue-Critical Flows

  • Which user flows directly generate revenue? (checkout, subscription, billing, upgrades)
  • What is the revenue impact per hour of downtime for each flow?
  • Are there time-sensitive flows? (flash sales, market-hours trading, payroll deadlines)
  • Which flows have contractual SLAs with financial penalties?

Recent Failures

  • What broke in the last 3 releases? What escaped to production?
  • What were the root causes? (code defect, config error, third-party failure, data migration)
  • What was the blast radius of each incident? (users affected, revenue lost, reputation impact)
  • Were there near-misses caught late in testing that could have escaped?

Fragile Areas

  • Which parts of the codebase change most frequently? (high churn = high risk)
  • Which modules have the lowest test coverage today?
  • Which areas have the most complex business logic or the most conditional branches?
  • Which code was written by engineers who have since left the team?

Third-Party Dependencies

  • Which external services does the product depend on? (payment processors, auth providers, CDNs, APIs)
  • What is the historical reliability of each dependency?
  • What happens when each dependency goes down? (graceful degradation or hard failure?)
  • Are there single points of failure with no fallback?

Compliance and Data

  • What regulatory requirements apply? (GDPR, PCI-DSS, HIPAA, SOC2, SOX)
  • What data is most sensitive? (PII, financial, health, credentials)
  • What are the legal consequences of a data breach or compliance violation?
  • Are there audit requirements that mandate specific testing evidence?

Core Principles

1. Not All Features Are Equal

A bug in the checkout flow that prevents purchases is categorically different from a misaligned icon on a settings page. Testing effort must reflect this reality. Equal coverage across all features wastes resources on low-risk areas while leaving critical paths under-tested.

2. Risk = Impact x Probability

Risk is not a gut feeling. It is a product of two measurable dimensions: how bad is it if this fails (impact), and how likely is it to fail (probability). Both must be assessed independently and scored consistently across the product.

3. Risk Assessment Is Continuous

A risk model created once and never updated is dangerous because it creates false confidence. Risk changes when the product changes, when dependencies change, when the team changes, and after every production incident. Build reassessment into the development rhythm.

4. Near-Misses Are Data

A bug caught in staging that would have been catastrophic in production is not a success story -- it is a signal that the risk model underestimated that area. Track near-misses with the same rigor as production incidents.

5. Risk Informs Coverage, Not the Other Way Around

Do not start with "we need 80% coverage everywhere." Start with "where would a failure hurt most?" and let the risk model drive coverage targets per module.


Workflow

1. Identify → 2. Classify → 3. Analyze → 4. Heatmap → 5. Coverage → 6. Reassess → (repeat)
                                 ↑
                       score ≥ 10 only; skip to 4 if no items reach threshold

Phase 1: Risk Identification

Enumerate everything that could go wrong. Cast a wide net. Sources include:

  • Stakeholder interviews: Product managers know business-critical flows. Engineers know fragile code. Support knows recurring user complaints.
  • Incident history: Past failures predict future failures. Review post-mortems from the last 6-12 months.
  • Dependency mapping: List every external service, database, message queue, and third-party API. Each is a risk vector.
  • Change analysis: Areas with frequent code changes (use git log --stat) have higher defect probability.
  • Architecture review: Shared databases, single points of failure, synchronous chains, and tightly coupled modules amplify blast radius.

Output: A raw list of risk items, each describing what could fail and what the consequence would be.

Phase 2: Risk Classification

Categorize each risk item along two axes.

Impact categories (how bad is it):

ScoreLevelDefinitionExamples
5CatastrophicRevenue loss, data breach, legal action, user safetyPayment processing fails, PII exposed
4MajorSignificant user impact, SLA violation, major feature brokenLogin broken for segment, data corruption
3ModerateWorkflow disrupted, workaround existsSearch returns wrong results, export fails
2MinorCosmetic or minor UX issueAlignment bug, slow non-critical page
1NegligibleNo user impact, internal onlyAdmin tooltip wrong, log format issue

Probability categories (how likely is it):

ScoreLevelDefinitionIndicators
5FrequentExpected in most releasesHigh code churn, no tests, complex logic
4LikelyWill probably happen within a quarterRecent changes, partial coverage, known tech debt
3PossibleCould happen, has happened beforeModerate complexity, some coverage
2UnlikelyImprobable but not impossibleStable code, good coverage, simple logic
1RareRequires exceptional circumstancesWell-tested, rarely changed, simple

Phase 3: Failure Mode Analysis

For each high-risk item (score >= 10), perform a detailed failure mode analysis.

Failure Mode Analysis Template:

Feature/Component: [name]
Risk Score: [impact x probability]

Failure Mode 1: [what specifically can fail]
  Trigger:          [what causes this failure]
  Blast Radius:     [users affected, systems affected, data affected]
  Detection Method: [how would we know this happened -- monitoring, user report, test]
  Current Mitigation: [existing tests, monitoring, feature flags, fallbacks]
  Gap:              [what is missing from current mitigation]

Failure Mode 2: ...

Example -- E-commerce Checkout:

Feature/Component: Checkout Flow
Risk Score: 20 (Impact: 5, Probability: 4)

Failure Mode 1: Payment charge succeeds but order not recorded
  Trigger:          Race condition between payment API callback and order write
  Blast Radius:     Individual users; money charged but no order confirmation
  Detection Method: Payment reconciliation job (runs hourly), user complaint
  Current Mitigation: Idempotency key on payment, retry on order write
  Gap:              No automated test for the race condition; reconciliation delay is 1 hour

Failure Mode 2: Discount code applies incorrect amount
  Trigger:          Percentage discount on already-discounted item
  Blast Radius:     All users with stacked discounts; revenue leakage
  Detection Method: Margin monitoring alert (>5% deviation)
  Current Mitigation: Unit tests for single discounts
  Gap:              No tests for discount stacking; no tests for rounding edge cases

Failure Mode 3: Inventory not reserved during checkout
  Trigger:          Concurrent purchases of last-stock item
  Blast Radius:     Oversold items, fulfillment failure, customer trust
  Detection Method: Fulfillment team discovers during packing
  Current Mitigation: Database-level stock check on order creation
  Gap:              No load test simulating concurrent last-item purchases

Phase 4: Risk Heatmap

Visualize all risk items on a 5x5 matrix to communicate priorities to stakeholders and drive coverage decisions.

Risk Heatmap Template
                    PROBABILITY
                    Rare(1)   Unlikely(2)  Possible(3)  Likely(4)   Frequent(5)
                   +----------+-----------+-----------+----------+-----------+
  Catastrophic(5)  |  5  MED  | 10  HIGH  | 15  CRIT  | 20 CRIT  | 25  CRIT  |
                   +----------+-----------+-----------+----------+-----------+
  Major(4)         |  4  LOW  |  8  MED   | 12  HIGH  | 16 CRIT  | 20  CRIT  |
I                  +----------+-----------+-----------+----------+-----------+
M  Moderate(3)     |  3  LOW  |  6  MED   |  9  MED   | 12 HIGH  | 15  CRIT  |
P                  +----------+-----------+-----------+----------+-----------+
A  Minor(2)        |  2  LOW  |  4  LOW   |  6  MED   |  8 MED   | 10  HIGH  |
C                  +----------+-----------+-----------+----------+-----------+
T  Negligible(1)   |  1  LOW  |  2  LOW   |  3  LOW   |  4 LOW   |  5  MED   |
                   +----------+-----------+-----------+----------+-----------+

Color coding and action mapping:

ZoneScore RangeColorTesting Action
CRITICAL15-25RedAutomate fully + monitor in production + load test + manual exploratory
HIGH10-14OrangeAutomate fully + periodic manual review
MEDIUM5-9YellowAutomate happy path + key error cases
LOW1-4GreenManual testing on release or skip entirely
Populated Heatmap Example
                    Rare(1)   Unlikely(2)  Possible(3)  Likely(4)   Frequent(5)
                   +----------+-----------+-----------+----------+-----------+
  Catastrophic(5)  |          | Auth      | Payments  | Checkout |           |
                   |          | bypass    | fail      | crash    |           |
                   +----------+-----------+-----------+----------+-----------+
  Major(4)         |          |           | Data      | Search   | User      |
                   |          |           | export    | broken   | upload    |
                   +----------+-----------+-----------+----------+-----------+
  Moderate(3)      |          | Report    | Email     | Profile  |           |
                   |          | format    | delivery  | edit     |           |
                   +----------+-----------+-----------+----------+-----------+
  Minor(2)         | Footer   | Tooltip   | Theme     |          |           |
                   | link     | text      | switch    |          |           |
                   +----------+-----------+-----------+----------+-----------+
  Negligible(1)    | Admin    |           |           |          |           |
                   | label    |           |           |          |           |
                   +----------+-----------+-----------+----------+-----------+

Phase 5: Test Coverage Alignment

Map test density to risk level. Every risk zone gets a prescribed testing approach.

Coverage Requirements by Risk Zone
Risk ZoneUnit TestsIntegration TestsE2E TestsManual TestingMonitoring
CRITICAL (15-25)90%+ branch coverageAll service boundariesFull user journey + error pathsExploratory each releaseReal-time alerts, synthetic checks
HIGH (10-14)80%+ branch coverageKey interactionsHappy path + top 3 error pathsSpot checksDashboard + daily review
MEDIUM (5-9)70%+ branch coverageHappy path onlyHappy path onlyOn major changesWeekly review
LOW (1-4)Basic happy pathNone requiredNone requiredOn initial buildNone required
Gap Identification

Compare current coverage against required coverage per risk zone:

Gap Analysis Worksheet:

Feature: [name]
Risk Zone: [CRITICAL / HIGH / MEDIUM / LOW]
Risk Score: [number]

Required Coverage:
  Unit:        [target %]     Current: [actual %]     Gap: [delta]
  Integration: [required?]    Current: [exists? y/n]  Gap: [missing scenarios]
  E2E:         [required?]    Current: [exists? y/n]  Gap: [missing flows]
  Monitoring:  [required?]    Current: [exists? y/n]  Gap: [missing alerts]

Priority: [P0 / P1 / P2 / P3]
Estimated Effort: [hours / story points]
Owner: [name]
Target Sprint: [sprint number]

Phase 6: Monitoring and Reassessment

Risk assessment is not a one-time activity. Build reassessment into the team's rhythm.

Reassessment triggers:

  • After every production incident (within 48 hours)
  • When a new feature area is introduced
  • When a critical dependency changes (API version, provider switch)
  • When team composition changes significantly
  • Quarterly at minimum, even without triggers

Continuous risk signals to monitor:

  • Code churn by module: git log --since="3 months ago" --format='' --name-only | sort | uniq -c | sort -rn | head -20
  • Defect clustering: Which modules produce the most bugs? Track with issue labels.
  • Near-miss frequency: How often do staging/QA catches prevent production incidents?
  • Dependency health: Monitor status pages and uptime of critical third-party services.
  • Coverage trends: Is coverage increasing or decreasing in high-risk areas?

Real-World Examples

Example 1: E-commerce Checkout

Risk profile: Impact 5, Probability 4, Score 20 (CRITICAL)

Failure modes identified:

  • Payment charged but order not created (race condition)
  • Discount stacking applies incorrect total
  • Inventory oversold under concurrent load
  • Shipping calculator returns wrong rate for international addresses
  • Tax calculation wrong for specific jurisdictions

Test coverage prescribed:

  • Unit tests: discount calculation (all combinations), tax rules (per jurisdiction), inventory decrement logic
  • Integration tests: payment gateway communication (success, failure, timeout, duplicate), order creation pipeline, inventory reservation under concurrency
  • E2E tests: full checkout flow (guest + logged in), checkout with discount, checkout with international shipping, checkout retry after payment failure
  • Load tests: 100 concurrent checkouts for last-stock item
  • Monitoring: real-time order completion rate, payment-to-order reconciliation every 5 minutes, revenue anomaly detection

Example 2: Content Loading (Media Platform)

Risk profile: Impact 4, Probability 3, Score 12 (HIGH)

Failure modes identified:

  • CDN cache miss causes origin overload
  • Video transcoding fails silently for specific codecs
  • Thumbnail generation timeout leaves blank images
  • Content recommendation engine returns stale or empty results

Test coverage prescribed:

  • Unit tests: transcoding pipeline input validation, recommendation scoring algorithm
  • Integration tests: CDN purge/refresh flow, transcoding job queue processing, thumbnail generation for each supported format
  • E2E tests: content upload through playback, content discovery through recommendation click
  • Monitoring: CDN hit ratio, transcoding failure rate, thumbnail generation latency p99

Example 3: Third-Party API Integration

Risk profile: Impact 4, Probability 4, Score 16 (CRITICAL)

Failure modes identified:

  • API rate limit exceeded during peak traffic
  • API response schema changes without notice (breaking deserialization)
  • API timeout causes cascade failure in synchronous call chain
  • API returns 200 with error body (non-standard error handling)

Test coverage prescribed:

  • Unit tests: response parser for all known response shapes including malformed responses, rate limit backoff calculation, circuit breaker state transitions
  • Integration tests: API contract tests (validate response schema against expected shape), timeout handling, retry behavior, circuit breaker activation
  • E2E tests: user flow when API is slow (degraded but functional), user flow when API is down (graceful fallback)
  • Monitoring: API response time p50/p95/p99, error rate, rate limit proximity, circuit breaker state

Example 4: Authentication Flows

Risk profile: Impact 5, Probability 2, Score 10 (HIGH)

Failure modes identified:

  • Session token not invalidated on password change
  • OAuth callback race condition allows account takeover
  • MFA bypass through API endpoint that skips MFA check
  • Rate limiting not enforced on login endpoint (brute force)

Test coverage prescribed:

  • Unit tests: token generation and validation, password hashing, MFA code verification, rate limit counter logic
  • Integration tests: full auth flow (register, login, logout, password reset), session invalidation on credential change, OAuth flow with all supported providers, MFA enrollment and verification
  • E2E tests: login flow (valid credentials, invalid, locked account), password reset flow, MFA flow
  • Security tests: brute force attempt (verify rate limiting), session fixation, token reuse after logout
  • Monitoring: failed login rate spike, unusual session patterns, MFA bypass attempts

Anti-Patterns

Testing Everything Equally

Applying the same coverage targets and test density to every feature regardless of risk. A 90% coverage target on a settings page wastes effort that should go toward payment processing or authentication. Let the risk model drive allocation.

One-Time Risk Assessment

Creating a risk matrix during planning and never updating it. The product, team, and dependencies all change continuously. A risk model from 6 months ago does not reflect today's reality. Schedule reassessment and enforce it.

Ignoring Near-Misses

Treating bugs caught in staging or QA as pure successes. Near-misses are risk signals. If a critical bug was caught only by manual testing in staging, that means the automated safety net has a gap. Document near-misses and adjust the risk model.

Risk Theater

Going through the motions of risk assessment (filling in matrices, creating heatmaps) without actually changing test allocation. If the risk heatmap exists but test coverage does not align to it, the exercise was wasted. Verify alignment quarterly.

Anchoring on Historical Risk

Over-weighting past incidents and under-weighting new risk vectors. A module that failed 2 years ago and has since been rewritten may no longer be high risk. Conversely, a new integration with a third party has unknown risk that deserves attention.

Confusing Severity with Priority

Severity measures how bad a failure is. Priority measures how urgently to test it. A catastrophic but extremely rare failure (earthquake destroys data center) might be lower priority than a moderate but frequent failure (search results occasionally wrong). The risk matrix accounts for both dimensions -- use the composite score, not impact alone.


Done When

  • A risk matrix exists with every in-scope feature scored on both impact (1-5) and probability (1-5) axes
  • Each feature's composite risk score places it in a named zone (CRITICAL, HIGH, MEDIUM, or LOW) with a corresponding testing action assigned
  • Features scoring 10+ have a completed failure mode analysis with blast radius, detection method, and coverage gap documented
  • Test coverage requirements per risk zone are mapped against current coverage, with gaps explicitly listed and assigned to an owner and target sprint
  • Reassessment triggers and cadence are documented (quarterly minimum, plus post-incident)

Related Skills

  • test-strategy -- The overall QA strategy document that risk-based testing feeds into; risk assessment is one component of a broader strategy.
  • test-planning -- Sprint-level test planning uses risk priorities to decide what to test in each iteration.
  • release-readiness -- Release go/no-go decisions should reference the risk heatmap to ensure critical areas are covered.
  • qa-metrics -- Defect escape rate and defect clustering metrics feed back into risk reassessment.
  • qa-project-context -- The project context file captures risk-relevant information (critical flows, known fragile areas, dependencies) that this skill consumes.

平台分布

Codex

37.39%
按下载量换算38

Claude

28.31%
按下载量换算29

Cursor

16.9%
按下载量换算17

Gemini CLI

10.12%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills