break-ai-fix-loops
できること
このツールは、コンピュータプログラム(AI)がエラーを修正しようとしても、同じ失敗を繰り返してしまう「試行錯誤のループ」を止めるのに役立ちます。修正が確実に検証されるようにし、試行回数にも上限を設けます。
使う場面
- ✓AIが同じ修正を繰り返し、問題を解決できないとき。
- ✓簡単なテストには合格するのに、実際の利用ではプログラムが失敗するとき。
- ✓修正が本当に効いたかを確実に確認したく、効果がなければ元に戻せるようにしたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/break-ai-fix-loops/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“AIがこのバグを修正しようとしてループから抜け出せません。「Break AI Fix Loops」を使って、修正が適切に検証されるようにしてもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、問題の正確な内容と、本来あるべき動作を記録することから始めます。各修正の試行には上限があり、具体的な証拠と照らし合わせて確認されるため、修正が単なる繰り返しではなく、実際に効果があることを保証します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Break AI Fix Loops
Replace patch-and-retry behavior with a bounded, evidence-producing repair. Treat a changed patch as progress only when an observable state changes.
When to Use This Skill
- Use when an AI coding agent cycles through similar patches without changing the observed failure.
- Use when a focused test passes but the installed, deployed, UI, API, persistence, or other real execution path still fails.
- Use when a repair claim needs a verifier that can reject a known-bad state and a rollback that has actually restored the baseline on a disposable copy.
- Do not use for a one-shot, already-understood edit whose acceptance check directly exercises the complete claimed behavior.
Establish the repair contract
Before the first edit, record:
- the exact defect and the behavior that would disprove it;
- the revision, configuration, input, and execution path under test;
- the baseline command, literal result, and exit status;
- the strongest check that directly observes the claimed behavior;
- the rollback command and the state it must restore.
Save raw evidence before normalizing it. Redact credentials, tokens, cookies, personal data, and private URLs. Never put secrets into a fingerprint record or committed ledger.
If the defect cannot be reproduced, stop editing. Report INCONCLUSIVE with the missing observation instead of guessing at a fix.
Use a three-attempt budget
Allow at most three repair attempts for one acceptance claim. An attempt begins when code, configuration, dependencies, generated artifacts, or test expectations change. Inspections and read-only probes do not consume an attempt.
Do not reset the budget because the agent restarts, opens a new session, rewrites the same patch, changes models, clears a cache, or renames the hypothesis. A newly exposed downstream failure still belongs to the same three-attempt budget unless it is a separately accepted task.
For every attempt, write these fields before the next edit:
| Field | Required evidence |
|---|---|
| Hypothesis | One causal mechanism, not a restatement of the symptom |
| Prediction | An observation that would distinguish this hypothesis from the previous one |
| Change | Exact changed paths and a patch or before/after hash |
| Focused check | Exact command, input, literal output, and exit status |
| Real-path check | Direct observation, or NOT_RUN with a reason |
| Symptom fingerprint | Stable fingerprint described below |
| Decision | ADVANCE, SHIFT_CAUSE, PROVEN, or STOP |
Use the evidence ledger as a copyable record.
Fingerprint the observable failure
Fingerprint what the system did, not the agent's explanation. Build a canonical record from:
{
"schema_version": 1,
"command": "the exact verification command",
"input_digest": "digest or stable identifier of the tested input",
"exit_code": 1,
"failure_class": "stable-machine-readable-class",
"stable_excerpt": "the smallest decisive output with volatile values removed",
"real_path_state": "the directly observed state, or NOT_OBSERVED"
}
Keep the unedited output beside this sanitized record. Remove timestamps, run IDs, ANSI codes, random ports, and temporary paths from stable_excerpt only when they do not affect the defect. Do not normalize away values that could distinguish two causes.
Optionally compute the canonical SHA-256 fingerprint from this skill directory:
python3 scripts/fingerprint.py evidence/attempt-1.json
The helper validates the record, rejects unknown fields, and prints the fingerprint. It does not execute commands or redact evidence.
The helper uses only the Python 3.9+ standard library. When changing it, run its bundled regression tests:
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest scripts/test_fingerprint.py -v
The same fingerprint after a different patch means the observable failure did not move. A cosmetically different message with the same failure class, input, command, and real-path state also counts as a repeated failure when the changed text is only volatile data. Do not use a patch hash in the symptom fingerprint; record it separately so different edits cannot masquerade as different outcomes.
Shift the root-cause strategy
Set the decision to SHIFT_CAUSE immediately when any of these occurs:
- a symptom fingerprint repeats;
- the patch changes but the decisive state does not;
…
よくある質問
「修正ループ」とは何ですか?
コンピュータプログラム(AI)がバグを直そうとしても修正がうまくいかず、同じ手順で何度も失敗しながら再挑戦し続ける状態のことです。
ここでいう「証拠(エビデンス)」とは何を指しますか?
発生したことの詳細な記録のことです。正確なエラー内容、再現手順、期待した結果、実際の結果などを指し、いわば証明となるものです。
なぜ試行回数に上限を設けるのですか?
上限を設けないと、AIが効果のない修正に延々と時間を使ってしまうためです。上限があることで、証拠に基づいた、より計画的な問題解決が求められます。
詳細
作者による元の説明
Stop ineffective AI coding repair loops with stable failure fingerprints, a three-attempt budget, real-path proof, negative controls, and tested rollback.
人気
- GitHubのスター
- 48k
- ランキング
- #4054
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。