sim-guard
Guardrails for AI agents that use iOS simulators, so parallel agents don't melt the Mac. Use before any session boots, builds to, runs on, taps through or screenshots an iOS simulator (Xcode MCP, xcodebuild, simctl, XcodeBuildMCP, ios-simulator-mcp, Maestro), and when the user asks why the Mac is hot, slow or out of memory.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 21 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/annayal-consumerxai/sim-guard with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/annayal-consumerxai/sim-guard'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/annayal-consumerxai--sim-guard)HTML
<a href="/listings/annayal-consumerxai--sim-guard"><img src="/api/listings/annayal-consumerxai--sim-guard/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
brew install mobai-app/tap/simslim git clone https://github.com/annayal-consumerxai/sim-guard ~/.claude/skills/sim-guard ~/.claude/skills/sim-guard/sim-guard.sh init
`init` picks 2 iPhone sims on your newest iOS runtime and slims them. StoreKit, push and universal links stay on, so paywalls and deep links still work.
For Codex, clone it anywhere and add a line to `AGENTS.md` telling agents to read `sim-guard/SKILL.md` before touching a simulator.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 33 lines
- ---
- name: sim-guard
- description: Guardrails for AI agents that use iOS simulators, so parallel agents don't melt the Mac. Use before any session boots, builds to, runs on, taps through or screenshots an iOS simulator (Xcode MCP, xcodebuild, simctl, XcodeBuildMCP, ios-simulator-mcp, Maestro), and when the user asks why the Mac is hot, slow or out of memory.
- ---
- # sim-guard
- A stock iOS simulator idles at about 3.5 GB and 130+ processes. Five agents booting their own sims will take a 32 GB Mac down. These rules keep it to a small pool of slim sims.
- The script is `sim-guard.sh` in this folder. It needs `simslim` (`brew install mobai-app/tap/simslim`).
- ## First time on a machine
- Run `sim-guard.sh init`. It picks 2 iPhone sims on the newest iOS runtime, writes them to `~/.config/sim-guard/pool`, and slims them with simslim. Slim sims keep StoreKit, push and universal links on, so paywalls and deep links still work.
- ## Rules for every agent
- 1. **Preflight first.** Before building to or booting a simulator, run `sim-guard.sh preflight`. Exit 1 means blocked. Don't boot anything.
- 2. **Hard cap of 2 booted sims machine-wide** (`SIM_CAP` changes it). Preflight also blocks when Mac memory free is under 25%. When blocked, wait, reuse a pool sim this session already owns, or ask the user. Never boot a third.
- 3. **Use the pool, never create sims.** Get one with `sim-guard.sh acquire`. It prints `ACQUIRED <udid>`. Pass that UDID everywhere: xcodebuild `-destination id=<udid>`, the Xcode MCP run destination, simulator MCP tools. Never `simctl create` or clone a sim for a task. Don't `simctl erase` either, it can drop the slim profile.
- 4. **Release after every run.** `sim-guard.sh release <udid>` removes user-installed apps, resets the keychain and shuts the sim down. Add `--keep-apps` only when the user wants to keep using the app.
- 5. **Orphans.** Any booted sim outside the pool is an orphan. Audit prints the shutdown command. Run it only when you're sure no other live agent is using that sim. Sims carry no owner tag, so ask the user if unsure.
- 6. **One agent per sim.** Two agents tapping the same sim corrupt each other's runs.
- ## Auditing
- `sim-guard.sh audit` lists every booted sim with UDID, name, runtime, RAM, CPU, slim or not, pool or orphan, plus Mac memory free. `simslim top` is the live view.
- Prompt to give any agent: "Run `sim-guard.sh audit`. Report count, UDIDs, names, runtimes, RAM and slim state. Flag orphans and give the shutdown commands, but don't run them."
- ## Overnight or multi-agent jobs
- The orchestrator runs `sim-guard.sh audit` between waves and holds the next wave while preflight is blocked. That gets you the "monitor RAM and tell agents to free sims" behaviour without paying for an always-on agent.
README.md · README · 50 lines
- # sim-guard
- Run Claude Code, Codex or Cursor agents on iOS apps without cooking your Mac.
- Every agent that builds an iOS app wants its own simulator. A stock one idles at about 3.5 GB of RAM and 130+ processes. Run a few agents in parallel and your laptop turns into a space heater.
- sim-guard is an agent skill plus one bash script. It caps how many sims can be booted, makes agents share a small pool of slimmed sims instead of creating new ones, and cleans each sim up after a run.
- On my M5 Pro, a pool sim boots at 382 MB and 57 processes. The stock sim next to it was using 3.5 GB.
- ## What it does
- - Caps booted sims at 2 machine-wide and refuses to boot when Mac memory free drops under 25%
- - Keeps a fixed pool of sims, slimmed with [simslim](https://github.com/MobAI-App/simslim), so agents never create a sim per task
- - Wipes user apps and the keychain, then shuts the sim down after every run
- - Audits what's booted: RAM, CPU, slim or not, and which sims are orphans no agent owns
- ## Install
- ```bash
- brew install mobai-app/tap/simslim
- git clone https://github.com/annayal-consumerxai/sim-guard ~/.claude/skills/sim-guard
- ~/.claude/skills/sim-guard/sim-guard.sh init
- ```
- `init` picks 2 iPhone sims on your newest iOS runtime and slims them. StoreKit, push and universal links stay on, so paywalls and deep links still work.
- For Codex, clone it anywhere and add a line to `AGENTS.md` telling agents to read `sim-guard/SKILL.md` before touching a simulator.
- ## Commands
- ```
- sim-guard.sh init [N] pick N pool sims and slim them
- sim-guard.sh audit what's booted, how heavy, who owns it
- sim-guard.sh preflight exit 1 if at the cap or memory is low
- sim-guard.sh acquire boot a free pool sim, print its UDID
- sim-guard.sh release <udid> wipe apps + keychain, shut down
- ```
- Settings are env vars: `SIM_CAP` (default 2), `MIN_FREE_PCT` (default 25), `SIMSLIM_EXCEPT` (default `store,web`), `SIM_GUARD_CONFIG` (default `~/.config/sim-guard/pool`).
- ## Heads up
- `release` uninstalls every user app on that sim. That's the point, but don't point it at a sim you use by hand.
- ## Credit
- The heavy lifting is [simslim](https://github.com/MobAI-App/simslim) by MobAI, which turns off the simulator daemons you don't need. sim-guard is the set of rules for agents on top of it. The rules came out of an X thread on parallel agents melting Mac Studios.
- MIT. Made by [An Nayal](https://annayal.com) ([@consumerxai](https://x.com/consumerxai)). More free tools at [annayal.com/open-source](https://annayal.com/open-source).
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.