fix-bug | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / fix-bug

fix-bug

maintained by so-ta

star 0 account_tree 0 verified_user MIT License
bolt View GitHub

name: fix-bug description: | Bug fix workflow. Use when fixing bugs, errors, or unexpected behavior. Includes reproduction test creation, fix implementation, and verification.

Bug Fix Workflow

バグ修正時のワークフロー。

ステップ

1. 再現テストを書く

バグを修正する前に、まずバグを再現するテストを書く。

func TestBugXXX_Reproduction(t *testing.T) {
    // Setup
    // Execute
    // Assert - このテストは最初は失敗するはず
}

2. テスト失敗を確認

# Backend
cd backend && go test ./path/to/package/... -v -run TestBugXXX

# Frontend
cd frontend && npm run test:run -- --grep "bug description"

テストが失敗することを確認。

3. コードを修正

バグの原因を特定し、最小限の変更で修正。

4. テスト成功を確認

# Backend
cd backend && go test ./...

# Frontend
cd frontend && npm run check

5. 関連テストを追加

エッジケースのテストも追加:

  • 境界値
  • null/undefined
  • 空配列/空文字列
  • 異常系

6. サービス再起動(Docker環境)

docker compose restart api worker

7. 動作確認

ブラウザまたはcurlで実際に動作確認。

よくあるバグパターン

パターン 確認ポイント
nil/undefined nullチェック漏れ
型変換 暗黙の型変換、JSON.parse
非同期 await漏れ、Promise handling
境界値 off-by-one、空配列
状態管理 race condition、stale state

参考

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 0
GitHub Forks 0
Created Jan 2026
Last Updated il y a 6 mois
tools tools testing

Related Skills

test-driven-development
chevron_right
checking-visuals
chevron_right
write-test
chevron_right
test-tdd
chevron_right
test-msw
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.