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 shimo4228/claude-harness --skill repair-disciplinegit clone --depth 1 https://github.com/shimo4228/claude-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/shimo4228/claude-harness/repair-discipline)<a href="https://agentmods.dev/skills/shimo4228/claude-harness/repair-discipline"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/repair-discipline/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/shimo4228/claude-harness/repair-discipline"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/repair-discipline.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.00067 | $0.01438 |
| Opus 5.5 | $0.00027 | $0.00575 |
| Sonnet 5.5 | $0.00013 | $0.00288 |
| Haiku 4.5 | $0.00007 | $0.00144 |
Grade A, and why
repair-discipline 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 22d 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 — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repair Discipline
直す前に、いま何が真かを一次証拠で確定する。原則 1–3 は着手するとき、4–6 は原因を 診断するときに効く。6 原則とも実地の失敗から取った — どの repo でも同じ形で壊れる。
1. 着手前に既済照合
残課題ファイル・古い TODO・引き継ぎメモは書かれた時点の観測。着手前に git log と 実コードで「もう直っていないか」を照合する。台帳だけが古いまま残る drift は 「作業 → 資料 → 台帳」の最後の 1 ホップで起きる — 見つける経路は日付でなく 正本資料との突き合わせ(決着済みのタスクが数ヶ月 open のまま残る)。
2. schema / storage 変更は全消費者を同じ変更で棚卸す
データ形式・保存場所・フィールドを変えたら、その形式を読む側を全部 grep して同じ PR で追随させる。書き手だけ直した変更は、読み手が静かに空を返す形で壊れる — エラーでなく「何も無い」に見えるのが最悪の壊れ方。消費者は自コードとは限らない (skill 本文・doc・別 script が名指しで読んでいることがある)。
3. bypass は単一ゲートでなく全ゲートを短絡すると知って使う
1 つの hook が複数の検査(例: format / lint / security)を束ねているとき、その hook の bypass は 既知の 1 件を通すためのつもりでも束ねた検査を全部一緒に飛ばす。使う前にその hook を読み、 bypass が黙らせる検査を全部挙げる。挙げきれないなら個別の除外手段を探す。
4. プロセスの CPU が低い ≠ stuck
I/O バウンドなプロセス(LLM 推論・ネットワーク待ち)は CPU がほぼ 0 でも正常に進行 している。kill する前に一次ログと相手側の状態(サーバの load 状況・進捗ログの タイムスタンプ)を見る。「反応がない気がする」は証拠でない。
5. テストの再試行はフォアグラウンド 1 回
失敗したテストをバックグラウンドで連発しない。1 回フォアグラウンドで走らせ、出力を 読み切ってから次の仮説へ。連発は失敗ログを積むだけで情報を増やさず、リソース競合で 新しい偽の失敗を作る。
6. 断続的な失敗と時間の飛びは、環境の覆いを先に外す
「たまに成功する外部 API」と「wall time が job 自身のログの時刻より大きく飛ぶ処理」は、
コードの仮説より先に環境で説明できないかを一次記録で見る。成功した応答の x-cache /
age / via(HIT なら origin を通っていない。比較は cache に無い新しい query を client
ごとに 1 本ずつ)と、macOS の pmset -g log | grep -E " Sleep | Wake "(その区間の
sleep / hibernate)。cache hit だけが成功して見える API を相手側の罰則と誤診し、
hibernate の空白をコードの遅さと誤診する。
使い方
修理・変更の着手時と、原因の診断中に該当原則を 1 つ名指しして通す(「原則 1 — この課題、 git log で既済照合した?」「原則 4 — kill する前に一次ログを見た?」)。機構を足す 修理で「そもそも存在すべきか」を別の目で見たいときは agent: architect に聞ける。
plan の前の内部調査 report
plan の依頼で調査の種別が内部(repo 内で答えが出るバグ・refactor)のとき、主ループが再現と原因の確認を
自分で行い、そのまま <repo>/docs/plans/research/YYYY-MM-DD-<slug>.md に書く。plan はこの report にリンクする。
kind: internal
# <問い>
## 再現 手順と観測した結果(実行したコマンドと出力の要点)
## 原因 file:line と、その行が原因だと言える根拠
## 確認 原因を確かめた方法(Read した箇所、テスト結果)
## Still unknown
外部調査の report は skill: search-first の Full で researcher が統合する(形は agents/researcher.md)。
失効条件
- substrate がこれらの照合を診断時と着手時に自発するようになったら退役(足場は不要になったら外す)
- 原則の出所となった実測が反証されたら該当原則を削る
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.
- 22d ago Changed 79958f539489
- 29d ago Changed · +16 lines · +14 tokens per session 3c871c2f4a05
- 1mo ago Changed b5c3d1b77c9e
- 1mo ago Changed · -130 tokens per session bc5a6f8b857f
- 1mo ago Changed · -3 lines · +58 tokens per session 67188627cece
- 2mo ago Changed · +11 lines 27b9fcee52cb
- 2mo ago Changed · -15 tokens per session 487373dfdd19
- 3mo ago First seen · 57 lines · 140 tokens per session scan A eddcfd20bddd
repair-discipline is a skill published in the GitHub repository shimo4228/claude-harness (4 stars, last pushed 7d ago), licensed MIT. It adds 67 tokens to every session and 1,438 once invoked, about $0.0003 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-08-31.
repair-discipline compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| repair-disciplineshimo4228/claude-harness | Skill | 4 | 7d ago | MIT | A | 67 | Claude Code |
| troubleshoot-tervaterva-sh/terva | Skill | 5 | 2d ago | MIT | A | 83 | Claude Code, Codex |
| agent-adoption-triageshimo4228/agent-adoption-triage | Skill | 2 | 1mo ago | MIT | A | 143 | Claude Code |
| agent-harness-fault-injectionlingxling/awesome-skills-cn | Skill | 341 | 1mo ago | MIT | A | 34 | Claude Code |
| debug-helpsunnypatneedi/claude-starter-kit | Skill | 11 | 9mo ago | none | A | 8 | Claude Code |
| systematic-debuggingNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 16 | Claude Code, Codex |
| a11y-debuggingasgeirtj/system_prompts_leaks | Skill | 74k | yesterday | CC0-1.0 | A | 50 | Claude Code, Codex |