fix-bug
Bug fix workflow. Use when fixing bugs, errors, or unexpected behavior. Includes reproduction test creation, fix implementation, and verification.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
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 |
参考
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!