Agent Skillsrobinebers/openusage › build-and-run-macos-app

build-and-run-macos-app

GitHub

用于在 macOS 项目中创建或更新 build_and_run.sh 脚本,作为默认构建和运行入口。支持 Xcode 和 SwiftPM,可处理应用停止、构建及启动流程,并提供调试、日志等模式。

.agents/skills/build-and-run-macos-app/SKILL.md robinebers/openusage

Trigger Scenarios

需要为 macOS 项目设置统一的构建和运行脚本 初始化或更新项目的本地构建自动化脚本

Install

npx skills add robinebers/openusage --skill build-and-run-macos-app -g -y
More Options

Non-standard path

npx skills add https://github.com/robinebers/openusage/tree/main/.agents/skills/build-and-run-macos-app -g -y

Use without installing

npx skills use robinebers/openusage@build-and-run-macos-app

指定 Agent (Claude Code)

npx skills add robinebers/openusage --skill build-and-run-macos-app -a claude-code -g -y

安装 repo 全部 skill

npx skills add robinebers/openusage --all -g -y

预览 repo 内 skill

npx skills add robinebers/openusage --list

SKILL.md

Frontmatter
{
    "name": "build-and-run-macos-app",
    "description": "Slash command that creates or updates the project-local macOS `script\/build_and_run.sh` and uses it as the default build\/run entrypoint. Invoke explicitly with \/build-and-run-macos-app — this skill never self-triggers.",
    "disable-model-invocation": true
}

Build And Run macOS App

Create or update the project-local macOS build_and_run.sh script, then use that script as the default build/run entrypoint.

Arguments

  • scheme: Xcode scheme name (optional)
  • workspace: path to .xcworkspace (optional)
  • project: path to .xcodeproj (optional)
  • product: SwiftPM executable product name (optional)
  • mode: run, debug, logs, telemetry, or verify (optional, default: run)
  • app_name: process/app name to stop before relaunching (optional)

Workflow

  1. Detect whether the repo uses an Xcode workspace, Xcode project, or SwiftPM package.
  2. If the workspace is not inside git yet, run git init at the project root so git-backed editor features unlock.
  3. Create or update script/build_and_run.sh so it always stops the current app, builds the macOS target, and launches the fresh result.
  4. For SwiftPM, keep raw executable launch only for true CLI tools; for AppKit/SwiftUI GUI apps, create a project-local .app bundle and launch it with /usr/bin/open -n.
  5. Support optional script flags for --debug, --logs, --telemetry, and --verify.
  6. Follow the canonical bootstrap contract in ../build-run-debug/references/build-script.md for the exact script shape.
  7. Run the script in the requested mode and summarize any build, script, or launch failure.

Guardrails

  • Do not initialize a nested git repo inside an existing parent checkout.
  • Keep the no-flag script path simple: kill, build, run.
  • Use --debug, --logs, --telemetry, or --verify only when the user asks for those modes.

Version History

  • 70acd4f Current 2026-08-20 09:01

Same Skill Collection

.agents/skills/appkit-interop/SKILL.md
.agents/skills/build-run-debug/SKILL.md
.agents/skills/fix-codesign-error/SKILL.md
.agents/skills/liquid-glass/SKILL.md
.agents/skills/macos-appkit-interop/SKILL.md
.agents/skills/macos-build-run-debug/SKILL.md
.agents/skills/macos-liquid-glass/SKILL.md
.agents/skills/macos-packaging-notarization/SKILL.md
.agents/skills/macos-signing-entitlements/SKILL.md
.agents/skills/macos-swiftpm/SKILL.md
.agents/skills/macos-swiftui-patterns/SKILL.md
.agents/skills/macos-telemetry/SKILL.md
.agents/skills/macos-test-triage/SKILL.md
.agents/skills/macos-view-refactor/SKILL.md
.agents/skills/macos-window-management/SKILL.md
.agents/skills/packaging-notarization/SKILL.md
.agents/skills/pricing-update/SKILL.md
.agents/skills/signing-entitlements/SKILL.md
.agents/skills/swiftpm-macos/SKILL.md
.agents/skills/swiftui-patterns/SKILL.md
.agents/skills/telemetry/SKILL.md
.agents/skills/test-macos-app/SKILL.md
.agents/skills/test-triage/SKILL.md
.agents/skills/view-refactor/SKILL.md
.agents/skills/window-management/SKILL.md

Metadata

Files
0
Version
05c40a1
Hash
d8b9dc9c
Indexed
2026-08-20 09:01

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 08:00
浙ICP备14020137号-1 $Carte des visiteurs$