with one click
auto-fix
Codex + Claude Codeによる自動コード修正。diff→レビュー→トリアージ→修正→検証→コミットを指摘ゼロまでループ。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Codex + Claude Codeによる自動コード修正。diff→レビュー→トリアージ→修正→検証→コミットを指摘ゼロまでループ。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | auto-fix |
| description | Codex + Claude Codeによる自動コード修正。diff→レビュー→トリアージ→修正→検証→コミットを指摘ゼロまでループ。 |
「自動修正」「auto-fix」「指摘を直して」「fix」と言われたら起動する。
Codex(gpt-5.4)とClaude Codeサブエージェントを組み合わせた自動コード修正システム。 ハーネスエンジニアリングの考え方に基づき、過剰指摘のフィルタリング、オシレーション検出、テスト実行による検証を自動化する。
プロジェクトルートの .auto-fix.yml を読む。なければデフォルトを使う:
max_iterations: 6
base_branch: main
test_command: npm test
lint_command: npm run lint
typecheck_command: npx tsc --noEmit
severity_threshold: IMPORTANT
引数 $ARGUMENTS があればパースしてデフォルトを上書き(例: --max-iterations 4 --base-branch develop)。
which codex で Codex CLI の存在を確認。なければインストール方法を案内して終了。git status でクリーンな状態か確認。未コミットの変更があれば警告。git diff --name-only $base_branch で差分があるか確認。なければ終了。以下を最大 max_iterations 回繰り返す。
scripts/codex-review.sh を実行する(スキルディレクトリ内のスクリプトを使う):
bash "${CLAUDE_SKILL_DIR}/scripts/codex-review.sh" "$base_branch"
findings が 0 件ならループ終了。
サブエージェントを起動する。プラグインエージェント /auto-fix:triage を使う。
サブエージェントに渡す情報:
filtered_findings が 0 件ならループ終了。
scripts/codex-fix.sh を実行する:
bash "${CLAUDE_SKILL_DIR}/scripts/codex-fix.sh" "$filtered_findings_path" "$directives_path"
サブエージェントを起動する。プラグインエージェント /auto-fix:validate を使う。
サブエージェントに渡す情報:
サブエージェントが問題を検出した場合、自身で修正を行う。
変更があればコミット:
git diff > /tmp/auto-fix/iteration-$N/commit.diff
git add -A
git commit -m "fix: auto-fix iteration $N"
Step 1 に戻る。
結果サマリーを表示: 総イテレーション数、処理した findings 数、除外数、最終状態。
scripts/codex-review.sh — Codex review モード実行scripts/codex-fix.sh — Codex fix モード実行references/oscillation-patterns.md — オシレーション検出ロジックreferences/triage-examples.md — トリアージ判定の具体例/auto-fix:triage — トリアージ用サブエージェント/auto-fix:validate — バリデーション用サブエージェント