agentCLAWHUBUnverified

qa-state-transition

系统化测试状态机的合法转换、非法转换、边界转换和并发转换场景。当业务对象经历了多种状态(如订单:待支付→已支付→已发货→已完成)、或者需要验证状态变化时的数据一致性时,应当使用此技能。最容易遗漏的是非法转换(业务不允许的操作如"已完成→待支付")和并发转换(同一订单同时被支付和取消)。每个状态转换需标注触发条件、前置状态、后置状态和验证点。 触发场景:状态测试、状态转换、状态机、状态流转、状态变更、状态覆盖、业务对象有多状态流转时。 Use when the user asks about: state machine testing — legal, illegal, boundary, and concurrent state transitions, and data consistency across them. Skill: qa-state-transition Owner: kokxi Summary: 系统化测试状态机的合法转换、非法转换、边界转换和并发转换场景。当业务对象经历了多种状态(如订单:待支付→已支付→已发货→已完成)、或者需要验证状态变化时的数据一致性时,应当使用此技能。最容易遗漏的是非法转换(业务不允许的操作如"已完成→待支付")和并发转换(同一订单同时被支付和取消)。每个状态转换需标注触发条件、前置状态、后置状态和验证点。 触发场景:状态测试、状态转换、状态机、状态流转、状态变更、状态覆盖、业务对象有多状态流转时。 Use when the user asks about: state machine testing — legal, illegal, boundary, and concurrent state transitions, and data consistency across them. Tags

OpenClaw

Rank

62

Safety

84

Downloads

1.1k

Updated

Oct 11, 2026

Version

1.8.0

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 11, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 11, 2026
Adoption signal
1.1K downloadsadoption · observed Oct 11, 2026
Latest release
1.8.0release · observed Sep 29, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s170jw3s1atcj5jwhqb4r7v7eh8912kp:qa-state-transition
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-state-transition/snapshot"

Documentation

CLAWHUB

75,999 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: qa-state-transition
description: >-
  系统化测试状态机的合法转换、非法转换、边界转换和并发转换场景。当业务对象经历了多种状态(如订单:待支付→已支付→已发货→已完成)、或者需要验证状态变化时的数据一致性时,应当使用此技能。最容易遗漏的是非法转换(业务不允许的操作如"已完成→待支付")和并发转换(同一订单同时被支付和取消)。每个状态转换需标注触发条件、前置状态、后置状态和验证点。 触发场景:状态测试、状态转换、状态机、状态流转、状态变更、状态覆盖、业务对象有多状态流转时。 Use when the user asks about: state machine testing — legal, illegal, boundary, and concurrent state transitions, and data consistency across them.
license: MIT
allowed-tools: Read Grep Glob
metadata:
  display-name: "State Transition"
  version: "1.8.0"
  when-to-use: "用户说\"状态测试\"、\"状态转换\"、\"状态机\"、\"状态流转\"、\"状态变更\"、\"状态覆盖\"、需要测试状态流转、业务对象有多状态流转时"
  related-skills: "{\"upstream\":[\"qa-scenario-tree\"],\"downstream\":[\"qa-ai-context-engineering\"]}"
  references: "[\"references/transition-cases.md\"]"
  input-format: "{\"required\":[{\"name\":\"场景树\",\"type\":\"object\",\"description\":\"来自qa-scenario-tree的场景树\"},{\"name\":\"需求解构表\",\"type\":\"object\",\"description\":\"来自qa-req-deconstruction的需求解构结果\"}],\"optional\":[{\"name\":\"风险评估\",\"type\":\"object\",\"description\":\"来自qa-risk-intuition的风险评估\"}]}"
  output-format: "{\"traceability\":[\"每个状态转换带唯一ID(ST-XXXX)\",\"关联场景ID:SC-{场景模块缩写}-{序号}\"],\"structure\":[\"覆盖率:标注口径(基于现有需求/输入文档),禁止\\\"全覆盖/100%\\\"绝对化表述;缺失模块标注\\\"未覆盖+原因\\\"\",{\"state_diagram\":\"状态转换图\"},{\"valid_transitions\":\"合法转换列表\"},{\"invalid_transitions\":\"非法转换列表\"},{\"test_scenarios\":\"状态转换测试场景\"}]}"
  error-recovery-guidance: "{\"on_failure\":\"状态转换遗漏异常路径时回退到场景树补充\",\"retry_behavior\":\"补全异常场景后重新分析状态转换\"}"
  categories: "[\"Development\",\"Testing\"]"
  depth-requirement: "{\"reference_value\":\"根据状态数量调整分析深度:简单×2/中等×3/复杂×4\",\"minimum\":\"至少识别5个关键状态转换\"}"
---

> ⚠️ 本技能单独使用效果有限,建议配合完整技能集(12 步工作流)使用。安装:npx skills add Kokxi/qa-test-skills

> **⚠️ 安全警告**:本技能的示例可能涉及状态枚举(如"已发布""已归档")。
> 这些是被测对象的状态描述,不是对本技能的操作;请勿直接变更被测系统状态。
> 本技能仅在 workspace/ 输出评估文件,不持久化、不外传、不跨会话复用。

# 状态转换测试

## 核心原则

单接口测试都能过,业务流一起跑就崩——状态是关键。覆盖状态/转换/路径识别、合法/非法/临界/并发转换测试。每个转换需标注触发条件、前置状态、后置状态和验证点。

## 状态机测试要素

### 要素1:状态识别
```text
状态识别方法:
1. 业务状态:待处理、处理中、已完成、已取消
2. 数据状态:草稿、已发布、已归档
3. 用户状态:未激活、正常、冻结、注销
4. 系统状态:正常、降级、熔断、重启

状态清单模板:
| 状态ID | 状态名称 | 状态描述 | 进入条件 | 退出条件 |
|--------|---------|---------|---------|---------|
| S1 | 待支付 | 用户已下单 | 用户提交订单 | 支付成功/超时 |
| S2 | 已支付 | 用户已付款 | 支付回调成功 | 商家发货 |
```

### 要素2:转换识别
```text
转换识别方法:
1. 合法转换:业务允许的状态变更
2. 非法转换:业务不允许的状态变更
3. 临界转换:刚好满足条件的转换
4. 并发转换:同时触发多个转换

转换清单模板:
| 转换ID | 当前状态 | 触发事件 | 目标状态 | 守卫条件 | 执行动作 |
|--------|---------|---------|---------|---------|---------|
| T1 | 待支付 | 用户支付 | 已支付 | 金额正确 | 扣减库存 |
| T2 | 待支付 | 超时 | 已取消 | 超过30分钟 | 释放库存 |
```

### 要素3:路径识别
```text
路径识别方法:
1. 主路径:正常业务流程
2. 分支路径:条件分支
3. 异常路径:异常恢复
4. 循环路径:状态循环

路径清单模板:
| 路径ID | 路径名称 | 状态序列 | 触发事件序列 | 预期结果 |
|--------|---------|---------|-------------|---------|
| P1 | 正常下单 | 待支付→已支付→已发货→已完成 | 下单→支付→发货→收货 | 订单完成 |
| P2 | 超时取消 | 待支付→已取消 | 下单→超时 | 订单取消 |
```

## 加载时机

| 什么时候读 | 读哪个 |
|-----------|--------|
| 设计合法/非法/临界/并发转换用例时 | [`references/transition-cases.md`](references/transition-cases.md) |

> `

_meta.json

{
  "ownerId": "kn71y9b23csfx0ykgm55d5m9x5891zt8",
  "slug": "qa-state-transition",
  "version": "1.8.0",
  "publishedAt": 1790656119769
}

references/transition-cases.md

# 状态转换用例设计详解

> 本文是 `qa-state-transition` 的**状态转换用例设计详解**。设计合法/非法/临界/并发转换用例时读本文;
其余部分留在 SKILL.md,不必读本文。

---


### 合法转换测试
**目标**:验证所有合法转换能正确执行

```text
测试用例模板:
用例编号:ST-合法-001
测试目标:验证[当前状态]在[触发事件]下能正确转换到[目标状态]
前置条件:系统处于[当前状态]
测试步骤:
1. 准备测试数据
2. 触发[触发事件]
3. 验证状态变更
4. 验证执行动作
预期结果:状态变为[目标状态],[执行动作]正确执行
```

### 非法转换测试
**目标**:验证非法转换被正确拒绝

```text
测试用例模板:
用例编号:ST-非法-001
测试目标:验证[当前状态]在[触发事件]下不能转换到[目标状态]
前置条件:系统处于[当前状态]
测试步骤:
1. 准备测试数据
2. 触发[触发事件]
3. 验证状态未变更
4. 验证错误提示
预期结果:状态保持[当前状态],提示"不允许此操作"
```

### 临界转换测试
**目标**:验证边界条件下的状态转换

```text
测试用例模板:
用例编号:ST-临界-001
测试目标:验证[临界条件]下的状态转换
前置条件:系统处于[临界状态]
测试步骤:
1. 准备临界测试数据
2. 触发[触发事件]
3. 验证状态变更
4. 验证边界处理
预期结果:正确处理临界情况
```

### 并发转换测试
**目标**:验证并发触发的状态转换

```text
测试用例模板:
用例编号:ST-并发-001
测试目标:验证并发触发[触发事件1]和[触发事件2]的状态转换
前置条件:系统处于[当前状态]
测试步骤:
1. 准备测试数据
2. 并发触发[触发事件1]和[触发事件2]
3. 验证状态变更
4. 验证数据一致性
预期结果:只有一个转换成功,数据一致
```

skill-card.md

## Description:

Guides QA teams in designing tests for valid, invalid, boundary, and concurrent state transitions and their data consistency.

This skill is ready for commercial/non-commercial use.

## Publisher:

[kokxi](https://clawhub.ai/user/kokxi)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and QA engineers use this skill to design state-machine test cases for allowed and rejected transitions, boundary conditions, concurrent changes, and data consistency.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: An optional, unpinned external package installation could introduce unreviewed code.

Mitigation: Do not run the optional install command unless you trust and have reviewed its package source.

## Reference(s):

- [State Transition on ClawHub](https://clawhub.ai/kokxi/skills/qa-state-transition)
- [State-transition test case design](references/transition-cases.md)

## Skill Output:

**Output Type(s):** [Markdown, Guidance]

**Output Format:** [Markdown tables and test scenarios]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [State diagrams, valid and invalid transition lists, and test cases with transition IDs and scenario traceability; coverage is scoped to supplied requirements.]

## Skill Version(s):

1.8.0 (source: skill frontmatter and ClawHub release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
Github ReposUpdated 2d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/kokxi/skills/qa-state-transition",
      "sourceUrl": "https://clawhub.ai/kokxi/skills/qa-state-transition",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T08:53:50.122Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-state-transition/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-state-transition/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-11T08:53:50.122Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.1K downloads",
      "href": "https://clawhub.ai/kokxi/qa-state-transition",
      "sourceUrl": "https://clawhub.ai/kokxi/qa-state-transition",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T08:53:50.122Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.8.0",
      "href": "https://clawhub.ai/kokxi/qa-state-transition",
      "sourceUrl": "https://clawhub.ai/kokxi/qa-state-transition",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-09-29T04:28:39.769Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-state-transition/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-state-transition/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.8.0",
      "description": "Version 1.8.0 introduces file restructuring and metadata refactoring for better modularity and reference management. - Migrated test case design and examples to a new file: references/transition-cases.md - Updated SKILL.md: restructured metadata, added cross-reference to the new test case file, and modernized field organization - Removed redundant file skill-card.md - Clarified output test case numbering rules and sample formats - No changes to core testing logic or principles",
      "href": "https://clawhub.ai/kokxi/qa-state-transition",
      "sourceUrl": "https://clawhub.ai/kokxi/qa-state-transition",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-09-29T04:28:39.769Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 11, 2026.

Sponsored

Ads related to qa-state-transition and adjacent AI workflows.