hc-test

hc-test is a skill for Claude Code, Codex from harness-base/harness-control. It costs 258 tokens per session (3,679 once invoked), scanned A, original, MIT.

A test-production workflow that turns requirements or interface definitions into end-to-end tests, API tests, contract checks, or executable test scripts. It can also run an existing regression set; regression means checking that older behavior still works after changes.

In plain words
What is it for?
Use it to derive test cases from acceptance criteria, user stories, product requirements, or interface contracts; write and run test scripts; compare actual interfaces with their contracts; and run regression tests.
Why use it?
It helps ensure requirements and interfaces are covered, while keeping test creation separate from changing the application itself.

Skill for Claude CodeCodex

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 skills/harness-base/harness-control/hc-test
Any agent
npx skills add harness-base/harness-control --skill hc-test
Clone the repo
git clone --depth 1 https://github.com/harness-base/harness-control

Made for: Claude Code, Codex.

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 hc-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/harness-base/harness-control/hc-test.svg)](https://agentmods.dev/skills/harness-base/harness-control/hc-test)
Your own site
<a href="https://agentmods.dev/skills/harness-base/harness-control/hc-test"><img src="https://agentmods.dev/badge/skills/harness-base/harness-control/hc-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 258 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,679 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.00258 $0.03679
Opus 5 $0.00129 $0.01840
Sonnet 5 $0.00052 $0.00736
Haiku 4.5 $0.00026 $0.00368

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

Security

Grade A, and why

hc-test 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 5d 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.

.agents/skills/hc-test/SKILL.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

编排式产出测试(hc-test)

本 skill = 测试总监总谱(薄):主 agent 当总监,按 docs/harness/testing-flow.md流程唯一真相源·总纲)调度专职 worker 产出测试;进哪条线先读对应分线文件testing-flow-{e2e,api,script,contract-check,regression}.md 五分线,清单以 testing-flow.md 场景表为准)。同 hc-prd「默认编排 + 用户覆盖」、同 hc-dev「写 → 派 reviewer 挑刺 → 回改 loop」。依据 ADR-0014(脚本线 ADR-0024)。

本文不复制流程长叙述——各小节引用总纲 / 分线文件对应小节,改流程只动那里。

① 何时用 / 何时不用

  • 用:把需求(AC / FP / US / PRD)或接口来源(接口契约 / 指定源)转成测试用例;管「用例对需求 / 接口覆盖全不全」;做 e2e 用例 / api 用例;把用例落成可执行测试脚本并在 sandbox 调通(写跑一体,ADR-0024);开发完成后做接口契约对照(脚本取数 + agent 对比,ADR-0026);跑统一回归(存量脚本池,ADR-0027)。各线实现状态见 testing-flow.md「场景 × 实现状态」。
  • 不用:产出需求走 hc-prd;写 / 改实现走 hc-dev(脚本跑出实现的 bug 也回 hc-dev 修,本 skill 不改业务代码);纯控制面 / 文档改动。

② 总监怎么派活

testing-flow.md「总监怎么派活」:

  • 默认(A):按手上产物 + 到了哪一步自动选场景(有 PRD 先做 e2e 用例;有接口契约(或用户指定接口来源)才做 api 用例;开发彻底结束 + 有用例才写脚本)。
  • 用户指令最高优先级:随时点名做哪段 / 跳过哪段,覆盖默认(沿用 hc-prd 总监模式)。
  • 每步解耦、可跳任意一步:可以没用例、没脚本……都行。
  • 进哪条线,先读对应分线文件(约束主体在分线文件 + worker 上下文,本总谱不复制)。

③ 场景 × worker(实现状态以 testing-flow 为准)

权威「场景 × 实现状态」表在 testing-flow.md(唯一真相源)——本总谱只列场景→worker 映射、不复刻状态列(rule-0012:复刻状态会漂,已栽过)。哪些已实现 / 哪些占位、各自触发条件,全看那张表:

场景 worker → reviewer
e2e 用例 hc-e2e-qahc-e2e-reviewer
api 用例 hc-api-qahc-api-reviewer
接口契约对照 总监调度(脚本取数 + agent 对比,不新建 worker)
测试脚本 hc-script-implhc-script-reviewer
统一回归 总监调度(跑+修复用 hc-script-impl

已实现 / 占位与触发条件见 testing-flow.md「场景 × 实现状态」表 + 各分线文件——占位加时填空、不重构 skill 形态。

④ 用例线编排(e2e / api)—— 写 → 审 → 回改

形态 = hc-dev 那套「写 → 派 reviewer 挑刺 → 回改 loop」;各线主体在分线文件(testing-flow-e2e.md / testing-flow-api.md)。e2e 与 api 同构,只是输入源不同,总监按此编排:

  1. 取输入
    • e2e:需求,按 AC > FP > US > PRD(缺则略过、用现有的,不卡)。
    • api接口来源硬门槛——① api-contract.mdhc-tech-design 产)> ② 用户指定源(proto / OpenAPI / 路由表 / 接口代码)> ③ 都无 → MUST STOP(无源不臆造接口,rule-0008)。与 e2e「缺则略」不同、有硬地板。明细见 testing-flow-api.md
  2. 派 worker 写用例:e2e 派 hc-e2e-qa(套 templates/e2e-test-case.md、每交互点 ×{成功,失败,边界})、api 派 hc-api-qa(套 templates/api-test-case.md、与接口来源一一对应:每接口一用例、每业务异常各一 case);预期锚唯一真实信号(rule-0009)、covers: 声明覆盖、只写不跑(rule-0014 管用例这种文档产物)。要求写在 worker 子 agent 上下文里,本总谱不复制、明细见对应分线文件。
  3. 派 reviewer 审用例:e2e 派 hc-e2e-reviewer、api 派 hc-api-reviewer(api reviewer 多一条「无接口来源硬产用例 → blocker」门槛复核 + 回契约原文对账);只评不改,出结构化清单。
  4. 回改 loop多视角并行对抗——fan out 对应 reviewer 多实例、各盯一个视角(覆盖 / 源符合 / 质量…)→ 汇总去重 → 总监派 worker 回改 → 复审 → 到覆盖齐、清单清零(末轮换新视角防假收敛;编排 pattern = docs/harness/adversarial-review.md,ADR-0022,唯一真相源、引用不复制)。
  5. test-cases-audit 机检兜底:结构层闸(e2e 覆盖矩阵完整性 / api 的 EP·EX ↔ covers: 双向闭合,带「无·理由」逃生口)跑通、make verify 绿。见下「两层防线」。
  6. 提醒用户:产物落 docs/test-cases/<id>/(登记不漂移);明确告诉用户用例齐了、覆盖闸过了,用例没跑(脚本线才跑,见 ⑤)。

Read the full file on GitHub · 81 lines

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. 5d ago First seen · 81 lines · 258 tokens per session scan A f33a076a0f17

Subscribe to this mod's changes

hc-test is a skill published in the GitHub repository harness-base/harness-control (22 stars, last pushed 1mo ago), licensed MIT. It adds 258 tokens to every session and 3,679 once invoked, about $0.0013 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.

Related

Other skills, from other repositories

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

run-integration-tests

Build, pack, and run .NET MAUI integration tests locally. Validates templates, samples, and end-to-end scenarios using the local workload.

dotnet/maui · 35 tokens

cli-e2e-testcase-writer

Use when adding or updating Go CLI E2E coverage for one tests/clie2e/{domain} domain of the compiled lark-cli, especially when the work requires live --help or schema exploration, scenario-based clie2e.RunCmd workflows, and per-domain coverage.md maintenance.

larksuite/cli · 78 tokens

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

every-app/open-seo · 35 tokens

harness-test-writer

Add regression test cases to the Bifrost provider harness (the Postman collection run via make run-provider-harness-test) based on a merged PR or a GitHub issue. Fetches the PR/issue, traces the affected wire path in the codebase, checks existing harness coverage, designs cases following harness conventions, inserts…

maximhq/bifrost · 133 tokens

agent-device-evidence

Records iOS/Android native MP4 evidence for test/repro flows extracted from an Expensify GitHub PR or issue. Use when the user asks to "record the flow for PR.

Expensify/App · 43 tokens