mcpField
I
intermittent-issue-debugging

intermittent-issue-debugging

github.com/aj-geddes開発373427 回インストール34 週間前に更新
リポジトリ

intermittent-issue-debugging について

断続的に発生する問題を体系的に調査するためのスキルです。症状の記録、原因の調査、モニタリングを案内し、不安定なテスト、競合状態、タイミング依存のバグなどに対応します。

主な機能

  1. 01断続的な問題の記録ガイド
  2. 02体系的な調査プロセス
  3. 03よくある問題のリファレンス
  4. 04モニタリングと予防のガイド

活用シーン

  1. 01ログに現れる散発的なエラーの調査
  2. 02不安定なテストのトラブルシュート
  3. 03競合状態の疑いの検証
  4. 04タイミング依存バグのデバッグ

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill intermittent-issue-debugging

インストール後、Claude Code で/intermittent-issue-debuggingを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

references/
capturing-intermittent-issues.md
common-intermittent-issues.md
monitoring-prevention.md
systematic-investigation-process.md
scripts/
scaffold-tests.sh
templates/
test-template.js

詳細

間欠的な問題のデバッグ

目次

概要

間欠的な問題は、常に発生するわけではないため、デバッグが最も困難です。体系的なアプローチと包括的なモニタリングが不可欠です。

使用する場面

  • ログに散発的なエラーが記録される
  • ユーザーから時折問題が発生すると報告される
  • 不安定なテスト
  • 競合状態が疑われる
  • タイミングに依存するバグ
  • リソース枯渇の問題

クイックスタート

最小限の動作例:

// Strategy 1: Comprehensive Logging
// Add detailed logging around suspected code

function processPayment(orderId) {
  const startTime = Date.now();
  console.log(`[${startTime}] Payment start: order=${orderId}`);

  try {
    const result = chargeCard(orderId);
    console.log(`[${Date.now()}] Payment success: ${orderId}`);
    return result;
  } catch (error) {
    const duration = Date.now() - startTime;
    console.error(`[${Date.now()}] Payment FAILED:`, {
      order: orderId,
      error: error.message,
      duration_ms: duration,
      error_type: error.constructor.name,
      stack: error.stack,
    });
    throw error;
  }
}

// Strategy 2: Correlation IDs
// ... (see reference guides for full implementation)

リファレンスガイド

詳細な実装は references/ ディレクトリにあります:

ガイド内容
間欠的な問題の捕捉間欠的な問題の捕捉
よくある間欠的な問題よくある間欠的な問題
体系的な調査プロセス体系的な調査プロセス
モニタリングと予防モニタリングと予防

ベストプラクティス

✅ 推奨事項
  • 確立されたパターンと規約に従う
  • クリーンで保守しやすいコードを書く
  • 適切なドキュメントを追加する
  • デプロイ前に十分にテストする
❌ 避けるべきこと
  • テストや検証を省略する
  • エラーハンドリングを無視する
  • 設定値をハードコードする

コメント