build-and-run

build-and-run is a command for Claude Code from sjungling/sjungling-claude-plugins. It costs 22 tokens per session (1,128 once invoked), scanned C, original, MIT.

A command for building an Apple app project in Xcode and then launching it. Xcode is Apple's development tool for making macOS and iOS apps.

In plain words
What is it for?
Use it to build and run the current Xcode workspace or project, targeting macOS or an iOS simulator.
Why use it?
It puts project discovery, scheme selection, background builds, error checking, and running the app into one workflow.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the swift-engineer plugin — 1 skill, 3 commands, 2 agents shipped together

Good fit Use it to build and run the current Xcode workspace or project, targeting macOS or an iOS simulator.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add sjungling/sjungling-claude-plugins
Claude Code
/plugin install swift-engineer

Made for: Claude Code.

Or install swift-engineer, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build-and-run

README.md
[![agentmods](https://agentmods.dev/badge/commands/sjungling/sjungling-claude-plugins/build-and-run/github.svg)](https://agentmods.dev/commands/sjungling/sjungling-claude-plugins/build-and-run)
Your own site
<a href="https://agentmods.dev/commands/sjungling/sjungling-claude-plugins/build-and-run"><img src="https://agentmods.dev/badge/commands/sjungling/sjungling-claude-plugins/build-and-run/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for build-and-run

Your own site · 80×15
<a href="https://agentmods.dev/commands/sjungling/sjungling-claude-plugins/build-and-run"><img src="https://agentmods.dev/badge/commands/sjungling/sjungling-claude-plugins/build-and-run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00022 $0.01128
Opus 5.5 $0.00009 $0.00451
Sonnet 5.5 $0.00004 $0.00226
Haiku 4.5 $0.00002 $0.00113

Measured 19d ago against content hash 0fdb04e56b6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

build-and-run scanned grade C 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 19d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Clearing DerivedData (`rm -rf ~/Library/Developer/Xcode/DerivedData/*`) is a last resort for stale
plugins/swift-engineer/commands/build-and-run.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Build the current Xcode project, fix any build errors, launch it, and confirm it actually started.

Arguments are free-form hints, not positional flags. Match $ARGUMENTS loosely against the real scheme and destination lists once discovered — MyApp, iPhone 17 Pro, My Mac, and MyApp on iPad are all valid. Infer anything not supplied.

Tooling

Prefer Apple's Xcode MCP server (mcp__xcode__*) over shell commands for every operation it covers. It drives a live Xcode instance: scheme and run destination are mutable state, so set the state, then build — there is no destination flag to pass.

Read ${CLAUDE_PLUGIN_ROOT}/commands/references/xcode-mcp.md for the verified tool list, behaviours, and the CLI fallback table. Use the CLI path only when the MCP tools are absent or Xcode is not running.

Workflow

1. Resolve the workspace

XcodeListWorkspaces for what is already open. If nothing is open, find the .xcworkspace (preferred over .xcodeproj) in the working directory and XcodeOpenWorkspace it. Ask only when several candidates exist and the arguments do not disambiguate.

2. Resolve scheme and destination

List schemes and run destinations, then pick:

  • Scheme — from $ARGUMENTS if given, else the already-active scheme, else the one matching the project name. Ask only when genuinely ambiguous. Use disambiguatedName when names collide.
  • Destination — from $ARGUMENTS if given; otherwise a simulator preference declared in the project's CLAUDE.md (phrasings like simulator: iPhone 17 Pro, "preferred simulator", "test on"); otherwise the active destination if eligible; otherwise the newest eligible device for the scheme's platform.

Apply the scheme first, then the destination — switching schemes can move the destination on its own. Read back activeDestinationDisplayTitle rather than assuming the switch held.

Ask the user when a preference was declared but is unavailable, or when the platform is genuinely ambiguous. Offer real entries from the destination list, prioritising the same device family. If no simulator runtimes exist at all, offer to install one (xcodebuild -downloadPlatform iOS) or point at Xcode → Settings → Components.

Read the full file on GitHub · 107 lines

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. 19d ago Changed 0fdb04e56b6a
  2. 2mo ago Changed · +1 lines · +9 tokens per session 6004b79f90d5
  3. 3mo ago First seen · 106 lines · 13 tokens per session scan C dfdca72b76d8

Subscribe to this mod's changes

build-and-run is a command published in the GitHub repository sjungling/sjungling-claude-plugins (15 stars, last pushed 7d ago), licensed MIT. It adds 22 tokens to every session and 1,128 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

build-and-run compared with commands from other repositories

build-and-run next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
build-and-runsjungling/sjungling-claude-pluginsCommand157d agoMITC22Claude Code
app-store-auditmjmirza/app-store-complianceCommand11kyesterdaynoneA35Claude Code
erne-animateJubaKitiashvili/everything-react-native-expoCommand501mo agoMITA21Claude Code
react-nativegetsentry/toolkitCommand985yesterdaynoneA0Claude Code
initialize-iosdefendend/Claude-ast-index-searchCommand60828d agoMITA18Claude Code
kmp-update-design-systemronjunevaldoz/kmp-agent-skillsCommand73d agononeA34Claude Code
mobile-performance-checktungnk123/mobile-best-practicesCommand228mo agoMITA14Claude Code