qa-scenario-tree

qa-scenario-tree is a skill for Claude Code from Kokxi/qa-test-skills. It costs 130 tokens per session (3,017 once invoked), scanned A, original, MIT.

A method for organizing tests as a tree of normal user journeys, alternative choices, failures, business rules, and data changes. It helps connect each scenario back to the requirement it checks.

In plain words
What is it for?
Use it to map complex workflows, identify missing test cases, cover error and edge paths, and give each scenario a traceable test ID.
Why use it?
It reduces the risk of testing only the expected path while missing invalid input, network failures, role differences, state changes, or other branches.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the qa-test-skills plugin — 49 skills shipped together

Good fit Use it to map complex workflows, identify missing test cases, cover error and edge paths, and give each scenario a traceable test ID.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kokxi/qa-test-skills/qa-scenario-tree
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.

Any agent
npx skills add Kokxi/qa-test-skills --skill qa-scenario-tree
Clone the repo
git clone --depth 1 https://github.com/Kokxi/qa-test-skills

Made for: Claude Code.

Or install qa-test-skills, the plugin that ships this one along with the rest of its 49 skills.

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 qa-scenario-tree

README.md
[![agentmods](https://agentmods.dev/badge/skills/kokxi/qa-test-skills/qa-scenario-tree/github.svg)](https://agentmods.dev/skills/kokxi/qa-test-skills/qa-scenario-tree)
Your own site
<a href="https://agentmods.dev/skills/kokxi/qa-test-skills/qa-scenario-tree"><img src="https://agentmods.dev/badge/skills/kokxi/qa-test-skills/qa-scenario-tree/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for qa-scenario-tree

Your own site · 80×15
<a href="https://agentmods.dev/skills/kokxi/qa-test-skills/qa-scenario-tree"><img src="https://agentmods.dev/badge/skills/kokxi/qa-test-skills/qa-scenario-tree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,017 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00130 $0.03017
Opus 5 $0.00065 $0.01509
Sonnet 5 $0.00026 $0.00603
Haiku 4.5 $0.00013 $0.00302

Measured 5d ago against content hash ebcade1187b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

qa-scenario-tree 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.

skills/qa-scenario-tree/SKILL.md · 296 lines

How it starts

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

⚠️ 安全警告:本技能的示例可能涉及订单号、支付金额、截图、身份证、手机号等敏感数据。 实际使用时请勿粘贴真实生产数据、客户信息或财务凭证;测试前应脱敏/掩码处理。 本技能仅在 workspace/ 输出评估文件,不持久化、不外传、不跨会话复用。

场景树构建

核心原则

用树结构组织测试场景,确保覆盖完整、层次清晰。

场景数量要求(参考值)

关键指标:根据项目复杂度调整

复杂度 倍数 示例(显性5条)
简单项目 ×3 场景15个
中等项目 ×5 场景25个
复杂项目 ×7 场景35个

复杂度判断标准

  • 简单:单模块、低风险、无并发
  • 中等:多模块、中风险、少量并发
  • 复杂:跨模块、高风险、高并发

场景树结构

根节点:功能模块
├─ 主路径(Happy Path)          → 数量:需求数量 × 1
│   ├─ 场景1:正常流程1
│   ├─ 场景2:正常流程2
│   └─ ...
├─ 分支路径(Alternative Path)   → 数量:需求数量 × 2
│   ├─ 场景A:分支条件1
│   ├─ 场景B:分支条件2
│   └─ ...
├─ 异常路径(Exception Path)     → 数量:需求数量 × 1.5
│   ├─ 场景X:异常情况1
│   ├─ 场景Y:异常情况2
│   └─ ...
└─ 数据流(Data Flow)           → 数量:需求数量 × 0.5
    ├─ 场景α:数据创建
    ├─ 场景β:数据流转
    └─ ...

场景类型覆盖清单

主路径场景

  • 核心业务流程是否覆盖?
  • 正常用户操作路径是否覆盖?
  • 主要功能点是否覆盖?

分支路径场景

  • 不同用户角色是否覆盖?
  • 不同业务规则是否覆盖?
  • 不同配置选项是否覆盖?
  • 不同数据状态是否覆盖?
  • 不同环境条件是否覆盖?

异常路径场景

  • 输入异常是否覆盖?(空值/超长/格式错误)
  • 状态异常是否覆盖?(非法状态转换)
  • 网络异常是否覆盖?(断网/超时/延迟)
  • 依赖异常是否覆盖?(第三方服务故障)
  • 并发异常是否覆盖?(数据冲突/资源竞争)
  • 资源异常是否覆盖?(内存不足/磁盘满)

数据流场景

  • 数据创建是否覆盖?
  • 数据读取是否覆盖?
  • 数据更新是否覆盖?
  • 数据删除是否覆盖?
  • 数据同步是否覆盖?
  • 数据一致性是否覆盖?

## 构建方法

### 第1步:识别主路径
**问**:用户从开始到结束,最正常的操作路径是什么?

主路径识别:

  1. 用户起点:用户从哪里开始?
  2. 核心步骤:必须执行的步骤有哪些?
  3. 用户终点:用户在哪里结束?
  4. 成功标志:怎么算完成?

示例(电商下单): 用户浏览商品 → 加入购物车 → 选择地址 → 选择支付 → 确认支付 → 支付成功 → 生成订单


### 第2步:识别分支路径
**问**:在主路径的每一步,有什么条件分支?

分支识别方法:

  1. 条件判断:if-else条件是什么?
  2. 用户选择:用户有哪些选择?
  3. 状态分支:不同状态走不同路径?
  4. 配置分支:不同配置走不同路径?

示例(电商下单):

  • 选择地址:有地址/无地址/新增地址
  • 选择支付:微信支付/支付宝/银行卡
  • 使用优惠券:有/无/过期

### 第3步:识别异常路径
**问**:在每个步骤,可能出什么问题?怎么恢复?

异常识别方法:

  1. 输入异常:用户输入错误
  2. 系统异常:系统故障
  3. 网络异常:网络问题
  4. 依赖异常:第三方服务问题
  5. 并发异常:并发操作问题

示例(电商下单):

  • 加入购物车:库存不足
  • 选择地址:地址不存在
  • 支付:支付失败
  • 支付:网络中断

### 第4步:识别数据流
**问**:数据在模块间怎么流转?在哪创建/更新/删除?

数据流识别:

  1. 数据创建:在哪里创建数据?
  2. 数据读取:在哪里读取数据?
  3. 数据更新:在哪里更新数据?
  4. 数据删除:在哪里删除数据?
  5. 数据一致性:数据在各模块间是否一致?

示例(电商下单):

  • 订单数据:创建订单 → 更新库存 → 生成支付单
  • 用户数据:读取地址 → 使用优惠券 → 更新积分

## 场景描述模板

每个场景应包含:

```markdown

Read the full file on GitHub · 296 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 Changed ebcade1187b9
  2. 11d ago First seen · 296 lines · 130 tokens per session scan A 16decd0eaf35

Subscribe to this mod's changes

qa-scenario-tree is a skill published in the GitHub repository Kokxi/qa-test-skills (25 stars, last pushed 8d ago), licensed MIT. It adds 130 tokens to every session and 3,017 once invoked, about $0.0006 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 skills, from other repositories

agent-harness-fault-injection

Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.

sickn33/agentic-awesome-skills · 34 tokens

octocode-benchmark

Use when planning, running, grading, or reporting the by-hand Octocode research benchmark — pairwise matchups (Octocode anchor vs one baseline: gh+RTK, gh+Headroom, or plain gh) over markdown questions, with a fresh isolated runner agent per (question, arm, pass), one blind judge per question grading two answers X/Y…

bgauryy/octocode · 117 tokens

octocode-graph-eval

Use when you need a measurable keep/discard loop — goal→KPI, baseline vs target, held-out checks, eval suites, or don't-stop-till-done against a runnable sensor. Not for ordinary ship checks where 'tests passed' is enough.

bgauryy/octocode · 59 tokens

plugin-test

A testing guide for Zhin.js plugins using Vitest, a JavaScript and TypeScript testing framework. It focuses on checking command and tool behavior, ordinary business logic, and the plugin package’s required structure.

zhinjs/zhin · 51 tokens

modernize-test-starter

Modernize QUnit unit tests and OPA5 integration tests to the UI5 Test Starter concept. Use this skill when: The linter reports prefer-test-starter for .qunit.html or .qunit.js files Test HTML files use manual sap-ui-core.js bootstrapping instead of Test Starter's runTest.js/createSuite.js Test JS files use…

UI5/plugins-coding-agents · 244 tokens

javascript-development

JavaScript/TypeScript ES2024+, async/await, DOM manipulation, Node.js, and API integration. Use when writing vanilla JS/TS code, working with REST/fetch APIs, implementing frontend logic, or configuring JS build tools.

PracticalSwan/agent-skills · 52 tokens