android-bugfix
Bug-fix playbook for Android apps: reproduce (test or emulator), root cause, minimal fix, regression test, review, commit.
SKILL.mdcodex/skills/android-bugfix/SKILL.md
GitHubRead the project AGENTS.md and applicable global guidance first. Fall back to CLAUDE.md if AGENTS.md is absent. Follow the global rules for optional tools, specialist agents and Git actions.
Bug fix: the user request
Repo facts (modules, build/test commands, app id) come from the project's AGENTS.md.
- Restate the symptom, expected behaviour, and affected variant or device if known. Branch
fix/<ticket>-<slug>. - Locate. An explorer subagent returns the path from symptom to code (screen → ViewModel → use case/repository → API) as
file:lineentries. Then read that whole path yourself, not the first suspicious line, because the subagent reads excerpts.git log -Sfor the change that introduced it. - Reproduce. Prefer a failing unit test in the module that owns the defect. For UI or platform bugs reproduce on the
emulator with
$android-run-app(min-SDK AVD for min-SDK issues) and captureandroid screenandadb logcatexcerpts. Quote the failing output. If the bug does not reproduce, stop and report what you tried and the evidence still needed. Do not ship a speculative fix. - Root cause. One paragraph: what is wrong and why it produces the symptom. If a fix would only mask it (catch-all,
null guard), say so and propose the real fix. Ask
android-researcherwhen a platform behaviour change is suspected. - Fix with the minimal diff. Note refactor candidates as follow-ups instead of doing them. If the test stays red, go back to step 4 rather than stacking changes. After three failed fixes, stop and report what each attempt showed.
- Verify. Failing test now green plus the class's other tests, and the project's compile check. For UI bugs re-run on the
emulator with a screenshot, and hand the screen's journey (if one exists) to the
android-verifieragent and quote its results. A unit-only rerun stays in this session, because the reviewer checks the tests again. - Review.
android-reviewerwith the symptom and root cause as the task statement. Confirm each Blocker and Major against the code first, and decline a refuted one with the counter-evidence. Fix the rest, then re-run the compile check and the affected tests. Send the same reviewer the finding IDs and their "Verified fixed when" criteria to re-review the fix delta. Stop after two re-review rounds and report anything still open. - Commit, only if asked. Follow the shared Git conventions. Do not push unless asked.
- Report: cause, fix, evidence (test before/after, screenshots), regression risk, pre-existing issues noticed.