sim-guard

An agent skill and bash script that caps how many iOS Simulators can boot, shares a pool of slimmed simulators, and cleans each one after a run, so parallel coding agents do not overload a Mac.

View on GitHub ↗
Stars
★ 14
Last commit
21 Nov 2026
Maintenance
Active
Licence
MIT
Category
Agent Skills
GitHub
annayal-consumerxai/sim-guard

Overview

sim-guard is an agent skill and a single bash script for Macs where several coding agents build and run iOS apps at once. Each agent often wants its own simulator, and a stock simulator is heavy. The skill caps how many simulators may be booted, makes agents share a fixed pool of slimmer simulators instead of creating new ones, and cleans each simulator after a run.

Slimming is done with simslim, a separate MIT-licensed tool from MobAI. sim-guard is the set of rules on top: preflight checks, a shared pool, and a release step. The README's example figures (a pool simulator at 382 MB and 57 processes, against 3.5 GB for a stock one) were measured by the author on an M5 Pro. Treat them as one person's measurements, not a guarantee.

The project is very new. The repository was created on 20 Nov 2026 and has no tagged release yet.

sim-guard is licensed under the MIT licence.

Features

  • A machine-wide cap on booted simulators, default 2 (SIM_CAP), and a refusal to boot when free Mac memory drops under 25 per cent (MIN_FREE_PCT).
  • A pool of simulators, chosen on init from iPhone simulators on your newest iOS runtime and slimmed with simslim. By default StoreKit, push and universal links stay on, so paywalls and deep links still work.
  • sim-guard.sh acquire boots a free pool simulator and prints its UDID, which the agent should pass to xcodebuild and to simulator MCP tools. Agents are told not to create, clone or erase simulators, because that can drop the slim profile.
  • sim-guard.sh release uninstalls user apps, resets the keychain and shuts the simulator down. That is deliberate; the README warns you not to point it at a simulator you use by hand. --keep-apps keeps the apps if you need them.
  • sim-guard.sh preflight exits with code 1 when the cap is reached or memory is low, so an agent can stop rather than boot another simulator.
  • sim-guard.sh audit lists booted simulators with UDID, name, runtime, RAM, CPU, whether they are slim, and whether they are pool members or orphans.
  • Settings live in environment variables, with the pool file at ~/.config/sim-guard/pool by default.

Requirements

  • A Mac with Xcode and at least one iOS Simulator runtime.
  • simslim, installed with brew install mobai-app/tap/simslim.
  • An agent that will read SKILL.md before it touches a simulator (Claude Code, Codex or Cursor).

Install

  1. Install simslim with brew install mobai-app/tap/simslim.

  2. For Claude Code, clone the repository into ~/.claude/skills/sim-guard, then run ~/.claude/skills/sim-guard/sim-guard.sh init. init picks two iPhone simulators on your newest iOS runtime and slims them. You can pass a different count.

  3. For Codex, clone the repository anywhere and add a line to AGENTS.md telling agents to read sim-guard/SKILL.md before touching a simulator.

Example

Before an agent builds to a simulator, it should run sim-guard.sh preflight, then sim-guard.sh acquire and use the printed UDID as the run destination. When the run is finished, it should call sim-guard.sh release with that UDID. To see what is booted, run sim-guard.sh audit.

Works with

Claude CodeCodexCursor

Listed in

Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.

Report a correction

More in this category