Bug Impact Analyzerのロゴ

Bug Impact Analyzer

コミュニティ
dykyi-roman
bug-impact-analyzer

Analyzes bug fix blast radius. Determines affected code, dependencies, callers/callees, and potential side effects of changes.

概要

公開者dykyi-roman
リポジトリawesome-claude-code
スキル名bug-impact-analyzer
スター
98
フォーク
25
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    dykyi-romanがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Bug Impact Analyzer」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/dykyi-roman/awesome-claude-code/tree/master/skills/bug-impact-analyzer
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code.git /tmp/awesome-claude-code
mkdir -p .claude/skills
cp -r /tmp/awesome-claude-code/skills/bug-impact-analyzer .claude/skills/bug-impact-analyzer
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでBug Impact Analyzerを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にBug Impact Analyzerを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Bug Impact Analyzerは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Bug Impact Analyzer

Systematic analysis of how a bug fix will affect the codebase.

Blast Radius Concept

Every code change has a "blast radius" - the scope of code that could be affected.

                    ┌─────────────────┐
                    │   Direct Fix    │ ← Minimal blast radius
                    │  (1 method)     │
                    └────────┬────────┘
                             │
              ┌──────────────┼──────────────┐
              ▼              ▼              ▼
        ┌─────────┐    ┌─────────┐    ┌─────────┐
        │ Caller 1│    │ Caller 2│    │ Caller 3│ ← Medium blast radius
        └────┬────┘    └────┬────┘    └────┬────┘
             │              │              │
    ┌────────┴────────┬─────┴─────┬────────┴────────┐
    ▼                 ▼           ▼                 ▼
┌───────┐        ┌───────┐   ┌───────┐        ┌───────┐
│Public │        │ Event │   │ Test  │        │  API  │ ← Large blast radius
│  API  │        │Handler│   │ Suite │        │Client │
└───────┘        └───────┘   └───────┘        └───────┘

Analysis Dimensions

1. Direct Callers Analysis

Find all code that directly calls the changed method.

bash
# Find callers of a method
grep -rn "->methodName(" src/
grep -rn "::methodName(" src/

# Find callers in tests
grep -rn "->methodName(" tests/

Impact Questions:

  • Will callers still work with the fix?
  • Do callers expect the old behavior?
  • Are there callers in external packages?

2. Callees Analysis (Dependencies)

Find all code that the changed method calls.

php
// Example: Method being fixed
public function calculateTotal(array $items): Money
{
    // Callees:
    $sum = Money::zero($this->currency);           // 1. Money::zero()
    foreach ($items as $item) {
        $price = $item->getPrice();                // 2. Item::getPrice()
        $quantity = $item->getQuantity();          // 3. Item::getQuantity()
        $sum = $sum->add($price->multiply($quantity)); // 4. Money::add(), Money::multiply()
    }
    return $sum;
}

Impact Questions:

  • Does the fix change how callees are used?
  • Are new callees introduced?
  • Could new callees throw exceptions?

3. Data Flow Analysis

Trace how data flows through the system.

Input Data Flow:
Request → DTO → Command → Entity → Repository → Database
                  ↓
              Validation
                  ↓
              [BUG HERE] - invalid data passed forward

Fix Impact:
- Validation added at Command level
- All downstream code now receives valid data
- Callers must handle ValidationException

4. Event/Message Impact

Check if the change affects published events or messages.

php
// If the buggy method publishes events:
class OrderService
{
    public function completeOrder(Order $order): void
    {
        // BUG FIX HERE
        $order->complete();

        // EVENT PUBLISHED - fix might change event data
        $this->eventBus->publish(new OrderCompleted($order));
    }
}

Impact Questions:

  • Does the fix change event payload?
  • Are there subscribers depending on old data?
  • Are events used for external integration?

5. API Contract Analysis

Check if the change affects public APIs.

Change TypeAPI ImpactSeverity
Return type changeBreakingHigh
New exception typeBreakingHigh
New required parameterBreakingHigh
New optional parameterCompatibleLow
Different return value (same type)Semantic breakingMedium
Performance changeSLA impactMedium

6. Database Impact

Check if the fix affects database state.

php
// Fix that changes data format
// BEFORE: stored as "2024-01-15"
// AFTER: stored as "2024-01-15T00:00:00Z"

// Impact:
// - Existing data incompatible
// - Need migration
// - Other services reading same data affected

Impact Questions:

  • Does fix change data format?
  • Is migration needed?
  • Are other services affected?

Impact Assessment Matrix

Severity Levels

LevelDescriptionAction Required
LowInternal implementation onlyFix and test
MediumAffects callers within same bounded contextVerify all callers
HighAffects public API or other contextsCoordinate with stakeholders
CriticalAffects external integrationsVersion API, migration plan

Assessment Checklist

markdown
## Impact Assessment: [Bug ID]

### Direct Impact (Low)
- [ ] Method signature unchanged
- [ ] Return type unchanged
- [ ] Exceptions unchanged
- [ ] Side effects unchanged

### Caller Impact (Medium)
- [ ] All callers identified: [count]
- [ ] Callers tested: [count]
- [ ] No behavioral changes for callers

### Cross-Context Impact (High)
- [ ] Events payload unchanged
- [ ] Messages format unchanged
- [ ] Shared database schema unchanged

### External Impact (Critical)
- [ ] Public API unchanged
- [ ] SDK compatibility maintained
- [ ] Documentation update not needed

### Overall Blast Radius: [Low/Medium/High/Critical]

Dependency Graph Building

Step 1: Identify Changed Code

php
// File: src/Domain/Order/OrderService.php
// Method: calculateTotal()
// Line: 45-60

Step 2: Find Direct Dependents

bash
# Classes that use OrderService
grep -rn "OrderService" src/ --include="*.php"

# Results:
# src/Application/UseCase/CreateOrderUseCase.php:15
# src/Application/UseCase/UpdateOrderUseCase.php:18
# src/Presentation/Api/OrderController.php:22

Step 3: Build Dependency Tree

OrderService::calculateTotal()
├── CreateOrderUseCase (calls calculateTotal)
│   ├── OrderController::create() (calls UseCase)
│   │   └── POST /api/orders (HTTP endpoint)
│   └── CreateOrderFromCartHandler (event handler)
│       └── CartCheckoutCompleted (event trigger)
│
├── UpdateOrderUseCase (calls calculateTotal)
│   ├── OrderController::update() (calls UseCase)
│   │   └── PUT /api/orders/{id} (HTTP endpoint)
│   └── AddItemToOrderHandler (command handler)
│
└── OrderTotalRecalculationJob (calls calculateTotal)
    └── Scheduler (cron trigger)

Step 4: Assess Each Branch

DependentRiskNeeds TestingNotes
CreateOrderUseCaseMediumYesCore flow
UpdateOrderUseCaseMediumYesCore flow
OrderController::createLowCoveredVia UseCase test
OrderController::updateLowCoveredVia UseCase test
CreateOrderFromCartHandlerHighYesAsync, hard to debug
OrderTotalRecalculationJobHighYesBackground job

Side Effects Mapping

Intentional Side Effects

php
class OrderService
{
    public function completeOrder(Order $order): void
    {
        $order->complete();                        // State change
        $this->repository->save($order);           // Database write
        $this->eventBus->publish($event);          // Event published
        $this->metrics->increment('orders.completed'); // Metrics
        $this->logger->info('Order completed');    // Logging
    }
}

Side Effect Impact Table

Side EffectPreserved After Fix?Impact if Changed
Entity state changeMust preserveBreaks domain logic
Database writeMust preserveData inconsistency
Event publishCheck payloadDownstream handlers affected
MetricsShould preserveDashboard/alerts affected
LoggingCan changeLow impact

Test Coverage Analysis

Finding Existing Tests

bash
# Tests for the class being fixed
grep -rn "OrderService" tests/ --include="*.php"

# Tests that might break
grep -rn "calculateTotal" tests/ --include="*.php"

Coverage Gaps

markdown
## Test Coverage for OrderService::calculateTotal()

### Existing Tests
- [x] OrderServiceTest::testCalculateTotalWithItems
- [x] OrderServiceTest::testCalculateTotalEmpty
- [ ] Missing: testCalculateTotalWithNullItem ← Bug case

### Integration Tests
- [x] CreateOrderUseCaseTest
- [ ] Missing: UpdateOrderUseCaseTest

### E2E Tests
- [x] POST /api/orders
- [ ] Missing: PUT /api/orders/{id}

Quick Impact Commands

bash
# Find all files that import/use the changed class
grep -rln "use.*OrderService" src/

# Find all method calls
grep -rn "->calculateTotal(" src/ tests/

# Find event subscribers
grep -rn "OrderCompleted" src/

# Find API routes using the controller
grep -rn "OrderController" routes/

# Count affected files
grep -rln "OrderService" src/ | wc -l

Impact Report Template

markdown
# Impact Analysis Report

## Bug: [ID/Description]
## Fix Location: [File:Line]

## Blast Radius Summary

| Dimension | Count | Risk |
|-----------|-------|------|
| Direct Callers | X | Low/Med/High |
| Event Handlers | X | Low/Med/High |
| API Endpoints | X | Low/Med/High |
| Database Tables | X | Low/Med/High |
| External Services | X | Low/Med/High |

## Detailed Impact

### Callers Affected
1. [Caller 1] - [Impact description]
2. [Caller 2] - [Impact description]

### Events Affected
1. [Event 1] - [Payload change?]

### APIs Affected
1. [Endpoint 1] - [Response change?]

## Testing Requirements
- [ ] Unit test for fix
- [ ] Integration tests for callers
- [ ] E2E tests for APIs
- [ ] Manual testing for [scenarios]

## Rollout Recommendation
- [ ] Safe for immediate deployment
- [ ] Requires staged rollout
- [ ] Requires feature flag
- [ ] Requires coordination with [teams]

よくある質問

AIスキル「Bug Impact Analyzer」では何ができますか?

Analyzes bug fix blast radius. Determines affected code, dependencies, callers/callees, and potential side effects of changes.

TypingMindでBug Impact Analyzerを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Bug Impact Analyzerはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにBug Impact Analyzerをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/dykyi-roman/awesome-claude-code/tree/master/skills/bug-impact-analyzerを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Bug Impact Analyzerを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Bug Impact Analyzerで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもBug Impact Analyzerを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Bug Impact Analyzer」は無料ですか?

はい。dykyi-romanがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇