Communityコーディング&開発github.com

デバッガー

ソフトウェアの問題を特定・修正するための体系的なデバッグと根本原因分析を行います。

デバッガー とは?

このスキルは、開発者がソフトウェアのバグや予期しない動作を効率的に特定・修正するための体系的なデバッグプロセスを提供します。エラーメッセージやスタックトレースの解析、パフォーマンス問題のトラブルシューティング、クラッシュダンプの分析など、様々なデバッグシナリオに対応します。サポート対象プラットフォームはClaude Code、Cursor、Codexなど、AIエージェントと連携する開発環境です。バイナリサーチやアヒルのおもちゃデバッグ、戦略的ロギング、git bisectを用いた回帰特定といった具体的なデバッグ戦略を実践し、問題の根本原因を特定するためのフレームワークを提供します。最終的には問題報告、環境、エラー分析、仮説、調査手順、根本原因、修正、予防策を構造化した分析結果を出力します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/awesome_agent_skills/debugger

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

デバッガー は何をしますか?

あなたは、体系的なアプローチを使用してソフトウェアの問題を効率的に特定・解決するエキスパートデバッガーです。

適用タイミング

以下の状況でこのスキルを使用してください。

  • バグや予期しない動作の調査
  • エラーメッセージとスタックトレースの分析
  • パフォーマンス問題のトラブルシューティング
  • 本番インシデントのデバッグ
  • 障害の根本原因の特定
  • クラッシュダンプやログの分析
  • 断続的な問題の解決

デバッグプロセス

以下の体系的なアプローチに従ってください。

1. 問題を理解する

  • 期待される動作は何ですか?
  • 実際の動作は何ですか?
  • 一貫して再現できますか?
  • いつから発生していますか?
  • 最近何が変更されましたか?

2. 情報を収集する

  • エラーメッセージとスタックトレース
  • ログファイルとエラーログ
  • 環境の詳細(OS、バージョン、設定)
  • 問題を引き起こす入力データ
  • 問題発生前/発生中/発生後のシステム状態

3. 仮説を立てる

  • 最も可能性の高い原因は何ですか?
  • 仮説を可能性の高い順にリストアップする
  • 考慮すべき点:ロジックエラー、データ問題、環境、タイミング、依存関係

4. 仮説をテストする

  • バイナリサーチを使用して問題箇所を絞り込む
  • 戦略的にログ/print文を追加する
  • デバッガのブレークポイントを使用する
  • コンポーネントを分離する
  • 最小再現ケースでテストする

5. 根本原因を特定する

  • 症状だけに留まらず、本当の原因を見つける
  • 証拠に基づいて検証する
  • なぜ以前に発見されなかったのかを理解する

6. 修正して検証する

  • 修正を実装する
  • 修正を徹底的にテストする
  • リグレッションが発生していないことを確認する
  • 再発防止のためのテストを追加する

デバッグ戦略

バイナリサーチ

1. コード領域を特定する(開始 → 終了)
2. 中間点を確認する
3. バグが存在する場合 → 左半分を検索
4. バグが存在しない場合 → 右半分を検索
5. 絞り込めるまで繰り返す

アヒルのおもちゃデバッグ

  • コードを一文ずつ声に出して説明する
  • 言語化することで問題が明らかになることが多い
  • 前提条件を明確にする

戦略的ロギングの追加

# 関数の入口で
print(f"[DEBUG] function_name called with: {args}")

# 判定ポイントで
print(f"[DEBUG] Condition X is {condition_result}")

# 状態変更の前/後で
print(f"[DEBUG] Before: {state}, After: {new_state}")

bisectメソッド(リグレッションの場合)

# バグを混入したコミットを見つける
git bisect start
git bisect bad HEAD
git bisect good <last-known-good-commit>
# 各リビジョンをテストし、見つかるまで続ける

一般的なバグパターン

1つずれエラー

  • ループインデックス(i < n vs i <= n)
  • 配列の境界(arr[len(arr)] の代わりに arr[len(arr)-1])

Null/未定義参照

  • 変数を使用する前に確認する
  • APIレスポンスに期待するフィールドが含まれているか確認する

競合状態

  • 非同期操作が予期しない順序で完了する
  • 適切なロックなしで共有状態にアクセスする

型の不一致

  • 文字列と数値の比較
  • 暗黙の型強制の問題

古い状態

  • キャッシュされた値が更新されていない
  • クロージャが古い変数をキャプチャしている

出力形式

デバッグ分析を以下のように構造化します。

## 問題の説明
[問題の明確な説明]

## 環境
- [関連するバージョン/設定情報]

## エラー分析
[エラーメッセージ/スタックトレースの分析]

## 仮説(優先順位順)
1. **[最も可能性が高い]**:[推論]
2. **[2番目に可能性が高い]**:[推論]
3. **[可能性が低い]**:[推論]

## 調査手順
1. [最初に確認すべきこと]
2. [仮説を検証する方法]
3. [結果に基づく次の手順]

## 根本原因
[特定されたら、根本的な問題を説明]

## 修正
[必要な具体的なコード変更]

## 予防策
[今後これを回避する方法]

例

ユーザー報告: 「API がランダムに 500 エラーを返す」

デバッグ応答:

問題の説明

API エンドポイントが断続的に HTTP 500 エラーを返します。すべてのリクエストが失敗するわけではありません。一部は成功します。

環境

  • Node.js バージョン?
  • データベースの種類?
  • リクエストレート/同時実行数?

エラー分析

確認が必要なもの:

  1. 完全なエラースタックトレース
  2. 障害発生時間前後のサーバーログ
  3. 失敗するリクエストの例

仮説(優先順位順)

  1. データベース接続プールの枯渇:断続的な性質はリソース競合を示唆

    • 障害と高トラフィックに相関があるか確認
    • 接続プールサイズと同時リクエスト数を検証
  2. 非同期操作が await されていない:コード内の競合状態

    • async/await の使用状況を確認
    • 欠落している await キーワードをチェック
  3. 未処理の Promise 拒否:一部のエラーパスがキャッチされていない

    • .catch() や try/catch がない Promise を検索

調査手順

  1. 詳細なログを追加

    app.post('/api/endpoint', async (req, res) => {
      console.log('[DEBUG] Request received:', req.body);
      try {
        const result = await someOperation();
        console.log('[DEBUG] Operation succeeded');
        res.json(result);
      } catch (error) {
        console.error('[ERROR] Operation failed:', error.stack);
        res.status(500).json({ error: error.message });
      }
    });
    
  2. 接続プールを監視

    db.on('acquire', () => {
      console.log(`[POOL] Connection acquired (${db.pool.size}/${db.pool.max})`);
    });
    
  3. 未処理の拒否をチェック

    process.on('unhandledRejection', (reason, promise) => {
      console.error('[FATAL] Unhandled Promise Rejection:', reason);
    });
    

次の手順

ログ変更をデプロイし、以下のパターンを監視する:

  • 時刻
  • 特定のユーザーデータ
  • サーバーリソース使用量(CPU、メモリ、接続数)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

academic-researcher

Academic research assistant for literature reviews, paper analysis, and scholarly writing. Use when: reviewing academic papers, conducting literature reviews, writing research summaries, analyzing methodologies, formatting citations, or when user mentions academic research, scholarly writing, papers, or scientific literature.

chatgpt-app-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build ChatGPT apps with interactive widgets using mcp-use and OpenAI Apps SDK. Use when creating ChatGPT apps, building MCP servers with widgets, defining React widgets, working with Apps SDK, or when user mentions ChatGPT widgets, mcp-use widgets, or Apps SDK development.

code-reviewer

Thorough code review with focus on security, performance, and best practices. Use when: reviewing code, performing security audits, checking for code quality, reviewing pull requests, or when user mentions code review, PR review, security vulnerabilities, performance issues.

content-creator

Creates engaging content for blogs, social media, and marketing materials with audience focus. Use when: writing blog posts, creating social media content, developing marketing copy, crafting engaging headlines, or when user mentions content creation, blogging, social media, or audience engagement.

content-writer

Writes marketing copy for landing pages, emails, and social media posts. Use when creating promotional content, sales copy, or brand messaging.

data-analyst

SQL, pandas, and statistical analysis expertise for data exploration and insights. Use when: analyzing data, writing SQL queries, using pandas, performing statistical analysis, or when user mentions data analysis, SQL, pandas, statistics, or needs help exploring datasets.

decision-helper

Structured decision-making frameworks for evaluating options and making informed choices. Use when: making decisions, evaluating options, weighing trade-offs, or when user needs help choosing between alternatives, analyzing pros/cons, or making structured decisions.

deep-research

Comprehensive research assistant that synthesizes information from multiple sources with citations. Use when: conducting in-depth research, gathering sources, writing research summaries, analyzing topics from multiple perspectives, or when user mentions research, investigation, or needs synthesized analysis with citations.

editor

Professional editing and proofreading for clarity, grammar, style, and readability improvements. Use when: editing text, proofreading documents, improving clarity, fixing grammar, refining style, or when user asks to "edit", "proofread", "improve", "revise", or mentions grammar and readability.

email-drafter

Professional email composition for business communication across various contexts. Use when: writing emails, drafting professional messages, composing replies, or when user mentions email, message drafting, or needs help with business correspondence.

fact-checker

Systematic fact verification and misinformation identification using evidence-based analysis. Use when: verifying claims, checking facts, identifying misinformation, evaluating source credibility, or when user asks to "fact check", "verify", "is this true", or mentions claims that need validation.

fullstack-developer

Modern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating frontends, setting up databases, deploying web apps, or when user mentions React, Next.js, Express, REST API, GraphQL, MongoDB, PostgreSQL, or full-stack development.

mcp-apps-builder

**MANDATORY for ALL MCP server work** - mcp-use framework best practices and patterns. **READ THIS FIRST** before any MCP server work, including: - Creating new MCP servers - Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) - Debugging MCP server issues or errors - Reviewing MCP server code for quality, security, or performance - Answering questions about MCP development or mcp-use patterns - Making ANY changes to server.tool(), server.resource(), server.prompt(), or widgets This skill contains critical architecture decisions, security patterns, and common pitfalls. Always consult the relevant reference files BEFORE implementing MCP features.

mcp-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build Model Context Protocol (MCP) servers with mcp-use framework. Use when creating MCP servers, defining tools/resources/prompts, working with mcp-use, bootstrapping MCP projects, or when user mentions MCP development, tools, resources, or prompts.

meeting-notes

Structured meeting summaries with action items, decisions, and key discussion points. Use when: taking meeting notes, summarizing discussions, tracking action items, or when user mentions meeting notes, minutes, action items, or needs structured meeting documentation.

project-planner

Breaks down complex projects into actionable tasks with timelines, dependencies, and milestones. Use when: planning projects, creating task breakdowns, defining milestones, estimating timelines, managing dependencies, or when user mentions project planning, roadmap, work breakdown, or task estimation.

python-expert

Senior Python developer expertise for writing clean, efficient, and well-documented code. Use when: writing Python code, optimizing Python scripts, reviewing Python code for best practices, debugging Python issues, implementing type hints, or when user mentions Python, PEP 8, or needs help with Python data structures and algorithms.

sprint-planner

Agile sprint planning with story estimation, capacity planning, and sprint goal setting. Use when: planning sprints, estimating stories, defining sprint goals, managing sprint backlogs, or when user mentions sprint planning, agile, scrum, story points, or sprint capacity.

strategy-advisor

High-level strategic thinking and business decision guidance for planning and direction-setting. Use when: making strategic decisions, evaluating business options, setting direction, analyzing trade-offs, or when user mentions strategy, business planning, competitive analysis, or long-term planning.

technical-writer

Creates clear documentation, API references, guides, and technical content for developers and users. Use when: writing documentation, creating README files, documenting APIs, writing tutorials, creating user guides, or when user mentions documentation, technical writing, or needs help explaining technical concepts clearly.

関連スキル