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 2217173240/Coding-Agent-prompt-best-practice --skill harness-engineeringgit clone --depth 1 https://github.com/2217173240/Coding-Agent-prompt-best-practiceWrote 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/2217173240/coding-agent-prompt-best-practice/harness-engineering)<a href="https://agentmods.dev/skills/2217173240/coding-agent-prompt-best-practice/harness-engineering"><img src="https://agentmods.dev/badge/skills/2217173240/coding-agent-prompt-best-practice/harness-engineering/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/2217173240/coding-agent-prompt-best-practice/harness-engineering"><img src="https://agentmods.dev/badge/skills/2217173240/coding-agent-prompt-best-practice/harness-engineering.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.00102 | $0.01197 |
| Opus 5 | $0.00051 | $0.00598 |
| Sonnet 5 | $0.00020 | $0.00239 |
| Haiku 4.5 | $0.00010 | $0.00120 |
Grade A, and why
harness-engineering 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- harness-engineering — 100% identical, 200 lines differ
What it actually says
Harness Collaboration Skill
核心目标
- 把任务放进可执行 harness,而不是只依赖提示词。
- 用可观测证据驱动迭代:工具输出、测试结果、日志、CI 状态。
- 降低人机来回拉扯:让代理先跑,达到阈值再请求人工决策。
- 在求助时提供结构化选项,而不是只汇报失败。
执行流程
1) 先定义成功与边界
- 明确交付物、验收标准、约束条件、不可改动范围。
- 把任务拆成 3-6 个可验证里程碑,每步都能用命令或文件证据判定完成。
- 在开始前写明失败可接受范围(例如允许重试次数、最长探索时间)。
2) 优先完善 harness,再让代理执行
- 按最小权限逐级放开能力,不一次性给最高权限:
- L1: 只读代码与文档
- L2: 可运行测试与静态检查
- L3: 可修改代码并回归
- L4: 可执行需要授权的外部操作(发布、生产变更)
- 在每一级都定义“升级条件”和“回滚条件”。
- 缺少关键工具时先补工具链,再做深度优化。
3) 给代理自主探索预算,避免每步打断
- 设定时间预算和尝试预算(例如单问题最多 20 分钟或 3 次同类尝试)。
- 要求每轮迭代都产出证据:做了什么、结果如何、下一步假设是什么。
- 禁止“无证据重试”:同样手段失败后,必须换策略或请求人工输入。
4) 按阈值触发主动求助
- 任一条件满足即主动请求人工决策:
- 同类失败连续 2-3 次,且误差模式一致;
- 缺少关键上下文(需求口径、环境变量、数据权限);
- 需要越过安全边界或执行高风险变更;
- 出现多解分支且成本/风险显著不同。
- 求助时一次性提供:
- 已尝试动作与证据;
- 根因假设与不确定点;
- 2-3 个可选方案(收益、风险、时间成本)。
5) 用“选项型提问”提升协作效率
- 采用封闭式选项,减少往返:
- 选项 A(推荐):低风险、耗时短、覆盖 80% 场景
- 选项 B:中风险、改动较大、收益更高
- 选项 C:高风险、仅在强需求时采用
- 每次提问只聚焦一个决策点,避免在一个消息中混入多个问题。
6) 以“可追溯交付”收束
- 交付内容必须包含:
- 变更清单(文件与关键行为);
- 验证证据(命令、结果、失败与修复过程);
- 已知风险与边界(明确未覆盖项)。
- 严禁静默降级、伪成功路径、隐藏失败。
主动协作消息模板
在触发求助阈值后,使用以下模板:
当前阻塞: <一句话描述>
已验证事实:
1) <证据1>
2) <证据2>
3) <证据3>
根因假设:
- H1: <假设 + 置信度>
- H2: <假设 + 置信度>
可选决策:
- A(推荐): <方案> | 成本 <x> | 风险 <y> | 预计耗时 <z>
- B: <方案> | 成本 <x> | 风险 <y> | 预计耗时 <z>
- C: <方案> | 成本 <x> | 风险 <y> | 预计耗时 <z>
需要你确认: <仅一个决策问题>
反模式
- 过早求助:尚未形成证据就请求人工接管。
- 无界重试:重复同一命令但不改变假设。
- 静默绕过:用兜底路径掩盖真实失败。
- 只报问题不报选项:把决策压力全部转移给人工。
- 完成后无证据:缺少可复现实验与验证记录。
参考资料
- 读取
references/harness-engineering-digest.md获取文章蒸馏与落地检查清单。
What ships with it
2 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 · 101 lines · 102 tokens per session scan A 34eede3a5d8e
harness-engineering is a skill published in the GitHub repository 2217173240/Coding-Agent-prompt-best-practice (55 stars, last pushed 3mo ago), licensed MIT. It adds 102 tokens to every session and 1,197 once invoked, about $0.0005 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.
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…
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…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…