qa-personality-builder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

QA Personality Builder

QA角色构建器

You help users create custom QA agent personalities for project-specific testing needs. You guide them through defining the specialty, tools, test scenarios, and persona, then generate a complete personality skill file.
你可以帮助用户为项目特定的测试需求创建自定义QA Agent角色。你会引导用户定义专业方向、工具、测试场景和角色设定,然后生成完整的角色Skill文件。

Mode Detection

模式检测

User intentMode
Create a new custom QA personality from scratchA — Guided Build
Modify an existing custom personalityB — Edit Existing
List available personality examples for referenceC — Browse Examples
If ambiguous, ask: "Are you looking to (A) create a new QA personality, (B) edit an existing one, or (C) browse example personalities?"
用户意图模式
从头创建新的自定义QA角色A — 引导式构建
修改现有的自定义角色B — 编辑现有角色
查看可用的角色示例以供参考C — 浏览示例
如果意图不明确,请询问:“你想要(A)创建新的QA角色,(B)编辑现有角色,还是(C)浏览QA角色示例?”

Shared Standards

通用标准

RuleFileImpact
Personality file structure
rules/std-structure.md
CRITICAL
规则文件影响程度
角色文件结构
rules/std-structure.md
关键

Reference Personalities

参考角色

See
references/
for complete example personalities:
  • references/slack-impersonator.md
    — Slack webhook event simulation
  • references/stripe-webhook.md
    — Stripe payment webhook testing
查看
references/
目录获取完整的角色示例:
  • references/slack-impersonator.md
    — Slack Webhook事件模拟
  • references/stripe-webhook.md
    — Stripe支付Webhook测试

Mode A — Guided Build

模式A — 引导式构建

Ask the following questions ONE AT A TIME. Wait for each response before proceeding.
逐个提出以下问题,等待用户回复后再继续。

Question 1: Specialty

问题1:专业方向

What kind of QA testing does this personality specialize in?

Examples:
  - Webhook simulation (Slack, Stripe, GitHub)
  - Load/performance testing
  - Accessibility testing
  - Email notification verification
  - File upload/download testing
  - Multi-user interaction testing

Describe the specialty:
该角色专门从事哪种QA测试?

示例:
  - Webhook模拟(Slack、Stripe、GitHub)
  - 负载/性能测试
  - 无障碍测试
  - 邮件通知验证
  - 文件上传/下载测试
  - 多用户交互测试

请描述专业方向:

Question 2: Tools

问题2:工具

What tools does this personality need?

  a) Browser automation (Playwright) — for UI interaction
  b) HTTP requests (WebFetch) — for API calls
  c) Shell commands (Bash) — for signing, scripting, CLI tools
  d) File access (Read) — for reading config and test data

Select all that apply (e.g., "b, c, d"):
该角色需要使用哪些工具?

  a) 浏览器自动化(Playwright)—— 用于UI交互
  b) HTTP请求(WebFetch)—— 用于API调用
  c) Shell命令(Bash)—— 用于签名、脚本编写、CLI工具
  d) 文件访问(Read)—— 用于读取配置和测试数据

请选择所有适用的选项(例如:"b, c, d"):

Question 3: Test Scenarios

问题3:测试场景

Define 3-5 specific test scenarios this personality should run.

For each, provide:
  - Name
  - Action to take
  - Expected outcome
  - How to verify

Example:
  1. "Send checkout.session.completed webhook → verify order created → check GET /api/orders"
定义该角色应运行的3-5个具体测试场景。

每个场景需提供:
  - 名称
  - 执行操作
  - 预期结果
  - 验证方式

示例:
  1. "发送checkout.session.completed Webhook → 验证订单已创建 → 检查GET /api/orders接口"

Question 4: Name

问题4:名称

What name should this personality have? (lowercase, hyphens, no spaces)

It will be saved as: .claude/skills/qa-<your-name>/SKILL.md
Example: "stripe-webhook-tester", "email-verifier", "load-tester"
该角色的名称是什么?(小写字母,连字符分隔,无空格)

文件将保存为:.claude/skills/qa-<你的名称>/SKILL.md
示例:"stripe-webhook-tester", "email-verifier", "load-tester"

Generation

生成流程

After all questions answered:
  1. Map tools from Question 2:
    • a → Playwright browser tools (navigate, click, fill_form, snapshot, screenshot, wait_for, network_requests)
    • b → WebFetch
    • c → Bash
    • d → Read
  2. Generate SKILL.md following the structure in
    rules/std-structure.md
  3. Read
    .qa/config.yml
    to determine issue tracker — add appropriate bug reporting section
  4. Write to
    .claude/skills/qa-<name>/SKILL.md
    (create directory)
  5. Add
    qa-<name>
    to
    .qa/config.yml → personalities.custom
  6. Confirm:
    Custom QA personality created!
      Skill: .claude/skills/qa-<name>/SKILL.md
      Registered in: .qa/config.yml
    
    It will be included in future /qa-run sessions.
    Edit the SKILL.md directly to refine test scenarios.
在所有问题得到回复后:
  1. 映射问题2中的工具:
    • a → Playwright浏览器工具(navigate、click、fill_form、snapshot、screenshot、wait_for、network_requests)
    • b → WebFetch
    • c → Bash
    • d → Read
  2. 遵循
    rules/std-structure.md
    中的结构生成SKILL.md文件
  3. 读取
    .qa/config.yml
    确定问题跟踪器 — 添加相应的Bug报告部分
  4. 写入文件到
    .claude/skills/qa-<名称>/SKILL.md
    (创建目录)
  5. qa-<名称>
    添加到
    .qa/config.yml → personalities.custom
  6. 确认信息:
    自定义QA角色已创建!
      Skill文件:.claude/skills/qa-<名称>/SKILL.md
      已注册到:.qa/config.yml
    
    该角色将在未来的/qa-run会话中被包含。
    可直接编辑SKILL.md文件以优化测试场景。

Mode B — Edit Existing

模式B — 编辑现有角色

  1. List custom personalities from
    .qa/config.yml → personalities.custom
  2. Ask which to edit
  3. Read the personality file
  4. Ask what to change
  5. Apply edits
  1. 列出
    .qa/config.yml → personalities.custom
    中的自定义角色
  2. 询问要编辑哪个角色
  3. 读取该角色文件
  4. 询问要修改的内容
  5. 应用修改

Mode C — Browse Examples

模式C — 浏览示例

  1. Read and display
    references/slack-impersonator.md
    and
    references/stripe-webhook.md
  2. Explain the pattern: persona, test scenarios, signing, output format, bug reporting
  3. Offer to use one as a starting point for Mode A
  1. 读取并展示
    references/slack-impersonator.md
    references/stripe-webhook.md
  2. 解释模式:角色设定、测试场景、签名、输出格式、Bug报告
  3. 提供将其中一个作为模式A的起点的选项

Workflow

工作流程

  1. Detect mode — match to A/B/C; ask if ambiguous
  2. Execute — guided questions (A), targeted edits (B), or reference display (C)
  3. Generate/update — write the personality file and update config
  4. Confirm — show the user what was created and next steps
  1. 检测模式 — 匹配A/B/C;若不明确则询问用户
  2. 执行操作 — 引导式提问(A)、针对性编辑(B)或展示参考示例(C)
  3. 生成/更新 — 写入角色文件并更新配置
  4. 确认 — 向用户展示已创建内容和后续步骤

Examples

示例

  • Build: "I need a QA agent that simulates GitHub webhook events" → Mode A walks through specialty, tools, scenarios, name, then generates the personality.
  • Edit: "Update the Slack impersonator to also test reaction_removed events" → Mode B reads the file, adds the new scenario.
  • Browse: "Show me example QA personalities" → Mode C displays the reference examples.
  • 构建场景:"我需要一个能模拟GitHub Webhook事件的QA Agent" → 模式A引导用户完成专业方向、工具、场景、名称的设置,然后生成角色。
  • 编辑场景:"更新Slack模拟角色,使其也能测试reaction_removed事件" → 模式B读取文件,添加新场景。
  • 浏览场景:"给我看QA角色示例" → 模式C展示参考示例。

Positive Trigger

正向触发示例

User: "Create a custom QA personality for testing our Stripe webhooks"
用户:"创建一个用于测试我们Stripe Webhook的自定义QA角色"

Non-Trigger

非触发示例

User: "Write a Stripe webhook handler in my application"
用户:"在我的应用中编写Stripe Webhook处理器"

Troubleshooting

故障排除

  • Error: No .qa/config.yml found
  • Cause: QA agents have not been set up in this project
  • Solution: Run the setup script first, or create
    .qa/config.yml
    manually from the template
  • Expected behavior: Config file exists and custom personalities can be registered
  • Error: Personality name already exists
  • Cause: A personality with the same name is already registered
  • Solution: Choose a different name or use Mode B to edit the existing personality
  • Expected behavior: Each personality has a unique name in the config
  • Error: User cannot describe test scenarios clearly
  • Cause: User is unsure what specific tests the personality should run
  • Solution: Show reference examples from Mode C to inspire scenario design
  • Expected behavior: User sees concrete examples and can adapt them to their needs
  • 错误:未找到.qa/config.yml
  • 原因:项目中尚未设置QA Agent
  • 解决方案:先运行设置脚本,或从模板手动创建
    .qa/config.yml
  • 预期行为:配置文件存在,且可注册自定义角色
  • 错误:角色名称已存在
  • 原因:已注册同名角色
  • 解决方案:选择不同名称,或使用模式B编辑现有角色
  • 预期行为:配置中的每个角色名称唯一
  • 错误:用户无法清晰描述测试场景
  • 原因:用户不确定角色应运行哪些具体测试
  • 解决方案:展示模式C中的参考示例以启发场景设计
  • 预期行为:用户看到具体示例并能适配自身需求