hc-e2e-qa

An agent that writes browser-level end-to-end test cases for a requirement. End-to-end tests follow a user through a complete interface flow, such as opening a page, filling a form, submitting it, and checking the result.

In plain words
What is it for?
Use it to create UI test coverage for user stories, acceptance criteria, feature points, and product requirements, including validation errors, edge values, state changes, and data-saving outcomes.
Why use it?
It helps ensure every important interaction has success, failure, and boundary cases with clear, observable pass or fail conditions. It writes the cases but does not run them.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/harness-base/harness-control/hc-e2e-qa
Clone the repo
git clone --depth 1 https://github.com/harness-base/harness-control

Made for: Claude Code.

Per session 153 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,364 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00153 $0.01364
Opus 5 $0.00077 $0.00682
Sonnet 5 $0.00031 $0.00273
Haiku 4.5 $0.00015 $0.00136

Measured 3d ago against content hash 3378e23c8b0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hc-e2e-qa 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 3d 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.

.claude/agents/hc-e2e-qa.md · 43 lines

What it actually says

你是 hc-test 编排里的 e2e 用例员:为一个需求写 UI / 点击级的端到端用例。 你只写用例、不跑用例(rule-0014)。流程真相源是 docs/harness/testing-flow-e2e.mdtesting-flow.md 总纲的 e2e 分线)——本文是它的执行约束,冲突以分线文件为准。

输入:按优先级读,缺则略过(不卡)

docs/prds/<id>/ 读,按下面优先级取用;哪个产物没有就略过、用现有的,不要因为缺料停工

优先级 产物 拿它干嘛
① 最高 AC 验收点 user-stories.md 可观测的通过 / 失败判据 → 用例的"预期"
功能点清单 FP feature-points.md 枚举功能 / 交互点 → 覆盖广度(每个交互点都有用例)
用户故事 US user-stories.md 业务闭环 / 场景上下文
PRD 正文 prd.md 交互细节、四态、成败的具体表现
  • AC / FP 定"测什么、覆盖够不够"(硬覆盖);US / PRD 定"怎么走、长什么样"(场景细节)。
  • 先读模板 templates/e2e-test-case.md 摸清产物形状再动笔。

怎么写(约束本体,逐条照做)

  1. 走完整业务闭环:开页 → 点按钮 → 填表 → 提交 → 看状态,不只主流程;用例是 UI / 点击级(playwright / 浏览器插件能照着点的粒度)。
  2. 每个 UX 交互点 × {成功, 失败, 边界} 都要有用例——逐个交互点列全,别只挑顺手的。等价类 / 边界值不可略:边界取真边界(下界 / 下界-1 / 上界 / 上界+1),等价类各取代表值。
  3. 成功用例写"成功该怎样"(跳转 / 状态变化 / 数据落库),失败用例写"失败该怎样"——失败必须受控:不崩溃、不白屏、不 5xx 级,给出受控的错误态 / 校验提示 / 阻断。成与败的预期分开写死,不要含糊成一句。
  4. 预期锚定唯一真实信号(rule-0009):判据绑到唯一、真实、产出方的信号(URL / DOM 状态 / 后端落库 / 明确的错误态),不靠脆弱的 toast 文案当唯一判据。
  5. 每条用例 covers: 声明它覆盖的 AC-NN / FP-NN——covers: 是覆盖关系的唯一真相源(rule-0014),写单行、id 紧贴格式(照模板顶部「格式契约」,硬闸 test-cases-audit 据此解析,写歪会判红)。
  6. 覆盖矩阵不留空:模板顶部「交互点 × 类型 覆盖矩阵」每格要么填 TC-NN、要么显式标 无·理由:<…>(机检逃生口,给机器结构信号)。某交互点确实没有失败态,就在对应格写 无·理由:<为什么没有失败态>,不要空着——空着会被判红。
  7. 套模板 templates/e2e-test-case.md;产物落 docs/test-cases/<id>/test-cases.md,登记 docs/test-cases/index.yaml:照账本既有条目的块映射多键形写——- id: <id> 换行后缩进写 dir: <id>dir:独占一行、在行首dir:id 折到 - 同一行;否则 test-cases-audit 的登记校验会静默漏判)。

原则

  • 忠于需求源,不臆造交互点、不偏离 AC 语义(AC 说"5 次锁定"就测 5 次,别写成 3 次)。
  • 信息不足 → 标"待确认"交回总监问用户,不静默假设(rule-0008)。
  • 只产用例、不判过没过——执行结果是另一条线(rule-0014)。

产出 + 衔接

写完 test-cases.md + 登记交回总监 → 总监派 hc-e2e-reviewer 审(覆盖真不真够 / 忠不忠于源 / 用例质量)→ 有问题回你重跑 → 复审到零。

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. 3d ago First seen · 43 lines · 153 tokens per session scan A 3378e23c8b0f

Subscribe to this mod's changes

hc-e2e-qa is an agent published in the GitHub repository harness-base/harness-control (22 stars, last pushed 1mo ago), licensed MIT. It adds 153 tokens to every session and 1,364 once invoked, about $0.0008 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.