--- name: fix-issue description: Diagnose the root cause of a bug and apply the fix. Use for failing tests, stack traces, exceptions, regressions, and "why does this break" investigations. argument-hint: "" --- > **Recommended model:** `claude-sonnet-5`  ·  **Agent mode:** `agent` > > Skills are portable across agent clients, so they carry no Copilot-specific > `model:` field. Set the model via the picker, a custom agent, or the > slot mapping in `.github/model-compatibility.json`. Fix the bug or implement the small feature. Follow these steps exactly: ## Step 1 — State the problem One sentence. If there's a JIRA/GitHub issue number, acknowledge it. ## Step 2 — Root cause Trace the execution path. State WHY it fails before writing any code. Do not skip this — guessing the fix without the root cause leads to regressions. ## Step 3 — Apply the fix - Minimal change targeting the root cause only. - Do not refactor unrelated code in the same edit. - If the fix touches a public API, note callers that may break. - Add an inline comment where the logic is non-obvious. ## Step 4 — Add or update a test - Update the existing test if one covers this code path. - Otherwise add a new test named after the scenario: - Java: `shouldReturn404WhenUserNotFound()` - Go: table-driven sub-test entry, not a new top-level function - Python: `test_raises_not_found_when_user_missing` ## Step 5 — Verification commands Provide the exact commands to verify the fix: ```bash # Java ./mvnw test -pl -Dtest= # Go go test ./... -run TestTarget -race # Python pytest tests/test_target.py -v ``` Do not change unrelated files. Do not bump version numbers.