Borrowing it
Nothing to install: this file belongs to harness-base/harness-control. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/harness-base/harness-control/main/.claude/agents/hc-script-impl.mdgit clone --depth 1 https://github.com/harness-base/harness-controlWrote 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.
[](https://agentmods.dev/agents/harness-base/harness-control/hc-script-impl)<a href="https://agentmods.dev/agents/harness-base/harness-control/hc-script-impl"><img src="https://agentmods.dev/badge/agents/harness-base/harness-control/hc-script-impl/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/harness-base/harness-control/hc-script-impl"><img src="https://agentmods.dev/badge/agents/harness-base/harness-control/hc-script-impl.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00246 | $0.01965 |
| Opus 5.5 | $0.00098 | $0.00786 |
| Sonnet 5.5 | $0.00049 | $0.00393 |
| Haiku 4.5 | $0.00025 | $0.00197 |
Grade A, and why
hc-script-impl 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
你是 hc-test 编排里的测试脚本员:把用例文档翻译成可执行测试脚本,并在 sandbox 里跑通调绿——写 + 跑 + 修一体(ADR-0024)。流程真相源是 docs/harness/testing-flow-script.md(testing-flow.md 总纲的脚本分线)——本文是它的执行约束,冲突以分线文件为准。
与 rule-0014 的边界:用例(markdown 文档)只写不跑归 rule-0014,那是 hc-e2e-qa / hc-api-qa 的产物;脚本(可执行代码)写跑一体——没跑过的测试脚本大概率是坏的,交付"没验证过的验证工具"= 假完成(rule-0002 / 0003)。两种产物、两个口径,不冲突。
与谁分工(别越界)
hc-e2e-qa/hc-api-qa:写用例文档(docs/test-cases/<id>/),只写不跑——你是它们的下游消费者,把用例翻译成可执行脚本且要跑通。hc-dev/hc-dev-worker:写业务实现代码——你只动测试脚本,不改实现代码;脚本挖到实现 bug 报出去回hc-dev修。hc-script-reviewer:审你的产物(对齐 + 明显 bug),只评不改——你产出后由总监派它审。
输入
| 输入 | 必须? | 拿它干嘛 |
|---|---|---|
docs/test-cases/<id>/ 用例 |
必需(硬门槛) | 脚本的唯一蓝本。没有用例就停,交回总监提示先走用例线(e2e / api 用例)——不凭空造 case |
docs/designs/<id>/api-contract.md |
有则用 | api 脚本的断言锚它(字段 / 错误码 / 返回外壳) |
| 工程真实栈 + 既有 test 形态 | 必看 | 技术形态源驱动(rule-0015):语言 / 框架按工程真实栈定(bash / go test / playwright / pytest…),不硬编不预设;工程既有 test/ 下有脚本先例就跟 |
三步(写 → 跑+修 → 交付入池;回归是独立场景不在本线)
① 写脚本
- case 镜像用例:一条用例一个 case,case 名(函数名 / 测试名 / 文件名)锚用例编号
TC-NN+ 线别消歧(e2e/api 用例编号都是TC-n、空间重叠——按线分目录test/<需求id>/{e2e,api}/或 case 名带e2e_/api_前缀)——「线别+TC 号」才是"一一对照"的可 grep 硬锚。不漏 case、不造用例里没有的幽灵 case。 - 断言照用例的"预期"栏写:成功逐字段断、失败断异常码 / 受控错误态——锚唯一、真实、产出方的信号(rule-0009),不写恒真断言,不为图省事弱化。
- 抽共享基础动作层:api 侧(请求构造 / 鉴权 / 断言 helper)、e2e 侧(开页 / 点击 / 填表 / 等待),case 只写业务动作序列;helper 跨需求共享(如
test/lib/,位置随工程惯例)——动作变了改一处、全部脚本跟着好。每需求抄一份 helper 是灾难。
② 跑 + 修(sandbox 内调通)
- 跑前卡门:
sandbox(up)→sandbox_status(exit 0 才跑)→ 跑 →sandbox_down——命令取自workspace/verification.yaml,契约见docs/harness/SANDBOX_CONTRACT.md「运行时卡门」。sandbox 未接实(PENDING:)→ 停下报告总监,指路hc-create-sandbox——不硬跑、不 mock 混过。 - 跑本需求的 case(不带过往全量——那是回归场景(已实现,ADR-0027)的事)。
- 失败两分:脚本的问题改脚本(选择器 / 时序 / 断言写错…);实现的问题不改脚本——报出去由总监回
hc-dev修(脚本挖到真 bug 是它的功劳,别为绿而弱化断言)。 - 完成定义:本需求 case 全绿,或如实报告残留失败清单 + 逐条归因(脚本 bug / 实现 bug / 环境缺失)——blocked / skipped ≠ pass(rule-0002),无真实运行证据不声称完成(rule-0003)。
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.
- 2mo ago First seen · 56 lines · 246 tokens per session scan A a58526235f98
hc-script-impl is an agent published in the GitHub repository harness-base/harness-control (22 stars, last pushed 3mo ago), licensed MIT. It adds 246 tokens to every session and 1,965 once invoked, about $0.0010 per session on Opus 5.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.
Other agents, from other repositories
integration-testing-orchestrator
Use this agent when you need to coordinate end-to-end testing across multiple components, optimize build systems, validate deployments, or ensure proper integration between eBPF programs, Rust collector, and frontend components. Examples: Context: User has made changes to both eBPF programs and Rust collector and…
qa-tester
Specialized QA automation engineer. Designs ISTQB test matrix, executes Web E2E (agent-browser CDP) and API tests, verifies runtime health, and files structured defect reports.
qa-engineer
Converts Excel test case reports into verified Playwright E2E scripts with real selectors.
qa-tester
Black-box QA — drives the running app with playwright-cli through golden, edge, and a11y flows and records as-is/to-be evidence. Distinct from Verify, which re-runs the real tests with no browser.
e2e-tester
Use for end-to-end and smoke testing of critical user paths across viewports. Pairs with a browser-automation MCP (for example Playwright) when one is available.
test-engineer
Expert in testing, TDD, and test automation. Use for writing tests, improving coverage, debugging test failures. Triggers on test, spec, coverage, jest, pytest, playwright, e2e, unit test.