name: ios-clean preamble-tier: 2 version: 1.0.0 description: | Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. Cleans up StateServer, DebugOverlay, accessor codegen output, and app-side hooks installed by /ios-qa. This is a convenience wrapper — the structural Release-build guard (Package.swift conditional + CI swift build -c release check) is the safety-critical path. Use when asked to "clean the iOS debug bridge", "remove DebugBridge", or "strip the gstack iOS instrumentation". (gstack) voice-triggers:
- "clean the iOS debug bridge"
- "remove DebugBridge"
- "strip the gstack iOS instrumentation" allowed-tools:
- Bash
- Read
- Edit
- Glob
- Grep
- AskUserQuestion triggers:
- clean the ios debug bridge
- remove debugbridge
- strip the gstack ios instrumentation
{{PREAMBLE}}
Strip the DebugBridge from an iOS app
This skill is a convenience flow, not a safety mechanism. The structural
guard against shipping DebugBridge in Release is in Package.swift.template
(.when(configuration: .debug)) plus the CI invariant test that runs
swift build -c release and asserts the DebugBridge symbol is absent. Both
ship as part of /ios-qa's template installation.
This skill exists for developers who:
- Manually copied DebugBridge files (without using
/ios-qa's SPM install). - Want a guided, reversible removal flow before a security audit.
- Are migrating away from gstack and want a clean exit.
What it removes
Each item is reverted only after AskUserQuestion confirmation:
- The
DebugBridgeSPM target fromPackage.swift. - The
#if DEBUGblock in the app's@mainentry that callsDebugBridgeManager.shared.start(). - Any standalone
// @Snapshotablegenerator marker comments on the canonical app state class. - Generated
StateAccessor.swiftfiles anywhere under the app source. - The
gstack-ios-qa.tokenfile underNSTemporaryDirectory()on the device (best-effort — only works if device is connected when /ios-clean runs).
What it does NOT touch
- App business logic, view models, view code.
- Anything outside
#if DEBUGblocks. - Other test or QA infrastructure.
Phase 1: Inventory
- Glob for
import DebugBridgeacross the app source. - Glob for
#if DEBUG ... DebugBridgeManagerblocks. - Glob for
// Auto-generated state accessorheaders inStateAccessor.swiftfiles. - Parse
Package.swiftfor the DebugBridge dependency entry. - Show the user what's about to be removed (file list + line counts). AskUserQuestion: proceed, dry-run, or abort.
Phase 2: Remove
For each item the user approved:
- Use Edit tool to strip the import + the
#if DEBUGblock (keep the surrounding code intact). - Use Edit tool to remove the
.package(url:...DebugBridge...)entry fromPackage.swiftand anytargetsreferencing"DebugBridge". - Delete generated
StateAccessor.swiftfiles. - Run
xcodebuild -scheme <SchemeName> -destination 'platform=iOS,id=<UDID>' build install -configuration Releaseto verify Release builds without the bridge. If it fails on a missing DebugBridge symbol, the removal was incomplete — STOP and report.
Phase 3: Verify
! grep -r "DebugBridge" <app-source-dir>(no matches).! grep -r "@Snapshotable" <app-source-dir>(no matches).swift build -c releasesucceeds.nm -jon the built binary doesn't show DebugBridge symbols.
Report the cleanup result + a one-line summary of what got removed.
Reversibility
Every Edit + delete is a git operation; the user can git restore to undo.
This skill never force-pushes, never amends, never deletes the SPM cache —
those are user choices.
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.