Agent Skills › robinebers/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

触发场景

用户请求创建或更新 macOS 应用的构建运行脚本 需要配置项目的默认构建和运行入口点

安装

npx skills add robinebers/openusage --skill build-and-run-macos-app -g -y
更多选项

非标准路径

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

不安装直接使用

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.

版本历史

  • 70acd4f 当前 2026-08-20 09:01

同 Skill 集合

.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/sol-loop/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

元信息

文件数
0
版本
26132ff
Hash
d8b9dc9c
收录时间
2026-08-20 09:01

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-06 05:04
浙ICP备14020137号-1