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.
npx agentmods add agents/debugswift/xcodebazelmcp/gotchasgit clone --depth 1 https://github.com/DebugSwift/XcodeBazelMCPWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01503 |
| Opus 5 | $0.00000 | $0.00751 |
| Sonnet 5 | $0.00000 | $0.00301 |
| Haiku 4.5 | $0.00000 | $0.00150 |
Grade B, and why
gotchas scanned grade B with 1 finding 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 yesterday.
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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- **Screenshot limitation**: No `devicectl` subcommand exists for screenshots. `idevicescreenshot` fails with "Invalid service" (iOS 17+ DDI change). Workaround: `sudo pymobiledevice3 remote tunneld` in background → `pym How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Gotchas & Known Issues
Build & Config
- Don't hardcode
--config=testin test/coverage commands — not all projects define that Bazel config. Users pass it viaconfigsarray if needed. dist/must be rebuilt after source changes —npm run buildregenerates it.npm run lintuses ESLint 9 flat config —--ext .tsflag is invalid. Justeslint src.scaffold.ts:moduleBazelalways generates withneedsAppleRules = true— the template parameter was removed since it was never actually used.
Simulator
xcrun simctl iodoes NOT support UI interaction commands (tap, swipe) — only screenshots, video recording, IO port enumeration.rules_appleplaces.appbundles inside<target>_archive-root/Payload/—findAppBundlemust search recursively.- Simulator tools (
set_simulator_location,set_simulator_appearance) should useresolveSimulator()to support bothsimulatorIdandsimulatorName. - The Simulator.app window position matters for CGEvent — events are posted to absolute screen coordinates.
Device
xcrun devicectl list devicePairsis deprecated/invalid in modern Xcode. Usexcrun devicectl list devices.listDevicePairsincore/devices.tsis misleadingly named — it runsdevicectl list devices, same aslistDevices.- iOS 17+ / macOS 15+: Apple replaced
lockdownd/usbmuxdwith CoreDevice (remoted).devicectlis the only CLI that works reliably.idevicescreenshot,idevicesyslog, andpymobiledevice3(withouttunneld) cannot connect to devices — even over USB. - Screenshot limitation: No
devicectlsubcommand exists for screenshots.idevicescreenshotfails with "Invalid service" (iOS 17+ DDI change). Workaround:sudo pymobiledevice3 remote tunneldin background →pymobiledevice3 developer dvt screenshot <path> --udid <UDID>. - Log limitation:
idevicesyslogcannot connect to iOS 17+ devices.startDeviceLogCapture()now triespymobiledevice3 syslog livefirst (with 1.5s early-exit detection for failures), falling back toidevicesyslogfor older devices. - Process termination:
devicectl device info processesonly returnsexecutable(file:// URL) andprocessIdentifier— nobundleIdentifier. Must lookup app executable name viadevicectl device info appsfirst, then match by executable path. - Device names with Unicode: Smart quotes in device names (e.g.,
Matheus\u2019s iPhone) must be normalized to ASCII apostrophes before string comparison. - Build for device:
buildCommandArgs()must exclude simulator-specific flags (--ios_simulator_device,sim_arm64) whenplatform === 'device'. Device builds use--ios_multi_cpus=arm64. - Implicit Bazel targets:
findAppBundle()handles both//pkg:target(explicit) and//pkg(implicit, where target name = last path component).
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.
- yesterday First seen · 64 lines · 0 tokens per session scan B f6989ab7fcce
gotchas is an agent published in the GitHub repository DebugSwift/XcodeBazelMCP (7 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,503 tokens. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
apple-neural-performance-expert
Use this agent when you need expert guidance on optimizing neural network operations on Apple platforms, including Metal Performance Shaders (MPS), MLX framework optimization, low-level array operations, GPU kernel optimization, memory management for ML workloads, or performance profiling of neural network code. This…
code-search-ast-grep
Use this agent when you need to search for specific code patterns, syntax structures, or text across files in the current directory. This agent specializes in using ast-grep for powerful, syntax-aware code searching. Examples:\n\n \nContext: An agent needs to find all function definitions that match a certain…
task-agents
The primary agent workflow — inference setup resolution, the automation switch, evidence-first execution, tool policy, and the proposal/confirmation loop.
persistence-and-sync
The agent.sqlite entity and link model, bulk-read chunking, and exactly what leaves the device.
ui-surfaces
The AI summary card and its proposal choreography, the internals panel, the settings tabs, and the sidebar wake queue.
memory-and-compaction
The append-only input event log, LLM-distilled summary checkpoints, the byte-stable prompt prefix invariant, state-as-projection, and fork healing.