agentCLAWHUBUnverified

qa-ai-prompt-strategy

根据不同的测试目标和上下文,选择最佳的提示词模式来驱动AI生成高质量的测试用例。当AI输出的测试用例质量不够好、太泛泛、或者深度不够时,问题往往不在AI而在提示词。此技能提供结构化提示词模板,注入前面步骤产出的分析结果,输出包含角色定义、输出格式规范和约束条件的优化提示词。⚠️ 作为工作流的必过步骤,不得跳过。 触发场景:怎么问AI、AI回答不好、换个方式问、提示词、提问模板、提示词优化、角色扮演、AI输出太浅需要更深时。 Use when the user asks about: choosing or optimizing the prompt that drives test case generation — role definition, output format constraints, and injection of prior analysis results. Skill: qa-ai-prompt-strategy Owner: kokxi Summary: 根据不同的测试目标和上下文,选择最佳的提示词模式来驱动AI生成高质量的测试用例。当AI输出的测试用例质量不够好、太泛泛、或者深度不够时,问题往往不在AI而在提示词。此技能提供结构化提示词模板,注入前面步骤产出的分析结果,输出包含角色定义、输出格式规范和约束条件的优化提示词。⚠️ 作为工作流的必过步骤,不得跳过。 触发场景:怎么问AI、AI回答不好、换个方式问、提示词、提问模板、提示词优化、角色扮演、AI输出太浅需要更深时。 Use when the user asks about: choosing or optimizing the prompt that drives test case generation — role definition, output format constraints, and injectio

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-ai-prompt-strategy
  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-ai-prompt-strategy/snapshot"

Documentation

CLAWHUB

71,853 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: qa-ai-prompt-strategy
description: >-
  根据不同的测试目标和上下文,选择最佳的提示词模式来驱动AI生成高质量的测试用例。当AI输出的测试用例质量不够好、太泛泛、或者深度不够时,问题往往不在AI而在提示词。此技能提供结构化提示词模板,注入前面步骤产出的分析结果,输出包含角色定义、输出格式规范和约束条件的优化提示词。⚠️ 作为工作流的必过步骤,不得跳过。 触发场景:怎么问AI、AI回答不好、换个方式问、提示词、提问模板、提示词优化、角色扮演、AI输出太浅需要更深时。 Use when the user asks about: choosing or optimizing the prompt that drives test case generation — role definition, output format constraints, and injection of prior analysis results.
license: MIT
allowed-tools: Read Grep Glob
metadata:
  display-name: "Ai Prompt Strategy"
  version: "1.8.0"
  when-to-use: "用户说\"怎么问AI\"、\"AI回答不好\"、\"换个方式问\"、\"提示词\"、\"提问模板\"、\"提示词优化\"、\"角色扮演\"、需要不同测试视角、AI输出太浅需要更深时"
  related-skills: "{\"upstream\":[\"qa-ai-context-engineering\"],\"downstream\":[\"qa-ai-output-critique\"]}"
  references: "[\"references/prompt-patterns.md\"]"
  input-format: "{\"required\":[{\"name\":\"AI上下文包\",\"type\":\"object\",\"description\":\"来自qa-ai-context-engineering的上下文包\"}],\"optional\":[{\"name\":\"输出格式要求\",\"type\":\"string\",\"description\":\"期望的输出格式和规范\"},{\"name\":\"约束条件\",\"type\":\"string\",\"description\":\"提示词的约束和限制\"}]}"
  output-format: "{\"traceability\":[\"本技能生成提示词,不产出唯一ID\"],\"structure\":[\"覆盖率:标注口径(基于现有需求/输入文档),禁止\\\"全覆盖/100%\\\"绝对化表述;缺失模块标注\\\"未覆盖+原因\\\"\",{\"optimized_prompt\":\"优化后的提示词\"},{\"role_definition\":\"角色定义\"},{\"output_format_spec\":\"输出格式规范\"},{\"constraint_list\":\"约束条件列表\"}]}"
  error-recovery-guidance: "{\"on_failure\":\"提示词输出质量不达标时回退到上下文工程步骤\",\"retry_behavior\":\"补充上下文要素后重新优化提示词\"}"
  categories: "[\"Development\",\"Testing\",\"AI\"]"
  depth-requirement: "{\"reference_value\":\"根据场景复杂度和输出要求调整策略深度:简单x1/中等x2/复杂x3\",\"minimum\":\"至少包含角色定义、输出格式、约束条件3个核心要素\"}"
---
> ⚠️ 本技能单独使用效果有限,建议配合完整技能集(12 步工作流)使用。安装:npx skills add Kokxi/qa-test-skills

# AI 提示词策略

## 核心原则

不同的测试目标,需要不同的提问模式。

## 提示词优化要求

**关键指标**:提示词必须包含以下要素

```text
1. 角色定义:你是[领域]资深测试专家
2. 输出数量:生成[N]条测试用例(N = 需求数量 × 5)
3. 覆盖维度:必须覆盖以下维度
   - 功能测试:[具体功能点]
   - 异常测试:[异常场景类型]
   - 边界测试:[边界条件类型]
   - 并发测试:[并发场景]
   - 安全测试:[安全风险点]
   - 性能测试:[性能指标]
4. 输出格式:Markdown表格,包含需求ID和风险ID
5. 质量要求:每条用例必须可执行、可验证
```

## 加载时机

| 什么时候读 | 读哪个 |
|-----------|--------|
| 选定提示词模式后,取对应模板 | [`references/prompt-patterns.md`](references/prompt-patterns.md) |

> `六大提示词模式`的完整内容已下沉至 `references/prompt-patterns.md`,避免每次触发都占用上下文。

## 模式选择指南

| 测试目标 | 推荐模式 | 优势 | 局限 | 复杂度 |
|---------|---------|------|------|-------|
| 快速生成用例 | 结构化输出 | 标准化、高效、易对比 | 深度不足、缺乏个性 | ★★ |
| 深入理解用户 | 角色扮演 | 贴近真实场景、发现UX问题 | 依赖角色设定准确性 | ★★★ |
| 复杂功能分析 | 分步引导 | 系统化、不遗漏深度 | 耗时长、需要迭代 | ★★★★ |
| 质量评审 | 反向质疑 | 查漏补缺、打破盲区 | 需要已有输出为基础 | ★★★ |
| 全面覆盖 | 多视角 | 多维度、无死角 | 输出量大、需筛选 | ★★★★ |
| 挑战假设 | 对抗 | 逼出深层思考、验证假设 | 需要专业对抗经验 | ★★★★★ |

## 模式组合策略

多个模式串联使用效果更佳:

| 组合 | 流程 | 适用场景 |
|------|------|---------|
| 结构化输出 → 反向质疑 | 先生成 → 再查漏 | 日常快速迭代 |
| 分步引导 → 多视角 | 深度分析 → 多维度覆盖 | 复杂功能完整测试 |
| 角色扮演 → 对抗 | 模拟用户 → 挑战假设 | 用户体验全面验证 |
| 结构化输出 → 反向质疑 → 对抗 | 生成 → 评审 → 深度挑战 | 高安全/高风险场景 |

## 输出示例

用户说:"帮我生成登录模块的测试用例"

**普通问法**(效果差):
> 帮我生成登录模块的测试用例

**优化问法**(使用结构化输出模式):
> >
> 请按以下框架

_meta.json

{
  "ownerId": "kn71y9b23csfx0ykgm55d5m9x5891zt8",
  "slug": "qa-ai-prompt-strategy",
  "version": "1.8.0",
  "publishedAt": 1790655913897
}

references/prompt-patterns.md

# 六大提示词模式模板

> 本文是 `qa-ai-prompt-strategy` 的**六种提示词模式模板**。选定模式后取对应模板填写;
只需要选模式的判断依据时不必读。

---


### 模式1:结构化输出模式
**适用场景**:需要标准化、可对比的测试用例

```text

请按以下框架输出测试用例:
1. 用例编号:TC_{模块缩写}_{功能缩写}_{序号}(如 TC_API_LOGIN_001)
2. 用例标题:[动作] + [对象] + [条件]
3. 前置条件:[测试前需要满足的条件]
4. 测试步骤:[1. 2. 3. ...]
5. 预期结果:[具体可验证的预期]
6. 优先级:P0/P1/P2/P3
7. 风险等级:高/中/低

输出格式:Markdown表格

测试范围:[功能描述]
测试深度:覆盖正常/异常/边界/安全
```

### 模式2:角色扮演模式
**适用场景**:需要从特定视角深入测试

```text
你现在是一位[角色],正在使用[功能]。

你的背景:
- 使用频率:[每天/每周/偶尔]
- 技术水平:[新手/普通/专家]
- 核心诉求:[你最关心什么]
- 常见操作:[你通常怎么用]

请从这个角色的视角,列出:
1. 你会怎么用这个功能?
2. 你会遇到什么问题?
3. 什么会让你不满意?
4. 你会怎么误用这个功能?
```

### 模式3:分步引导模式
**适用场景**:复杂功能需要深度分析

```text
请按以下步骤分析这个功能:

第1步:需求解构
- 列出所有显性需求
- 挖掘隐含假设
- 识别潜在矛盾

第2步:场景构建
- 主路径场景
- 分支路径场景
- 异常恢复场景

第3步:深度设计
- 边界条件分析
- 组合测试策略
- 状态转换覆盖

第4步:风险评估
- 高风险区域
- 建议测试深度

功能描述:[具体描述]
```

### 模式4:反向质疑模式
**适用场景**:AI输出后需要查漏补缺

```text
以上是你生成的测试用例。现在请:

1. 假设挖掘
- 你在输出中做了哪些假设?
- 这些假设合理吗?
- 如果假设不成立会怎样?

2. 盲区检查
- 哪些场景你可能遗漏了?
- 哪些边界你没有覆盖?
- 并发、时序、资源竞争考虑了吗?

3. 改进建议
- 最需要补充的3个场景是什么?
- 从哪个方向迭代最有效?
```

### 模式5:多视角模式
**适用场景**:需要全面覆盖不同角度

```text
请从以下三个视角分别分析这个功能:

【用户视角】
- 核心诉求:
- 操作路径:
- 痛点预测:

【开发视角】
- 技术实现风险:
- 边界条件:
- 异常处理:

【运维视角】
- 监控需求:
- 故障场景:
- 恢复方案:

功能描述:[具体描述]
```

### 模式6:对抗模式
**适用场景**:挑战AI的输出,逼出深层思考

```text
我对你的输出有以下质疑:

1. [具体质疑点1]:你考虑过[特定场景]吗?
2. [具体质疑点2]:如果[极端情况]发生会怎样?
3. [具体质疑点3]:这个假设[具体假设]成立吗?

请针对每个质疑:
- 承认或反驳
- 补充你的分析
- 如果确实遗漏,补充测试场景
```

skill-card.md

## Description:

Selects and adapts Chinese-language prompt patterns to help QA teams ask AI for more structured and useful test cases.

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

## Publisher:

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

### License/Terms of Use:

MIT-0

## Use Case:

QA engineers and developers use this skill to choose and refine prompts for AI-assisted test-case design, including roles, output formats, constraints, and coverage dimensions.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Broad activation phrases may trigger this skill for general prompt requests.

Mitigation: Use it only when developing QA test prompts.

Risk: The optional skill-set installation suggestion is unpinned.

Mitigation: Review its source and prefer a pinned revision before running the installation command.

## Reference(s):

- [Prompt pattern templates](references/prompt-patterns.md)
- [ClawHub skill listing](https://clawhub.ai/kokxi/skills/qa-ai-prompt-strategy)

## Skill Output:

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

**Output Format:** [Structured prompts, often in Markdown]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Provides role definitions, output requirements, constraints, and coverage expectations; produces prompts rather than test cases or unique IDs.]

## Skill Version(s):

1.8.0 (source: skill frontmatter and release metadata)

## 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-ai-prompt-strategy",
      "sourceUrl": "https://clawhub.ai/kokxi/skills/qa-ai-prompt-strategy",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T07:15:28.443Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-ai-prompt-strategy/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-ai-prompt-strategy/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-11T07:15:28.443Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.1K downloads",
      "href": "https://clawhub.ai/kokxi/qa-ai-prompt-strategy",
      "sourceUrl": "https://clawhub.ai/kokxi/qa-ai-prompt-strategy",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T07:15:28.443Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.8.0",
      "href": "https://clawhub.ai/kokxi/qa-ai-prompt-strategy",
      "sourceUrl": "https://clawhub.ai/kokxi/qa-ai-prompt-strategy",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-09-29T04:25:13.897Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-ai-prompt-strategy/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-kokxi-qa-ai-prompt-strategy/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.8.0",
      "description": "**Changelog for version 1.8.0:** - Extracted the full prompt pattern templates (“六大提示词模式”) into a new file (`references/prompt-patterns.md`) to reduce context usage during each trigger. - SKILL.md updated: now references the external prompt pattern file and clarifies when this resource is loaded. - Skill metadata and structure refactored for better clarity, and now includes all behavioral cues and parameters in a machine-readable format. - Removed obsolete `skill-card.md` file. - Improved documentation for loading timing and usage guidance, without changing existing workflow logic.",
      "href": "https://clawhub.ai/kokxi/qa-ai-prompt-strategy",
      "sourceUrl": "https://clawhub.ai/kokxi/qa-ai-prompt-strategy",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-09-29T04:25:13.897Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 11, 2026.

Sponsored

Ads related to qa-ai-prompt-strategy and adjacent AI workflows.