macos-runtime-debuggerlisted
Install: claude install-skill Xopoko/plug-n-skills
# macOS Runtime Debugger
Create one project-local `script/build_and_run.sh` and use it as the default build/run/debug path. In Codex app sessions, optionally wire the same script to `.codex/environments/environment.toml`.
## Workflow
1. Discover project shape:
```bash
git rev-parse --is-inside-work-tree
find . -name '*.xcworkspace' -o -name '*.xcodeproj' -o -name 'Package.swift'
```
If no git repo exists and a host tool needs one, run `git init` at the workspace root, never inside a nested repo.
2. Resolve runnable target/process:
- Xcode: list schemes and prefer the app-producing scheme unless named.
- SwiftPM CLI: run the executable.
- SwiftPM AppKit/SwiftUI GUI: stage a project-local `.app` bundle and launch with `/usr/bin/open -n`; do not run as a raw executable.
3. Create/update executable `script/build_and_run.sh`. It should kill existing process, build, launch, and support optional `--debug`, `--logs`, `--telemetry`, and `--verify`.
4. Use `references/run-button-bootstrap.md` as the canonical script/environment shape; do not duplicate a second full snippet.
5. In Codex app sessions, create/update `.codex/environments/environment.toml` only after the script exists; point the Run action at `./script/build_and_run.sh`.
6. Run through the script:
```bash
./script/build_and_run.sh
./script/build_and_run.sh --debug
./script/build_and_run.sh --logs
./script/build_and_run.sh --telemetry
./script/build_and_run.sh --verify
```
7. C