harness-e2e

harness-e2e is a command for Claude Code from hahaxiang27/FlowHarness. It costs 82 tokens per session (1,745 once invoked), scanned A, original, MIT.

A command for generating and running end-to-end tests, which check a complete user journey through the application from start to finish.

In plain words
What is it for?
Read a feature specification, create Given/When/Then test cases with the Page Object pattern, run them, fix failures, check stability through three reruns, and save key screenshots.
Why use it?
It turns a user story's acceptance conditions into repeatable browser tests and reports failures with supporting screenshots.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Read a feature specification, create Given/When/Then test cases with the Page Object pattern, run them, fix failures, check stability through three reruns, and save key screenshots.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hahaxiang27/flowharness/harness.e2e
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.

Clone the repo
git clone --depth 1 https://github.com/hahaxiang27/FlowHarness

Made for: Claude Code.

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 harness-e2e

README.md
[![agentmods](https://agentmods.dev/badge/commands/hahaxiang27/flowharness/harness.e2e.svg)](https://agentmods.dev/commands/hahaxiang27/flowharness/harness.e2e)
Your own site
<a href="https://agentmods.dev/commands/hahaxiang27/flowharness/harness.e2e"><img src="https://agentmods.dev/badge/commands/hahaxiang27/flowharness/harness.e2e.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 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,745 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.
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.00082 $0.01745
Opus 5 $0.00041 $0.00873
Sonnet 5 $0.00016 $0.00349
Haiku 4.5 $0.00008 $0.00175

Measured 7d ago against content hash 159f1092b002, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

harness-e2e 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 7d 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.

commands/harness.e2e.md · 57 lines

What it actually says

Harness [E2E_TOOL] E2E 测试

**上下文管ç?*: 🔄 清空上下æ–?â€?使用子代理执行,确保干净环境

指令

为当前完成的用户故事编写并运è¡?[E2E_TOOL] E2E 测试ã€?

输入参数

$ARGUMENTS â€?用户故事编号(如 "US1")或 "sprint" 表示当前 Sprint 的所æœ?E2E

执行步骤

使用 Agent 工具启动子代理,传入以下任务ï¼?

你是 Harness E2E 测试执行器ã€?
1. 读取 `specs/[FEATURE_ID]/spec.md`,找åˆ?{US编号} 的全部验收场æ™?2. 读取 `.harness/prompts/evaluator.md` çš?Level 3 模板,了è§?E2E 编写规则
3. 读取 `.harness/prompts/generator.md` çš?E2E 模板,了è§?`[E2E_TOOL]` 测试生成规范

执行ï¼?a. 为每个验收场景的 Given/When/Then 编写一ä¸?test case
b. 使用 Page Object 模式组织页面交互
c. 写入 `[TEST_ROOT]/e2e/{story-name}[TEST_FILE_SUFFIX]`
d. 运行 `[E2E_COMMAND]`
e. 如有失败,修正测试代码后重跑
f. 确认通过后重è·?次验证稳定æ€?g. 关键步骤截图保存åˆ?`[E2E_SCREENSHOT_DIR]`

报告ï¼?- 测试用例总数、通过数、失败数
- 失败用例的详情和截图路径
- 稳定性结果(3次重跑是否全部通过ï¼?- 更新 sprint-*-progress.md 中的 E2E 验证状æ€?```

### 注意
- E2E 测试需要相关应用、用户界面和依赖服务都在运行
- 如果应用或用户界面未启动,先提示用户执行 `[APP_START_COMMAND]` / `[UI_START_COMMAND]`
- 首次运行可能需要安装或初始åŒ?`[E2E_TOOL]` 的运行时资源

## SDD Step Gate

When specs/{REQUIREMENT_ID}/dashboard-state.json exists (SDD workflow active), after this command completes follow .harness/prompts/command-step-gate.md:

1. Update dashboard-state.json and dashboard.html when applicable.
2. Mark this command done, next step next, workflow_plan.phase = awaiting_user.
3. **Stop immediately** - do not chain the next internal command in the same turn.
4. Hand off with .harness/prompts/step-gate-handoff.md.

Skip only for standalone invocation without dashboard state, or when the user explicitly asks to batch remaining steps.
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. 7d ago First seen · 57 lines · 0 tokens per session scan A 159f1092b002

Subscribe to this mod's changes

harness-e2e is a command published in the GitHub repository hahaxiang27/FlowHarness (4 stars, last pushed 2mo ago), licensed MIT. It adds 82 tokens to every session and 1,745 once invoked, about $0.0004 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-31.