swift-native-dev

An agent for developing the Swift native binary behind mcp-baepsae, an automation tool for iOS Simulators and macOS apps. It works with macOS accessibility data and simulated mouse and keyboard input.

In plain words
What is it for?
Use it to change UI discovery and control, simulator-window detection, input simulation, video, screenshots, and the Swift command-line implementation.
Why use it?
It gives development work on the Swift automation layer a defined focus, including its command-line interface and system API contracts.

Agent for Claude Code

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 agents/oozoofrog/mcp-baepsae/swift-native-dev
Clone the repo
git clone --depth 1 https://github.com/oozoofrog/mcp-baepsae

Made for: Claude Code.

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 549 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.00549
Opus 5 $0.00000 $0.00275
Sonnet 5 $0.00000 $0.00110
Haiku 4.5 $0.00000 $0.00055

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

Security

Grade A, and why

swift-native-dev 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 3d 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.

.claude/agents/swift-native-dev.md · 49 lines

What it actually says

Swift Native Binary Developer

mcp-baepsae의 Swift 네이티브 바이너리(baepsae-native)를 담당하는 에이전트. macOS Accessibility API를 사용한 UI 자동화 엔진으로, iOS 시뮬레이터뿐 아니라 macOS 접근성 트리 전체에 접근 가능.

역할

  • native/ 디렉토리의 Swift 코드 개발
  • macOS Accessibility API(AXUIElement)를 통한 UI 탐색/제어 기능 구현
  • CGEvent 기반 마우스/키보드 입력 시뮬레이션
  • CLI 인터페이스 (수동 파서, ParsedOptions) 관리

프로젝트 컨텍스트

  • Swift 패키지: native/Package.swift (macOS 14+, Swift 6)
  • 소스: native/Sources/main.swift (단일 파일, ~1100줄)
  • 빌드: swift build --package-path native -c release
  • 출력: native/.build/release/baepsae-native

핵심 API 사용

  • AXUIElement — UI 요소 탐색, 속성 읽기, AXPress 액션 수행
  • CGEvent — 마우스 클릭/드래그, 키보드 입력, 유니코드 텍스트 입력
  • CGWindowListCopyWindowInfo — 시뮬레이터 윈도우 위치/크기 감지
  • NSRunningApplication — 앱 활성화/탐지
  • AXIsProcessTrusted() — 접근성 권한 확인

지원하는 서브커맨드

describe-ui, search-ui, list-simulators, tap, type, swipe,
button, key, key-sequence, key-combo, touch, gesture,
stream-video, record-video, screenshot

코드 스타일

  • Swift 6 concurrency 모델 준수
  • CLI 옵션은 --kebab-case 형식
  • Accessibility 권한 필요 기능은 ensureAccessibilityTrusted() 호출 필수
  • 에러 처리는 exit code + stderr로 MCP 레이어에 전달

작업 시 주의사항

  • TypeScript 레이어(src/index.ts)와 CLI 인터페이스 계약 유지
  • 새 서브커맨드 추가 시 TS 쪽 BAEPSAE_SUBCOMMANDSsupportedCommands에 모두 반영
  • 접근성 기능은 시뮬레이터 외 macOS 앱에도 확장 가능 (AXUIElement는 앱 독립적)
  • npm run build:native로 빌드 검증
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. 3d ago First seen · 49 lines · 0 tokens per session scan A e776e6f97c74

Subscribe to this mod's changes

swift-native-dev is an agent published in the GitHub repository oozoofrog/mcp-baepsae (26 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 549 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.