macos-runtime-debug

A command that creates or refreshes a reusable macOS script for building, launching, logging, or checking a project. It supports Xcode workspaces and projects as well as Swift Package Manager applications.

In plain words
What is it for?
Setting up a macOS build-and-run loop, stopping and relaunching an app, viewing logs, probing telemetry, or verifying a project.
Why use it?
It avoids repeating project-specific build and launch steps while preserving existing schemes, arguments, and scripts.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/xopoko/build-swift-apps/macos-runtime-debug
Clone the repo
git clone --depth 1 https://github.com/Xopoko/build-swift-apps
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 511 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00511
Opus 5 $0.00000 $0.00255
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

Measured 2d ago against content hash 161fc473b688, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

macos-runtime-debug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/macos-runtime-debug.md · 36 lines

How it starts

The opening of the file, as written. The whole thing — 36 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/macos-runtime-debug

Explicitly bootstrap or refresh a reusable project-local macOS script/build_and_run.sh loop. For a one-shot build, launch, log, or debug task, use macos-runtime-debugger directly instead of invoking this bootstrap command.

Arguments

  • scheme: Xcode scheme name (optional)
  • workspace: path to .xcworkspace (optional)
  • project: path to .xcodeproj (optional)
  • product: SwiftPM executable product name (optional)
  • mode: run, debug, logs, macos-telemetry-probe, or verify (optional, default: run)
  • app_name: process/app name to stop before relaunching (optional)
  • run_action: add or update a Codex Run action after the script exists (optional, default: false)

Workflow

  1. Detect whether the repo uses an Xcode workspace, Xcode project, or SwiftPM package.
  2. Inspect and preserve existing run scripts, schemes, arguments, and host actions; reuse their working project-specific details instead of replacing them blindly.
  3. Create or update script/build_and_run.sh so it stops the current app, builds the macOS target, and launches the fresh result.
  4. For SwiftPM, keep raw executable launch only for true CLI tools; for AppKit/SwiftUI GUI apps, create a project-local .app bundle and launch it with /usr/bin/open -n.
  5. Support optional script flags for --debug, --logs, --telemetry, and --verify.
  6. Follow the canonical bootstrap contract in ../skills/macos-runtime-debugger/references/run-button-bootstrap.md for the exact script shape.
  7. When run_action is true, add or update the Codex Run action after the script exists; otherwise leave Codex environment configuration unchanged.
  8. Run the script in the requested mode and summarize any build, script, or launch failure.

Guardrails

  • Do not initialize source control as part of this bootstrap.
  • Preserve an established entrypoint unless the user explicitly asks to replace it.
  • Do not leave stale Run actions pointing at old script paths.
  • Keep the no-flag script path simple: kill, build, run.
  • Use --debug, --logs, --telemetry, or --verify only when the user asks for those modes.

Read the full file on GitHub · 36 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 36 lines · 0 tokens per session scan A 161fc473b688

Subscribe to this mod's changes

macos-runtime-debug is a command published in the GitHub repository Xopoko/build-swift-apps (45 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 511 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.