Tianshu Harness is a TypeScript runtime for coding agents, with terminal and desktop interfaces that share an agent core for managing goals, state, evidence, permissions, and completion checks. Developers use it to have language models carry out software tasks while the runtime verifies progress through tests, diffs, or other commands. The catalogue entries are skills and instructions for the agent's coding workflow.
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.
npx skills add huiliyi37/Tianshu-harness --skill agent-harness-testinggit clone --depth 1 https://github.com/huiliyi37/Tianshu-harnessWrote 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/skills/huiliyi37/tianshu-harness/agent-harness-testing)<a href="https://agentmods.dev/skills/huiliyi37/tianshu-harness/agent-harness-testing"><img src="https://agentmods.dev/badge/skills/huiliyi37/tianshu-harness/agent-harness-testing/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/skills/huiliyi37/tianshu-harness/agent-harness-testing"><img src="https://agentmods.dev/badge/skills/huiliyi37/tianshu-harness/agent-harness-testing.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.00061 | $0.02073 |
| Opus 5.5 | $0.00024 | $0.00829 |
| Sonnet 5.5 | $0.00012 | $0.00415 |
| Haiku 4.5 | $0.00006 | $0.00207 |
Grade A, and why
agent-harness-testing 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 28d 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 — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Harness Testing — 通用项目测试方法论
你在别人的项目中工作。你不知道他们的测试框架、不知道他们的构建系统、不知道他们的 CI。但你必须验证你的改动是正确且安全的——不能跳过测试、不能编造结果、不能假设一切正常。
总则(先复现再修复、先红灯再绿灯、结果必须来自真实执行、探针必须清理)已由运行时强制: 证据义务状态机跟踪 RED→GREEN、编辑门拦截无复现的源码修改、探针追踪扫描残留、 交付门禁核验验证证据。本 Skill 是操作手册——怎么探测测试能力、怎么构造红灯、 怎么模拟环境,不再复述总则。
Stage 1: 探测测试能力
进入陌生项目的第一件事——不是改代码,是了解怎么验证。
1.1 运行 inspect_project
这会返回项目摘要:语言、包管理器、scripts、入口文件、测试框架提示。先用它建立全局认知。
1.2 读项目配置文件
根据语言读对应配置:
| 语言 | 读什么 | 找什么 |
|---|---|---|
| Node/TS | package.json |
scripts.test, scripts.typecheck, scripts.lint, devDependencies 中的 vitest/jest/mocha |
| Python | pyproject.toml / setup.cfg |
[tool.pytest], [tool.mypy], [tool.ruff] |
| Go | go.mod + 项目根 *_test.go |
测试文件存在即表示 go test ./... 可用 |
| Rust | Cargo.toml |
[dev-dependencies] 中的 test 相关 crate |
1.3 列出测试文件
# Node
ls **/*.test.ts **/*.spec.ts **/__tests__/*.ts 2>/dev/null
# Python
ls **/test_*.py **/*_test.py 2>/dev/null
# Go
ls **/*_test.go 2>/dev/null
# Rust
ls tests/ 2>/dev/null
1.4 试跑一条测试命令
# Node 常见
npx vitest --run 2>&1 | head -5
npx jest --passWithNoTests 2>&1 | head -5
# Python
python -m pytest --co 2>&1 | head -5
# Go
go test ./... 2>&1 | head -5
# Rust
cargo test 2>&1 | head -5
如果试跑失败,看错误信息——可能缺依赖(npm install)、环境变量(.env)、或服务(Docker)。
不要跳过——记录障碍并告知用户,问是否需要帮助配置。
1.5 生成能力地图
探测完成后,心里形成一张表:
typecheck: 可用 (npx tsc --noEmit) / 不可用
lint: 可用 (npx eslint) / 不可用
unit test: 可用 (npx vitest --run) / 不可用
e2e: 可用 (npx playwright test) / 不可用
build: 可用 (npm run build) / 不可用
env sim: 可用 (docker compose up) / 不可用
Stage 2: 按任务类型选择测试策略
Bugfix
必须: RED 红灯测试 → 修复 → GREEN 绿灯测试 → 回归测试
如果无法写红灯测试: 说明原因 + 给替代验证方式
红灯测试构造方法:
- 从用户描述和错误日志提取失败场景
- 找现有测试文件,复制结构
- 写最简失败用例(最小数据、最少依赖)
- 运行 → 必须失败
- 确认失败断言与 Bug 描述一致
- 开始修复
如果无法构造(问题仅在生产环境/第三方回调/并发竞态复现):
- 明确说明:为什么本地无法复现
- 给出替代验证方式:staging 环境回放、日志对比、代码审查要点
- 不跳过验证——只是换一种验证方式
Feature
必须: 新功能测试(覆盖 happy path + 边界)→ typecheck → lint
推荐: 集成测试(如果涉及多模块)
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.
- 28d ago First seen · 247 lines · 61 tokens per session scan A d7648148c288
agent-harness-testing is a skill published in the GitHub repository huiliyi37/Tianshu-harness (1,122 stars, last pushed today), licensed Apache-2.0. It adds 61 tokens to every session and 2,073 once invoked, about $0.0002 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-09-18.
Other skills, from other repositories
qa-testing
Verify your work by actually operating the app or website you changed, instead of assuming it works. Strongly recommended whenever you build, modify, or debug a web app, website, or desktop GUI app. Drive real browsers with the agent-browser CLI and native desktop apps with the cua-driver CLI. These are installed on…
remote-tests
Testing against remote executors in integration tests.
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.
cw-gates
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
cw-dogfood
Use when a Codewhale change needs proving in the real product, or when asked to build/install/dogfood the local binaries: stamped release build, atomic install, fresh-shell verification, and the manual QA that gates cannot cover.
code-review-testing
For agent changes prefer integration tests over unit tests. Integration tests are under core/suite and use testcodex to set up a test instance of codex.