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

build-and-run-macos-app

GitHub

为 macOS 项目创建或更新本地构建运行脚本,自动检测 Xcode 或 SwiftPM 工程结构,统一封装停止、构建和启动流程,支持多种调试与验证模式。

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

Trigger Scenarios

用户需要标准化 macOS 应用的构建和启动流程 项目缺乏统一的 build_and_run.sh 入口脚本

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
70acd4f
Hash
d8b9dc9c
Indexed
2026-08-20 09:01

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 00:26
浙ICP备14020137号-1 $방문자$