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 Tirefly/agent-harness-template --skill harness-routergit clone --depth 1 https://github.com/Tirefly/agent-harness-templateWrote 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/tirefly/agent-harness-template/harness-router)<a href="https://agentmods.dev/skills/tirefly/agent-harness-template/harness-router"><img src="https://agentmods.dev/badge/skills/tirefly/agent-harness-template/harness-router/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/tirefly/agent-harness-template/harness-router"><img src="https://agentmods.dev/badge/skills/tirefly/agent-harness-template/harness-router.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.00070 | $0.01104 |
| Opus 5 | $0.00035 | $0.00552 |
| Sonnet 5 | $0.00014 | $0.00221 |
| Haiku 4.5 | $0.00007 | $0.00110 |
Grade A, and why
harness-router 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 9d 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.
What it actually says
Harness Router:任务开始的上下文组装
按以下七步执行,不得跳步。依据与本流程冲突时,先向用户呈现冲突再继续。
1. 任务分型
从用户消息判定任务类型(模板示例:game-design / domain-dev / domain-analysis / general;按 references/routing-table.yaml 实际定义调整)。
分不清 → general 兜底,并向用户说明分型依据(一句话)。用户纠正分型时,记下纠正信号(retro 素材)。
2. 查路由表
读 references/routing-table.yaml,取该类型的 memory-domains、skills、exclusions、execution-blueprint。
3. 常驻注入
无条件读取并纳入上下文(先读规范,再读记忆):
~/.agents/AGENTS.md(用户级唯一规范来源,最高优先级;必须先读再行动,任何流程/技能指令与之冲突时以此为准)~/.agents/memory/constitution.md(设计宪法,裁决标准)~/.agents/memory/profile.md(用户画像)
4. 记忆检索
优先运行:python ~/.agents/skills/harness-router/scripts/retrieve.py --query "<任务关键词>" --domains <路由表 domains> --top 5(跨平台可移植写法;PowerShell 参数位 ~ 不展开时,先把 ~ 替换为 $env:USERPROFILE 得到本机绝对路径再运行)
- 成功 → 读取返回卡片的原文(路径在输出的 path 字段)
- 退出码 2(索引缺失)→ 先执行
--rebuild重建索引再查;重建也失败或无 Python 环境 → 降级两级 grep:① grep~/.agents/memory/INDEX.md表行(domains / 标题)② 再 grep 各卡片 frontmatter 的 keywords 行(grep -l "keywords:.*<关键词>" ~/.agents/memory/*/*.md,INDEX 表不含 keywords 列),读 top 3-5 张卡原文 - 检索无结果 → 正常冷启动,不硬凑
【裁决 1 追加】score 是相对排序不是绝对相关度:未命中时也可能输出 top-N 条 score 0.0 的卡。必须结合标题与 keywords 自行判断相关性,明显不相关的直接丢弃,不注入上下文。
【裁决 2 追加】Python 探测顺序:
python→uv run python→ 本机已知绝对路径。本机兜底路径在对应技能文件的本机裁决注释中维护(跨机部署时替换为新机器的实际路径);均不可用才走 grep 降级。
5. 未关闭检查点检查
检索 INDEX.md 中 task-open 状态的卡(用表行锚定模式 \| task-open \|,避免误命中第 5 行图例文字):若与本任务相关,先向用户呈现断点(定了什么/搁置什么/下一步),确认从断点恢复还是重新开始。
6. 组装上下文包并透明呈现
向用户简要呈现(白盒):
- 任务分型结论与依据
- 注入的记忆(id + 标题);宪法与画像视为默认注入,不必逐条复述
- 计划使用的技能与执行蓝图(设计任务展示阶段→原子序列)
- 明确排除项(exclusions) 用户当场纠正(如"这条记忆过时了")→ 记为 retro 素材。
7. 执行选项(仅正式设计任务)
向用户提供选择: a) 本会话直接执行(沿用当前上下文) b) 派发干净 subagent 执行(无对话历史,只带上下文包 + 执行蓝图,产出收回主会话) 建议:复杂/正式设计任务选 b,快速迭代选 a。
检查点纪律(执行期)
execution-blueprint 中 checkpoint: true 的阶段完成时,立即产出 checkpoint 卡(按 harness-retro 的模板),走用户确认门后入库。 长任务自由讨论中每约 5 轮实质交流检查一次 checkpoint 需求;每次回答结束时的自动自检见 AGENTS.md「回答后 TAH 判定」。
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 51 lines · 70 tokens per session scan A eb4143c2ca36
harness-router is a skill published in the GitHub repository Tirefly/agent-harness-template (2 stars, last pushed 14d ago), licensed MIT. It adds 70 tokens to every session and 1,104 once invoked, about $0.0003 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…