/core:mobiai-fix-issuefrom core
End-to-end bug fix workflow from issue tracker to PR. Fetches ticket, investigates root cause, applies fix with tests, and verifies. Adapts autonomy to change scope.
Ships in core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
End-to-end workflow for fixing a bug reported in an issue tracker (Jira, GitHub Issues, Linear, etc.). The flow runs all phases in order — understand, reproduce (only if needed), investigate root cause, apply fix, verify, open PR — but the level of user gating adapts to the scope of the change.
You MUST NOT push to a remote branch or open a PR without the user approving the final diff and test evidence. This final gate is non-negotiable for every ticket.For SMALL line-level fixes (clear root cause, ≤5 lines of production change in ≤2 files, no schema / permissions / build-config / API impact): work autonomously through phases 1–6, then gate at Phase 7 (via mobiai-create-pr).
For LARGE changes (multi-file refactors, unclear root cause, new behavior, breaking API, architectural choice): enforce user-approval gates at each phase boundary as detailed below.
The most common failure mode is jumping from the ticket description straight to a fix, or spawning an Explore/sub-agent that returns a confidently wrong diagnosis which is then implemented without verification. Every ticket, including the "obvious" ones, goes through the phased flow — Phases 1 through 6 run end-to-end regardless of scope. The scope assessment only changes whether you wait for user confirmation between phases, not whether you do the work in each phase.
If you think "I already know what this is", you may still be right — but you must still run investigation, reproduce if needed, and verify. What you skip in fast path is the ceremony of asking permission, not the analysis itself.
Before starting Phase 1, classify the task. State your classification to the user in one sentence at the start so they know what to expect:
Fast path — go end-to-end autonomously, gate only before push:
Gated path — stop and wait for user confirmation at each phase boundary:
In doubt → gated path. The cost of an unnecessary gate is small (an extra user confirmation); the cost of applying a risky change without review is large.
Declare the decision upfront:
"Fast path — clear root cause, small scope. Arranco la investigación y te muestro el diff antes de pushear."
or
"Gated path — <reason: unclear root cause / multi-file refactor / new feature / schema change>. Voy a confirmar contigo en cada fase."
You MUST create a task for each of these items and complete them in order. Do not skip phases. Do not merge phases.
Pre-flight: Classify scope — fast path or gated path (Pre-flight above)
mobiai-mobile-debugging and follow its phased flow to completionmobiai-mobile-tdd (test first, then minimal implementation)mobiai-mobile-verification (compile, tests, platform checks)mobiai-create-pr (final user-approval gate before push — always)Before starting, if <repo>/.mobiai/brain/config.json exists, do a quick review pass — you might be about to touch an area that already has a known workaround logged as temporary debt. Proposing a change that conflicts with it (or duplicates it) wastes everyone's time.
Preferred — MCP tool (when mobiai-brain MCP server is registered):
Invoke mobile_review with default args. From the returned overdue list, focus on entries whose platform matches the project's platform and whose area overlaps with the bug's surface (the module or feature you're about to touch). Run mobile_scan first if you don't already know the project's platform.
Fallback — CLI:
mobiai brain review --no-fail
If 1+ overdue entries match, mention them to the user in plain language before Phase 1:
"Heads up — there are N overdue temporary workaround(s) in / that might be related to this bug: . I'll proceed with the fix; let me know if you want me to review those first."
Then continue with Phase 1. Don't pause unless the user asks to. Skip silently when:
.mobiai/brain/config.json).The Graph indexes Kotlin/Swift symbols and ranks files by relevance to a symptom. Used here to acotar the surface of the bug before Phase 1, so the ticket reading already knows which files are central.
Order: Brain → Graph → action. Brain provides historical context (workarounds, past fixes); Graph provides the current code map (which files implement the affected area today).
If <repo>/.mobiai/graph/index.json exists:
# Freshness — if "hace Xd" with X ≥ 1, suggest refresh (don't auto-run):
mobiai graph status
# Locate relevant files from the ticket title / symptom:
mobiai graph context "<ticket title or main symptom>"
# If the ticket names a class/function, locate it:
mobiai graph search <SymbolFromTicket>
The top-ranked files from graph context are the candidates to read in Phase 1. Don't blindly read everything — start with the top 3-5.
If the index is ≥1 day old:
"El índice del Graph es de hace Xd. Si querés resultados frescos, corré
mobiai graph init."
Don't run init autonomously.
If .mobiai/graph/index.json does not exist and the project has .kt or .swift files:
"No veo el índice del Graph. Generalo con
mobiai graph inity arranco — sin él voy a tener que leer más archivos de los necesarios para entender el ticket."
Don't run init autonomously.
Skip silently when:
When mobiai-mobile-debugging runs at Phase 3, it inherits this pre-flight and skips its own Graph check to avoid duplicate prompts.
Get the full issue details before anything else — summary, description, reproduction steps, stack traces, affected versions, attachments.
Jira: Use the Atlassian MCP tools (getJiraIssue, searchJiraIssuesUsingJql) if available, or ask the user to paste the details.
GitHub Issues: Use gh issue view <number> via Bash.
Manual: If no integration, ask the user to paste the issue content.
Then, before touching code:
Detect the platform by checking project structure:
build.gradle(.kts) → Android → load mobiai-android-build and mobiai-android-architecture skills*.xcodeproj / *.xcworkspace → iOS → load mobiai-ios-build and mobiai-ios-architecture skillsshared/ + composeApp/ → KMP → load mobiai-kmp skillpubspec.yaml → Flutter → load mobiai-flutter skillmetro.config.js / app.json + package.json → React Native → load mobiai-react-native skillRead the project's CLAUDE.md or similar configuration for project-specific conventions.
Search for similar past fixes in git history:
git log --oneline --all --grep="<keyword from bug>" | head -20
Present a short summary: what the bug is, which platform(s) it affects, what you understood from the ticket.
Default: skip device/emulator/simulator reproduction. Reproduction is slow (boot, install, navigation) and most bugs are diagnosable from stack traces, logs, or clear descriptions.
Only invoke mobiai-reproduce-bug when:
Otherwise: document the existing evidence (stack trace, logs, description) as the reproduction evidence and move on.
Invoke skill mobiai-mobile-debugging and follow its phased flow. The child skill inherits the scope classification from this task — fast path runs mobiai-mobile-debugging autonomously and returns with the root cause identified; gated path triggers mobiai-mobile-debugging's own confirmation gate at the root-cause step.
Do NOT shortcut investigation regardless of path. Do NOT propose a fix in this phase. Do NOT edit code in this phase. The output is a stated, evidence-backed root cause.
When mobiai-mobile-debugging returns with a root cause, proceed to Phase 4.
Prepare the fix proposal:
Rules for the proposed fix (apply in both paths):
Gate behavior:
Fast path: save the proposal as a short note for the PR description (Phase 7 will use it) and proceed directly to Phase 5. The user will review the full diff + test evidence at Phase 7 before push.
Gated path: present the proposal to the user and ask:
"This is my proposed fix. Do you approve it, or do you want to adjust the scope or approach before I write any code?"
Wait for explicit approval. If the user asks for changes, revise and re-present.
Invoke skill mobiai-mobile-tdd (test first, then minimal implementation).
mobiai-mobile-tdd also inherits the scope classification — fast path runs red-green-refactor autonomously; gated path gates at the appropriate checkpoint.
Invoke skill mobiai-mobile-verification. Do not claim the fix works until this skill has run its checks and you have the evidence in hand.
Platform-specific compile and test commands (handled by mobiai-mobile-verification, listed here for reference):
./gradlew compile<Flavor>DebugKotlin --no-daemon then ./gradlew test<Flavor>DebugUnitTest --no-daemonxcodebuild build and xcodebuild test with the appropriate scheme and simulatorflutter analyze && flutter build apk --debug then flutter testnpx tsc --noEmit then npx jest./gradlew compileKotlin then ./gradlew testIf verification fails, do not rationalize. Return to Phase 3 with the new evidence.
After verification passes, check whether <repo>/.mobiai/brain/config.json exists. If it does NOT, skip this step silently — not every project uses Brain.
If it does, propose saving this fix as a brain bugfix entry to the user. Get one-line approval before running save — never invoke it silently. Use status temporary (with review_after ~2-3 months out) for workarounds that should be revisited; use active for real fixes that should stick.
Preferred — MCP tool (if your client has the mobiai-brain MCP server registered, you'll see this tool in your toolbox):
Invoke mobile_save_bugfix with:
title: short description, e.g. "FirebaseAuth iOS module renaming"platform: android | ios | shared | kmp | flutter | react-nativearea: free-form, e.g. "firebase_auth"status: active | temporaryreview_after: "YYYY-MM-DD" (only when status is temporary)files: array of repo-relative file pathsbody: Markdown with ### Problem / ### Root Cause / ### SolutionFallback — CLI (if MCP isn't configured):
mobiai brain save bugfix \
--title "<short description, e.g. 'FirebaseAuth iOS module renaming'>" \
--platform <android|ios|shared|kmp|flutter|react-native> \
--area <free-form, e.g. firebase_auth> \
--status <active|temporary> \
--review-after <YYYY-MM-DD if temporary> \
--files "<file1>,<file2>" \
--body "### Problem
...
### Root Cause
...
### Solution
..."
The save is the same content the agent already produced for the PR description (Phase 7) — just structured for future retrieval. If the project tracks .mobiai/brain/memories/ in git, the new entry will be staged with the rest of the fix in Phase 7.
Invoke skill mobiai-create-pr. This is the non-negotiable gate for every ticket regardless of path — before pushing, the user will see the full diff plus the context below and must explicitly approve.
What to present to the user at this gate (and include in the PR description):
"always-existed, not a regression" if applicable. Do not leave this ambiguous.Do not push until the user has seen all seven and approved.
Keep the user informed at phase boundaries with a brief status line — what you found, what you're doing next.
No silent progression — the user must be able to follow along even in fast path.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 plugins ship this exact skill · first indexed Jul 20, 2026
22 skills in this plugin
/mobiai-analyze-crashUse when the user shares a crash from any source (stack trace, log, screenshot, error description) and wants to find the root cause and fix it./mobiai-brainUse when the user asks about past decisions, workarounds, bugfixes, testing patterns or integrations specific to *this* project, OR before proposing non-trivial architecture/integration changes. MobiAI Brain is per-project living memory at <repo>/.mobiai/brain/. Loads context the user already captured so suggestions respect real project conventions instead of generic best practices./mobiai-crashlyticsUse when the user shares a Firebase Crashlytics crash link, crash ID, or asks to investigate a Crashlytics issue in depth.npx claudepluginhub arisguimera/mobiai-core --plugin coreOther plugins' skills for the same job