ios-fix
The facts
Its description
Autonomous iOS bug fixer. (gstack) Triggers: fix this ios bug; patch the iphone app; auto-fix the ios issue
The description the agent reads to decide when to use it. Phrases the author says should start it.
When it starts
A person reports a concrete bug in an iOS/SwiftUI app and wants it fixed automatically, or asks to patch the iPhone app, and the agent picks this skill to reproduce, root-cause, fix and regression-test it. It is a hands-on bug-fixing workflow, not a review or QA pass.
Things a person might say (the model's guesses)
- “fix this ios bug: the settings screen crashes when I toggle dark mode”
- “auto-fix the ios issue where the login button does nothing”
- “patch the iphone app, the cart total shows the wrong number”
A model's summary of when it is used.
Tools it may use, or may not
allowed-tools: Bash, Read, Write, Edit, Grep, Glob, AskUserQuestion
Tools it may use while it runs without asking you first.
Runs scripts
bin/gstack-skill-start, scripts/question-registry.ts, bin/gstack-question-preference, bin/gstack-question-log, bin/gstack-skill-end
Scripts the text names. Found by matching words, so treat them as pointers.
Stops for a person
5 lines stop to ask a person
Lines that stop and wait for a person before going on. Found by matching words, so treat them as pointers.
What it leads to
- calls ios-sync on 409 schema_mismatch after rebuild line 167
- requires investigate line 124
- requires ios-qa line 112
Other skills this one hands off to, calls, requires or offers instead, as a model read them.
What leads to it
- gstack hands off to this PROACTIVE all, or user names it gstack, line 251
Other skills that hand off to this one, call it, require it or offer it instead, as a model read them.
Licence
MIT, from LICENSE
The terms its author shares it under, which let it be shown here.
Other files in this skill (1) Close
The text
Most marks come from matching words in the file, so treat them as pointers.
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs -->
Raw lines 1 to 21Boilerplate, lines 22 to 78. The same text appears in 45 other files here. Close
Telemetry (run last)
After workflow completion, log telemetry with ONE command. OUTCOME is success/error/abort/unknown; SESSION_ID and TEL_START are the values the preamble's skill-start output echoed. It also drains the artifacts-sync queue (the former skill-end sync step — do not run gstack-brain-sync separately).
PLAN MODE EXCEPTION — ALWAYS RUN: This writes telemetry to $GSTACK_STATE_ROOT/analytics/, matching preamble analytics writes.
~/.claude/skills/gstack/bin/gstack-skill-end --skill "ios-fix" --outcome OUTCOME \
--session-id "SESSION_ID" --tel-start "TEL_START" --used-browse USED_BROWSE \
--error-message "ERROR_MESSAGE" --failed-step "FAILED_STEP" 2>/dev/null || trueReplace OUTCOME and USED_BROWSE (yes/no) before running; substitute SESSION_ID/TEL_START from the skill-start echoes. ERROR_MESSAGE/FAILED_STEP are "" unless outcome is error. If the command is missing (stale install), skip telemetry — it never blocks the workflow.
Autonomous iOS bug fixer
Raw lines 79 to 101Iron Law
NO FIX WITHOUT A REPRODUCING SNAPSHOT. Before editing any Swift source, the agent MUST capture a GET /state/snapshot that reproduces the bug. That snapshot becomes a regression test fixture (test/fixtures/ios-fix/). A fix that lands without a reproducing snapshot is a fix you'll be re-fixing in three months.
Phase 1: Reproduce the bug
- Read the
/ios-qafinding (bug description, screenshot, suspected accessibility-tree node). - Bring the device into the bug state via
POST /tap,/swipe,/type, orPOST /state/<key>(snapshot-eligible fields only). - Capture
GET /state/snapshot→ write totest/fixtures/ios-fix/<bug-slug>-pre.json. - Capture
GET /screenshot→ write totest/fixtures/ios-fix/<bug-slug>-pre.png. - Persist a one-line description of what's wrong + expected behavior.
Phase 2: Locate root cause
Per /investigate's Iron Law: no fix without root cause. The agent reads the Swift source, traces from the buggy screen back to the view model, the data flow, and the state mutation. Identify the smallest change that fixes the behavior.
Use AskUserQuestion if there are multiple plausible root causes — let the user pick the one to fix.
Raw lines 122 to 131Phase 3: Apply fix
- Edit Swift source. Keep the diff minimal.
- Rebuild:
xcodebuild -scheme <SchemeName> -destination 'platform=iOS,id=<UDID>' build install. - Daemon detects the rebuild and reconnects the StateServer tunnel.
- Re-deploy. The same boot-token rotation flow runs.
Phase 4: Verify
POST /state/restorewith the pre-bug snapshot → reproduces the state.- Take a fresh screenshot. Compare against
test/fixtures/ios-fix/<bug-slug>-pre.png. - If the bug visibly persists, the fix didn't work — revert and try again (max 3 iterations before escalating to the user).
- If the bug is gone, capture
<bug-slug>-post.pngfor the regression test.
Phase 5: Add regression test
Write a regression test with the project's own test runner and conventions (the test command in CLAUDE.md; if it has none, ask the user and record the answer there). The test:
- Loads the pre-bug snapshot.
- Restores it via
POST /state/restore. - Asserts the post-fix behavior on a real device, skipped when no device is connected.
Commit the snapshot fixture + test file alongside the fix.
Raw lines 149 to 161Failure modes
| Symptom | Action |
|---|---|
| 3 iterations, bug still present | STOP, report to user with current best hypothesis |
409 schema_mismatch on /state/restore after rebuild | Regenerate accessors with /ios-sync (gstack-ios-qa-regen), re-snapshot |
| Device disconnects mid-fix | Daemon auto-reconnects; resume from Phase 4 |
| Build fails | Revert Swift edits; investigate compile error before re-applying fix |
From garrytan/gstack at 3f79d81, 2026-11-01. Skills read by DeepSeek V4.1 Flash on 2026-11-04. Summary and techniques by Claude Opus 5.5 on 2026-11-06.