Agent skill

Build Run Debug

by robinebers in robinebers/openusage

Build, run, and debug local macOS apps and desktop executables using shell-first Xcode and Swift workflows.

MITAuto-check passedMobile

Install Build Run Debug

skills CLI
$ npx skills add robinebers/openusage --skill build-run-debug -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install robinebers/openusage build-run-debug --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/robinebers/openusage.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/build-run-debug .claude/skills/build-run-debug && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
build-run-debug
GitHub stars
4.3k
Token cost
~1.8k tokens
SKILL.md length
905 words
Files
2 (incl. references)
Skills in repo
25
Repo updated
First seen
Licence
MIT

At a glance

Build, run, and debug local macOS apps and desktop executables using shell-first Xcode and Swift workflows.

  • Works in 7 steps: Discover the project shape. → Resolve the runnable target and process… → Create or update script/build_and_run.sh. → …
  • Asked to build a Mac app
  • SKILL.md covers Quick Start, Workflow, Preferred Commands and References, plus 2 more sections
  • Calls swift, git and xcodebuild

What it does

Build Run Debug is an agent skill from robinebers/openusage. Build, run, and debug local macOS apps and desktop executables using shell-first Xcode and Swift workflows. Use when asked to build a Mac app, launch it, diagnose compiler or linker failures, inspect startup problems, or debug desktop-only runtime issues.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/build-script.md`).

It sits in Mobile, covering iOS development. It works with macOS, Xcode, Git and Swift. The repository describes itself as: Burning through your subscriptions too fast? Paying for stuff you never use? Stop guessing. OpenUsage is free and open source. The licence is MIT.

When your agent uses it

  • Asked to build a Mac app
  • Diagnose compiler
  • Linker failures
  • Inspect startup problems

Example prompts

  • “/build-run-debug”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Discover the project shape.
  2. Resolve the runnable target and process name.
  3. Create or update script/build_and_run.sh.
  4. Build and run through the script.
  5. Summarize failures correctly.
  6. Debug the right way.
  7. Use Xcode-aware MCP tooling only when it helps.

What it can do on your machine

Read from SKILL.md and the folder at commit cb21465. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • swift
    • git
    • xcodebuild

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Build Run Debug loads about 1.8k tokens when it runs, and up to ~2.8k if it reads all its reference files. Until then it costs about 68 tokens; SKILL.md has 905 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from robinebers/openusage at commit cb21465, republished under its MIT licence (© robinebers). 905 words, ~1,797 tokens.

Download SKILL.mdSave it as .claude/skills/build-run-debug/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
build-run-debug
description
Build, run, and debug local macOS apps and desktop executables using shell-first Xcode and Swift workflows. Use when asked to build a Mac app, launch it, diagnose compiler or linker failures, inspect startup problems, or debug desktop-only runtime issues.

Build / Run / Debug

Quick Start

Use this skill to set up one project-local script/build_and_run.sh entrypoint, then use that script as the default build/run path.

Prefer shell-first workflows:

  • ./script/build_and_run.sh as the single kill + build + run entrypoint once it exists
  • xcodebuild for Xcode workspaces or projects
  • swift build plus raw executable launch inside that script for true SwiftPM command-line tools
  • swift build plus project-local .app bundle staging and /usr/bin/open -n launch for SwiftPM AppKit/SwiftUI GUI apps
  • optional script flags for lldb, log stream, telemetry verification, or post-launch process checks

Do not assume simulators, touch interaction, or mobile-specific tooling.

If an Xcode-aware MCP surface is already available and the user explicitly wants it, use it only where it fits. Keep that usage narrow and honest: prefer it for Xcode-oriented discovery, logging, or debugging support, and do not force simulator-specific workflows onto pure macOS tasks.

Workflow

  1. Discover the project shape.

    • Check whether the workspace is already inside a git repo with git rev-parse --is-inside-work-tree.
    • If no git repo is present, run git init at the project/workspace root before building so git-backed editor features unlock. Never run git init inside a nested subdirectory when the current workspace already belongs to a parent repo.
    • Look for .xcworkspace, .xcodeproj, and Package.swift.
    • If more than one candidate exists, explain the default choice and the ambiguity.
  2. Resolve the runnable target and process name.

    • For Xcode, list schemes and prefer the app-producing scheme unless the user names another one.
    • For SwiftPM, identify executable products when possible.
    • Split SwiftPM launch handling by product type:
      • use raw executable launch only for true command-line tools,
      • use a generated project-local .app bundle for AppKit/SwiftUI GUI apps.
    • Determine the app/process name to kill before relaunching.
  3. Create or update script/build_and_run.sh.

    • Make the script project-specific and executable.
    • It should always:
      1. stop the existing running app/process if present,
      2. build the macOS target,
      3. launch the freshly built app or executable.
    • Add optional flags for debugging/log inspection:
      • --debug to launch under lldb or attach the debugger
      • --logs to stream process logs after launch
      • --telemetry to stream unified logs filtered to the app subsystem/category
      • --verify to launch the app and confirm the process exists with pgrep -x <AppName>
    • Keep the default no-flag path simple: kill, build, run.
    • Prefer writing one script that owns this workflow instead of repeatedly asking the agent to manually run swift build, locate the artifact, then invoke an ad hoc run command.
    • For SwiftPM GUI apps, make the script build the product, create dist/<AppName>.app, copy the binary to Contents/MacOS/<AppName>, generate a minimal Contents/Info.plist with CFBundlePackageType=APPL, CFBundleExecutable, CFBundleIdentifier, CFBundleName, LSMinimumSystemVersion, and NSPrincipalClass=NSApplication, then launch with /usr/bin/open -n <bundle>.
    • For SwiftPM GUI --logs and --telemetry, launch the bundle with /usr/bin/open -n first, then stream unified logs with /usr/bin/log stream --info ....
    • Do not recommend direct SwiftPM executable launch for AppKit/SwiftUI GUI apps.
    • Use references/build-script.md as the canonical source for the script shape. Do not fork a second authoritative snippet in another skill or command.
    • Keep the run script outside app source. It belongs in script/build_and_run.sh, not in App/, Views/, Models/, Stores/, Services/, or Support/.
  4. Build and run through the script.

    • Default to ./script/build_and_run.sh.
    • Use ./script/build_and_run.sh --debug, --logs, --telemetry, or --verify when the user asks for debugger/log/telemetry/process verification support.
  5. Summarize failures correctly.

    • Classify the blocker as compiler, linker, signing, build settings, missing SDK/toolchain, script bug, or runtime launch.
    • Quote the smallest useful error snippet and explain what it means.
  6. Debug the right way.

    • Use the script's --logs or --telemetry mode for config, entitlement, sandbox, and action-event verification.
    • For SwiftPM GUI apps, if the app bundle launches but its window still does not come forward, check whether the entrypoint needs NSApp.setActivationPolicy(.regular) and NSApp.activate(ignoringOtherApps: true).
    • Use the script's --debug mode or direct lldb if symbolized crash debugging is needed.
    • If the user needs to instrument and verify specific window, sidebar, menu, or menu bar actions, switch to telemetry.
    • Keep evidence tight and user-facing.
  7. Use Xcode-aware MCP tooling only when it helps.

    • If the user explicitly asks for XcodeBuildMCP and it is already available, prefer it over ad hoc setup.
    • Use the MCP for Xcode-aware discovery or debug/logging workflows when the available tool surface clearly matches the task.
    • Fall back to shell commands immediately when the MCP does not provide a clean macOS path.
Show full SKILL.md (195 more words)Show less

Preferred Commands

  • Project discovery:
    • find . -name '*.xcworkspace' -o -name '*.xcodeproj' -o -name 'Package.swift'
  • Scheme discovery:
    • xcodebuild -list -workspace <workspace>
    • xcodebuild -list -project <project>
  • Build/run:
    • ./script/build_and_run.sh
    • ./script/build_and_run.sh --debug
    • ./script/build_and_run.sh --logs
    • ./script/build_and_run.sh --telemetry
    • ./script/build_and_run.sh --verify

References

  • references/build-script.md: canonical script/build_and_run.sh shapes for SwiftPM CLI tools and SwiftPM AppKit/SwiftUI GUI apps.

Guardrails

  • Prefer the narrowest command that proves or disproves the current theory.
  • Do not leave the user with a one-off manual command chain once a stable build_and_run.sh script can own the workflow.
  • Do not launch a SwiftUI/AppKit SwiftPM GUI app as a raw executable unless the user explicitly wants to diagnose that failure mode: it can produce no Dock icon, no foreground activation, and missing bundle identifier warnings. Keep raw executable launch only for true command-line tools.
  • Do not claim UI state you cannot inspect directly.
  • Do not describe mobile or simulator workflows as if they apply to macOS.
  • If build output is huge, summarize the first real blocker and point to follow-up commands.

Output Expectations

Provide:

  • the detected project type
  • the script path you configured, if applicable
  • the command you ran
  • whether build and launch succeeded
  • the top blocker if they failed
  • the smallest sensible next action

© robinebers, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/build-run-debug of robinebers/openusage.

  • SKILL.md
  • references/build-script.md

Open the folder on GitHubat commit cb21465

Compare with similar skills

Build Run Debug next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Build Run Debug compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Build Run Debug this skillrobinebers/openusage4.3k—~1.8kAutomated safety check: PassMIT
macOS Spm App PackagingDimillian/Skills4k5 repos~1.2kAutomated safety check: PassMIT
Build Afmscouzi1966/maclocal-api345—~1.8kAutomated safety check: NotesMIT
Bootstrap iOSRayFernando1337/rayfernando-skills130—~1.1kAutomated safety check: PassApache-2.0
Swift Developmentaiskillstore/marketplace430—~1.8kAutomated safety check: PassNone
Orca iOS Simulator Controlstablyai/orca87k1 repos~584Automated safety check: PassApache-2.0

Similar skills

  • macOS Spm App Packaging

    Dimillian/Skills

    Scaffold, build, and package SwiftPM-based macOS apps without an Xcode project.

    4k GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Build Afm

    scouzi1966/maclocal-api

    Build AFM from scratch — submodules, patches, webui, and Swift build.

    345 GitHub stars~1.8k tokensUpdated 3 days ago
    MobileAuto-check: notes
  • Bootstrap iOS

    RayFernando1337/rayfernando-skills

    Bootstrap agents for iOS, iPadOS, macOS, Swift, SwiftUI, SwiftData/Core Data, Swift Testing, Xcode build/test/debug, Simulator, App Intents, or XcodeBuildMCP work.

    130 GitHub stars~1.1k tokensUpdated 2 mo ago
    MobileAuto-check passed
  • Swift Development

    aiskillstore/marketplace

    Comprehensive Swift development for building, testing, and deploying iOS/macOS applications.

    430 GitHub stars~1.8k tokensUpdated yesterday
    MobileAuto-check passed
  • iOS Simulator control from inside Orca, with the live device view in Orca's emulator pane. Use when driving a booted Apple Simulator on macOS: taps, gestures…

    87k GitHub starsUsed in 1 repo~584 tokens
    MobileAuto-check passed
  • Official

    Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    MobileAuto-check passed

More from robinebers/openusage

All 25 skills in this repo
  • Swiftui Patterns

    robinebers/openusage

    Best practices and example-driven guidance for building native macOS SwiftUI scenes and components, including windows, commands, toolbars, settings, split views, inspectors, menu bar extras, and…

    4.3k GitHub stars~3.4k tokensUpdated 2 days ago
    Auto-check passed
  • macOS Telemetry

    robinebers/openusage

    Add and verify lightweight macOS runtime telemetry. An agent skill from robinebers/openusage.

    4.3k GitHub stars~934 tokensUpdated 2 days ago
    Auto-check passed
  • Release Swift

    robinebers/openusage

    Cut a release of OpenUsage (Swift menu-bar app): pick a version, generate a categorized changelog, tag from main, and publish the GitHub Release with notes.

    4.3k GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Telemetry

    robinebers/openusage

    Add lightweight runtime telemetry and debug instrumentation to macOS apps, then verify those events after building and running.

    4.3k GitHub stars~977 tokensUpdated 2 days ago
    Auto-check passed
  • Window Management

    robinebers/openusage

    Customize macOS 15+ SwiftUI windows and scene behavior using Window, WindowGroup, and macOS window modifiers.

    4.3k GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Appkit Interop

    robinebers/openusage

    Decide when and how to bridge a macOS app from SwiftUI into AppKit.

    4.3k GitHub stars~741 tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Build Run Debug

What does Build Run Debug do?

Build, run, and debug local macOS apps and desktop executables using shell-first Xcode and Swift workflows. Build Run Debug is an agent skill from robinebers/openusage. Build, run, and debug local macOS apps and desktop executables using shell-first Xcode and Swift workflows.

When should I use Build Run Debug?

Build Run Debug fits situations like: asked to build a Mac app; diagnose compiler; linker failures; inspect startup problems.

How do I install Build Run Debug in Claude Code?

Run `npx skills add robinebers/openusage --skill build-run-debug -a claude-code`. Or copy the skill folder (.agents/skills/build-run-debug in robinebers/openusage) into .claude/skills/build-run-debug in your project. Claude Code loads it when a task matches its description.

How do I install Build Run Debug in Codex?

Run `npx skills add robinebers/openusage --skill build-run-debug -a codex`. Or copy the skill folder (.agents/skills/build-run-debug in robinebers/openusage) into .agents/skills/build-run-debug in your project. Codex loads it when a task matches its description.

Can I use Build Run Debug in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add robinebers/openusage --skill build-run-debug -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/build-run-debug, .gemini/skills/build-run-debug, .github/skills/build-run-debug and .opencode/skills/build-run-debug in your project.

What does Build Run Debug need to run?

Going by SKILL.md and its folder, Build Run Debug needs the command-line tools its instructions call (swift, git and xcodebuild).

Does Build Run Debug access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Build Run Debug safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Build Run Debug use?

Build Run Debug is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Build Run Debug use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1k tokens, read only when the agent opens those files.

What are the alternatives to Build Run Debug?

Skills that share tags, products or a category with Build Run Debug: macOS Spm App Packaging (Dimillian/Skills, 4k stars), Build Afm (scouzi1966/maclocal-api, 345 stars), Bootstrap iOS (RayFernando1337/rayfernando-skills, 130 stars) and Swift Development (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Build Run Debug?

robinebers (a GitHub user) maintains it in robinebers/openusage, which has 4,333 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 6, 2026.

Source: robinebers/openusage on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.