本文へ移動
cccskills
無料GitHub で公開日本語紹介

agent-introspection-debugging

AIエージェントの失敗や同じ操作の繰り返しを記録し、原因の切り分け、小さな復旧操作、結果の報告まで進める手順を示して、根拠のある再試行につなげるスキル。

原文Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

インストール方法を見る

こんなときに便利

  • 同じツール操作を繰り返す原因の調査
  • 会話の肥大化による品質低下の調査
  • ファイルパスや環境の食い違いの確認
  • 失敗と復旧の引き継ぎ報告の作成

日本語での紹介

できること

AIエージェントが失敗を繰り返したり、同じツール操作から抜け出せなくなったりした際に、状況を記録して原因を切り分けます。エラー、直前の操作、作業目的、作業ディレクトリなどの前提を確認し、影響を限定した復旧操作へ進みます。最後に、原因の仮説、実施した操作、改善の証拠、残る問題を読みやすい報告にまとめます。

こんなときに便利

再試行を重ねても進まないとき、会話やログが膨らんで出力品質が落ちたとき、想定したファイルやサービスの状態と実際の状態が食い違うときに向いています。別のエージェントや人へ調査を引き継ぐ際にも使えます。

使い方の例

  • 「同じコマンドで失敗しているので、直前の操作を記録して原因を切り分けて」
  • 「ファイルが見つからない原因を、パスとブランチの状態から確認して」
  • 「復旧操作とその結果、残る問題を報告にまとめて」

注意点

自動復旧を保証する実行基盤ではなく、調査と復旧の手順を教えるスキルです。高リスクの失敗や外部要因で進められない場合は人へ引き継ぎます。コード変更後の機能確認にはverification-loopの利用が案内されています。

この紹介文は、公開されている SKILL.md をもとに AI(Claude Haiku)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(1)

  • SKILL.md5.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Agent Introspection Debugging

Use this skill when an agent run is failing repeatedly, consuming tokens without progress, looping on the same tools, or drifting away from the intended task.

This is a workflow skill, not a hidden runtime. It teaches the agent to debug itself systematically before escalating to a human.

When to Activate

  • Maximum tool call / loop-limit failures
  • Repeated retries with no forward progress
  • Context growth or prompt drift that starts degrading output quality
  • File-system or environment state mismatch between expectation and reality
  • Tool failures that are likely recoverable with diagnosis and a smaller corrective action

Scope Boundaries

Activate this skill for:

  • capturing failure state before retrying blindly
  • diagnosing common agent-specific failure patterns
  • applying contained recovery actions
  • producing a structured human-readable debug report

Do not use this skill as the primary source for:

  • feature verification after code changes; use verification-loop
  • framework-specific debugging when a narrower ECC skill already exists
  • runtime promises the current harness cannot enforce automatically

Four-Phase Loop

Phase 1: Failure Capture

Before trying to recover, record the failure precisely.

Capture:

  • error type, message, and stack trace when available
  • last meaningful tool call sequence
  • what the agent was trying to do
  • current context pressure: repeated prompts, oversized pasted logs, duplicated plans, or runaway notes
  • current environment assumptions: cwd, branch, relevant service state, expected files

Minimum capture template:

## Failure Capture
- Session / task:
- Goal in progress:
- Error:
- Last successful step:
- Last failed tool / command:
- Repeated pattern seen:
- Environment assumptions to verify:

Phase 2: Root-Cause Diagnosis

Match the failure to a known pattern before changing anything.

PatternLikely CauseCheck
Maximum tool calls / repeated same commandloop or no-exit observer pathinspect the last N tool calls for repetition
Context overflow / degraded reasoningunbounded notes, repeated plans, oversized logsinspect recent context for duplication and low-signal bulk
ECONNREFUSED / timeoutservice unavailable or wrong portverify service health, URL, and port assumptions
429 / quota exhaustionretry storm or missing backoffcount repeated calls and inspect retry spacing
file missing after write / stale diffrace, wrong cwd, or branch driftre-check path, cwd, git status, and actual file existence
tests still failing after “fix”wrong hypothesisisolate the exact failing test and re-derive the bug

Diagnosis questions:

  • is this a logic failure, state failure, environment failure, or policy failure?
  • did the agent lose the real objective and start optimizing the wrong subtask?
  • is the failure deterministic or transient?
  • what is the smallest reversible action that would validate the diagnosis?

Phase 3: Contained Recovery

Recover with the smallest action that changes the diagnosis surface.

Safe recovery actions:

  • stop repeated retries and restate the hypothesis
  • trim low-signal context and keep only the active goal, blockers, and evidence
  • re-check the actual filesystem / branch / process state
  • narrow the task to one failing command, one file, or one test
  • switch from speculative reasoning to direct observation
  • escalate to a human when the failure is high-risk or externally blocked

Do not claim unsupported auto-healing actions like “reset agent state” or “update harness config” unless you are actually doing them through real tools in the current environment.

Contained recovery checklist:

## Recovery Action
- Diagnosis chosen:
- Smallest action taken:
- Why this is safe:
- What evidence would prove the fix worked:

Phase 4: Introspection Report

End with a report that makes the recovery legible to the next agent or human.

## Agent Self-Debug Report
- Session / task:
- Failure:
- Root cause:
- Recovery action:
- Result: success | partial | blocked
- Token / time burn risk:
- Follow-up needed:
- Preventive change to encode later:

Recovery Heuristics

Prefer these interventions in order:

  1. Restate the real objective in one sentence.
  2. Verify the world state instead of trusting memory.
  3. Shrink the failing scope.
  4. Run one discriminating check.
  5. Only then retry.

Bad pattern:

  • retrying the same action three times with slightly different wording

Good pattern:

  • capture failure
  • classify the pattern
  • run one direct check
  • change the plan only if the check supports it

Integration with ECC

  • Use verification-loop after recovery if code was changed.
  • Use continuous-learning-v2 when the failure pattern is worth turning into an instinct or later skill.
  • Use council when the issue is not technical failure but decision ambiguity.
  • Use workspace-surface-audit if the failure came from conflicting local state or repo drift.

Output Standard

When this skill is active, do not end with “I fixed it” alone.

Always provide:

  • the failure pattern
  • the root-cause hypothesis
  • the recovery action
  • the evidence that the situation is now better or still blocked

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

accessibility

無料日本語概要

Web・iOS・Androidの画面を、読み上げやキーボード操作に対応させ、ラベル、配色、操作対象の大きさなどをWCAG 2.2に沿って設計・点検するスキル。

  • アイコンボタンの説明を付けたいとき
  • キーボード操作とモーダルの点検
  • コントラストや操作対象の大きさの確認
affaan-m/ECC27.7万2026年10月10日 更新

agent-architecture-audit

無料日本語概要

AIエージェントの不調を、指示・記憶・ツール実行・画面表示など12の層から調べるスキル。コードやログを根拠に原因を整理し、重要度順の指摘と修正案をまとめます。

  • アプリ内だけで起きる不調を調べたいとき
  • 過去の会話が混ざる原因を調査
  • ツールの未実行や実行の誤報を確認
affaan-m/ECC27.7万2026年10月10日 更新

agent-eval

無料日本語概要

実際の開発課題で複数のコーディングエージェントを比較するスキル。成功率、取得可能なAPI費用、所要時間、繰り返し実行の安定性を測り、選定や更新後の評価に使えます。

  • 実際の開発課題でエージェントを比較
  • 新しいツールやモデルの導入前評価
  • エージェント更新後の性能確認
affaan-m/ECC27.7万2026年10月10日 更新

agent-harness-construction

無料日本語概要

AIエージェントが使うツールの種類や入出力、エラーからの復帰手順を設計・見直します。文脈の情報量も整理し、作業完了率や再試行回数で改善を評価します。

  • エージェントのツールや入力形式の設計
  • ツールの結果と次の行動を明確にしたいとき
  • 安全な再試行と停止条件を定めたいとき
affaan-m/ECC27.7万2026年10月10日 更新

agent-introspection-debugging

無料日本語概要

AIエージェントが失敗や同じ操作を繰り返す原因を、エラーと実行状況から整理します。小さな復旧操作を試し、結果と根拠を引き継げる報告にまとめるスキルです。

  • エージェントの連続失敗を診断したいとき
  • 同じツール操作のループ調査
  • 情報の蓄積による出力劣化の点検
affaan-m/ECC27.7万2026年10月5日 更新

agent-payment-x402

無料日本語概要

AIエージェントによる有料APIやサービスへの支払いをx402で組み込み、タスク別・セッション別の予算、送金先の制限、秘密鍵を自分で管理するウォレットを設定します。

  • エージェントに有料APIを使わせたいとき
  • タスク別・セッション別の支出上限設定
  • 送金先・ネットワーク・資産の制限
affaan-m/ECC27.7万2026年10月10日 更新

affaan-m のスキルをすべて見る

このスキルの問題を報告する