Automated summary
Regenerates the gstack iOS debug bridge artifacts (StateServer.swift, DebugOverlay.swift, Package.swift and the typed @Observable accessors) from upstream templates after a gstack upgrade or after adding new observable properties.
Strengths
- Version detection with early exit when the install is already up to date
- Deterministic regenerator backed by a composite-hash cache (~50 ms no-op when nothing changed)
- Validates before writing: rejects custom types, implicitly unwrapped Optionals, nested observable classes and duplicate snapshot keys
- Explicit failure-mode table, including git restore plus a user prompt when compilation breaks after regen
Limitations
- Assumes the gstack-ios-qa-regen launcher lives at ~/.claude/skills/gstack/bin and that GSTACK_ROOT is resolvable
- Only supports file-scope observable classes and JSON-native field types, which rules out many real-world Swift models
- Final verification (swift build, xcodebuild, device relaunch) is left to the user rather than performed by the skill
Use it after upgrading gstack or adding new @Observable classes or properties that need accessor coverage.
Do not use it for a first-time bridge install (run /ios-qa instead) or to hand-edit internals of the generated package.
Security analysis
CautionThe skill uses Bash, Write/Edit, and build tooling for a legitimate code-regeneration workflow. It does not exfiltrate secrets, use curl|sh, delete broadly, or disable safety. Risk is limited to trusting and running the local gstack regenerator and modifying project files.
- •Executes a local binary via Bash (`gstack-ios-qa-regen`) and rewrites Swift bridge/generated files, so trust depends on the installed gstack tooling.
- •Runs build/verification commands (`swift build`, `xcodebuild`) and relaunches the app; uses user-supplied path and scheme placeholders.
Examples
I just upgraded gstack to the latest version. Resync the iOS debug bridge for the app in ./MyApp and tell me which files changed.Regenerate iOS accessors — I added a ProfileViewModel @Observable class with a displayName String and an avatarURL Optional<String> marked with // @Snapshotable in ./Sources.Update the gstack iOS instrumentation for ./MyApp with --app-source ./MyApp and --bridge-dir ./MyApp/DebugBridge, then run swift build and report any compile errors.name: ios-sync preamble-tier: 2 version: 1.0.0 description: | Regenerate the iOS debug bridge against the latest upstream gstack templates. Updates StateServer.swift, DebugOverlay.swift, Package.swift, and the typed @Observable state accessors. Use after you upgrade gstack or add new ViewModels/properties that need accessor coverage. Use when asked to "resync the iOS debug bridge", "regenerate iOS accessors", or "update the gstack iOS instrumentation". (gstack) voice-triggers:
- "resync the iOS debug bridge"
- "regenerate iOS accessors"
- "update the gstack iOS instrumentation" allowed-tools:
- Bash
- Read
- Write
- Edit
- Glob
- Grep
- AskUserQuestion triggers:
- resync the ios debug bridge
- regenerate ios accessors
- update the gstack ios instrumentation
{{PREAMBLE}}
Resync the iOS debug bridge
After /ios-qa is installed in an app, the user may:
- Add new
@Observableclasses or properties that need accessor coverage. - Upgrade gstack to a newer version with hardening fixes.
- Move the
// @Snapshotablegenerator marker comment to a different field.
This skill regenerates the relevant artifacts in place.
Templates live in upstream gstack. The installed
gstack-ios-qa-regen launcher resolves its own gstack root and copies only
the supported bridge files from ios-qa/templates/. The fork's HTTP-fetch
and wildcard-copy patterns are gone.
Phase 1: Detect installed version
- Read
<app>/DebugBridgeGenerated/.gstack-version(written by /ios-qa during install). If missing, treat the install as "unknown old version". - Read upstream version from
$GSTACK_ROOT/VERSION. - If versions match AND no new
@Observableclasses were added, exit early with "already up to date".
Phase 2: Regenerate codegen output
Run the deterministic regenerator once. --app-source is the directory the
accessor scanner should inspect; --bridge-dir is the local Swift package
that the app links in Debug builds:
~/.claude/skills/gstack/bin/gstack-ios-qa-regen \
--app-source "$APP_SOURCE_DIR" \
--bridge-dir "$APP_SOURCE_DIR/DebugBridge"
The command removes only the known obsolete generated files from the former
flat DebugBridgeGenerated/ layout before emitting the current accessor.
Generation accepts file-scope observable classes and JSON-native scalar,
array, String-keyed dictionary, and Optional field types. It rejects custom
types, implicitly unwrapped Optionals, nested observable classes, and duplicate
snapshot keys before writing a completion marker.
The composite-hash cache key handles whether anything actually needs regenerating; if Swift version, generator git rev, lockfile, source content, and platform triple all match the cache, this is a ~50ms no-op.
Phase 3: Review the generated diff
- Review changes under
<app>/DebugBridge/and<app>/DebugBridgeGenerated/StateAccessor.swift. - Confirm the command did not modify the app's handwritten Swift files.
- Keep app-specific wiring in the app target; canonical bridge package files are regenerated from upstream and should not be hand-edited.
Phase 4: Verify
swift buildsucceeds against the app's package.xcodebuild -scheme <SchemeName>succeeds.- Re-launch the app on the device; daemon connects + rotates token.
GET /state/snapshotreturns the new accessor schema hash.
Failure modes
| Symptom | Action |
|---|---|
| Swift compile fails after regen | Revert via git restore + AskUserQuestion: surface the compile error |
| Codegen reports an invalid marked declaration | Use a file-scope observable class and a writable instance var with an explicit JSON-native type, internal/public setter, and a key unique across models; otherwise remove the // @Snapshotable marker. |
| Schema hash unchanged after adding new @Observable | No field has the standalone // @Snapshotable marker comment — codegen excludes unmarked state correctly. Add the comment immediately above each field that should be snapshotted. |
| Scanner sees generated bridge sources | Pass the narrow app source directory; the regenerator automatically excludes DebugBridgeGenerated and StateAccessor.swift. |
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/regenerate-ios-debug-bridge-mte1lhju/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/regenerate-ios-debug-bridge-mte1lhju' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/regenerate-ios-debug-bridge-mte1lhju/download' --output '.skill-downloads/regenerate-ios-debug-bridge-mte1lhju/SKILL.md.part' && mv '.skill-downloads/regenerate-ios-debug-bridge-mte1lhju/SKILL.md.part' '.skill-downloads/regenerate-ios-debug-bridge-mte1lhju/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/regenerate-ios-debug-bridge-mte1lhju/SKILL.md' && test -s '.skill-downloads/regenerate-ios-debug-bridge-mte1lhju/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ios-sync' && cp -R '.skill-downloads/regenerate-ios-debug-bridge-mte1lhju' '.claude/skills/ios-sync'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/regenerate-ios-debug-bridge-mte1lhju'openskills read 'regenerate-ios-debug-bridge-mte1lhju'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/regenerate-ios-debug-bridge-mte1lhju/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.