harness-retrofit

harness-retrofit is a skill for Claude Code from wallkop/opc-develop. It costs 81 tokens per session (663 once invoked), scanned A, original, MIT.

A guide for improving the development and testing setup of an existing project without rebuilding it from scratch. A harness is the set of tools, environments, logs, tests, and rules used to operate and verify the project.

In plain words
What is it for?
Use it to assess an existing project, improve commands and logs, align local and production-like environments, add migrations and documentation, and verify real user flows.
Why use it?
It reveals gaps between the current setup and a trustworthy one, then addresses them in small steps with evidence.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions AGENTS.md.

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the opc-develop plugin — 11 skills, 2 agents shipped together

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/wallkop/opc-develop/harness-retrofit
Any agent
npx skills add wallkop/opc-develop --skill harness-retrofit
Clone the repo
git clone --depth 1 https://github.com/wallkop/opc-develop

Made for: Claude Code.

Or install opc-develop, the plugin that ships this one along with the rest of its 11 skills, 2 agents.

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 harness-retrofit

README.md
[![agentmods](https://agentmods.dev/badge/skills/wallkop/opc-develop/harness-retrofit.svg)](https://agentmods.dev/skills/wallkop/opc-develop/harness-retrofit)
Your own site
<a href="https://agentmods.dev/skills/wallkop/opc-develop/harness-retrofit"><img src="https://agentmods.dev/badge/skills/wallkop/opc-develop/harness-retrofit.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 663 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.1 $0.00081 $0.00663
Opus 5 $0.00041 $0.00331
Sonnet 5 $0.00016 $0.00133
Haiku 4.5 $0.00008 $0.00066

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

Security

Grade A, and why

harness-retrofit 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.

skills/harness-retrofit/SKILL.md · 41 lines

What it actually says

harness-retrofit

目标与 harness-init 相同(以 ${CLAUDE_PLUGIN_ROOT}/docs/harness.zh-CN.md 为权威), 路径相反:从存量出发,改与迁移,不推倒重来。改造由真实需要拉动—— 下一个 feature 用不到的能力,这一轮不建。

盘点(先看后问)

先自行考察,代码里能查到的不许问人:服务怎么启动?日志什么形态?本地环境与生产差在哪 (伪平替清单:SQLite 顶 MySQL、内存 mock 顶对象存储、latest 镜像、跳过的鉴权)? 有没有 Migration,还是手工改库?测试怎么跑、绿灯信不信得过? 盘点结果做成差距表:现状 → harness 要求 → 差距 → 风险。 然后按轮次向架构师提问确认迁移决策(每轮 5-10 问,附推荐方案与理由); 难以回头的决策记入 ADR。

迁移路线(按反馈回路价值排序,小步可回退)

  1. 操作面包壳:不改业务代码,先给存量命令套上 run / observe 稳定入口。
  2. 日志改造:接入结构化日志与 trace_id 传播——通常是回报最快的一步。
  3. 消灭伪平替:本地对齐生产引擎与主版本;补 Migration 基线 (以当前真实 Schema 为 0001,不追溯重写历史)。
  4. 受保护资源与 drive:声明 protected_resources,建 clone 沙箱, 落第一条真实入口 Case 与判定四件套。
  5. 文档体系补课:AGENTS.md + 地图 + 规则;对存量做一次立项决策补课—— 当前全景架构图、领域划分与"既成事实 ADR"(记录现状与理由,不追溯重设计)。

每一步都必须回答"缩短了哪条反馈回路",答不上来就跳过; 每步完成即用对应验证用例证明(同 harness-init 的用例集,逐步点亮), 不憋大招一次性切换。

产出

差距表、迁移决策(含 ADR 与立项决策补课产物)、逐步点亮的验证用例证据、 改造后的 harness 能力。

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 · 41 lines · 81 tokens per session scan A e3cdac241d49

Subscribe to this mod's changes

harness-retrofit is a skill published in the GitHub repository wallkop/opc-develop (11 stars, last pushed 1mo ago), licensed MIT. It adds 81 tokens to every session and 663 once invoked, about $0.0004 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

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…

microsoft/ai-agents-for-beginners · 200 tokens

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…

vercel/next.js · 95 tokens

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…

vercel/next.js · 170 tokens

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…

vercel/next.js · 103 tokens

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…

microsoft/vscode · 72 tokens