Interact with Xcode through the xcode-cli CLI backed by the Xcode MCP bridge.
Prerequisites
Xcode 26.3 or later is installed and open with the target project
xcode-cli is installed: npm install -g xcode-cli
Bridge running: xcode-cli-ctl install (background) or xcode-cli-ctl run (foreground)
Commands
All commands: xcode-cli <cmd> [args]. When run from a project directory the matching Xcode tab is auto-selected. Use --tab <tabIdentifier> to override, or run xcode-cli windows to list available tabs. Add --json for JSON output.
Command
Usage
Notes
windows
windows
List tabs/workspaces; get tabIdentifier
status
status
Quick project status (windows + issues)
build
build
Build project
build-log
build-log --severity error
View build errors
run
run
Build first, then run if build succeeds; returns JSON with build errors on failure
run-without-build
run-without-build
Run without building (like Ctrl+Cmd+R)
issues
issues --severity error
Navigator issues
file-issues
file-issues "MyApp/Sources/MyFile.swift"
Single-file diagnostics, no full build
test
test all / test list [--json] / test some "Target::Class/method()"
File paths are relative to the Xcode project structure, not absolute filesystem paths.
If the bridge is not responding: xcode-cli-ctl status then xcode-cli-ctl uninstall && xcode-cli-ctl install.
Use xcode-cli call <toolName> --args '{"key":"value"}' to invoke any MCP tool directly.
run builds via MCP first; if the build fails, it returns the build error JSON and exits with code 1. On success it triggers run-without-build via AppleScript and returns { buildResult, runTriggered }.
run-without-build uses AppleScript to send a keyboard shortcut to Xcode; ensure Accessibility access is granted to Terminal/iTerm in System Settings → Privacy & Security → Accessibility.
Testing: use targetName + identifier from test list --json for exact test targeting. test some only runs tests from the active scheme's active test plan — switch scheme in Xcode if a target is missing.
1---2name: dazuiba-xcode-cli-skill-xcode-cli-skill3description: xcode-cli Skill4---56# xcode-cli Skill78Interact with Xcode through the `xcode-cli` CLI backed by the Xcode MCP bridge.910## Prerequisites1112- Xcode 26.3 or later is installed and open with the target project13- `xcode-cli` is installed: `npm install -g xcode-cli`14- Bridge running: `xcode-cli-ctl install` (background) or `xcode-cli-ctl run` (foreground)1516## Commands1718All commands: `xcode-cli <cmd> [args]`. When run from a project directory the matching Xcode tab is auto-selected. Use `--tab <tabIdentifier>` to override, or run `xcode-cli windows` to list available tabs. Add `--json` for JSON output.1920| Command | Usage | Notes |21|---------|-------|-------|22| `windows` | `windows` | List tabs/workspaces; get `tabIdentifier` |23| `status` | `status` | Quick project status (windows + issues) |24| `build` | `build` | Build project |25| `build-log` | `build-log --severity error` | View build errors |26| `run` | `run` | Build first, then run if build succeeds; returns JSON with build errors on failure |27| `run-without-build` | `run-without-build` | Run without building (like Ctrl+Cmd+R) |28| `issues` | `issues --severity error` | Navigator issues |29| `file-issues` | `file-issues "MyApp/Sources/MyFile.swift"` | Single-file diagnostics, no full build |30| `test` | `test all` / `test list [--json]` / `test some "Target::Class/method()"` | Run/list tests |31| `preview` | `preview "MyApp/Sources/MyView.swift" --out ./out` | SwiftUI preview (requires `#Preview` macro) |32| `snippet` | `snippet "MyApp/Sources/File.swift" "print(expr)" --purpose "Inspect value"` | Execute code snippet in file context; `--purpose` describes why |33| `doc` | `doc "SwiftUI NavigationStack" --frameworks SwiftUI` | Search Apple documentation |34| `read` | `read "path/to/file"` | Read file |35| `ls` | `ls [-r] /` | List directory |36| `grep` | `grep "TODO\|FIXME"` | Search files |37| `glob` | `glob "**/*.swift"` | Find files by pattern |38| `write` | `write "path/to/file" "content"` | Write file |39| `update` | `update "path/to/file" "old" "new" [--replace-all]` | Edit file |40| `mv` | `mv "Old.swift" "New.swift"` | Move/rename file |41| `mkdir` | `mkdir "MyApp/Sources/Feature"` | Create directory |42| `rm` | `rm "MyApp/Sources/Unused.swift"` | Delete file |4344## Notes4546- File paths are relative to the Xcode project structure, not absolute filesystem paths.47- If the bridge is not responding: `xcode-cli-ctl status` then `xcode-cli-ctl uninstall && xcode-cli-ctl install`.48- Use `xcode-cli call <toolName> --args '{"key":"value"}'` to invoke any MCP tool directly.49- `run` builds via MCP first; if the build fails, it returns the build error JSON and exits with code 1. On success it triggers run-without-build via AppleScript and returns `{ buildResult, runTriggered }`.50- `run-without-build` uses AppleScript to send a keyboard shortcut to Xcode; ensure Accessibility access is granted to Terminal/iTerm in System Settings → Privacy & Security → Accessibility.51- Testing: use `targetName` + `identifier` from `test list --json` for exact test targeting. `test some` only runs tests from the active scheme's active test plan — switch scheme in Xcode if a target is missing.5253---54> Source: [dazuiba/xcode-cli-skill](https://github.com/dazuiba/xcode-cli-skill) — distributed by [TomeVault](https://tomevault.io).55<!-- tomevault:4.0:skill_md:2026-06-27 -->
Run npx skillmds@latest add tomevault-io/dazuiba-xcode-cli-skill-xcode-cli-skill in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
xcode-cli Skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.