Token导航 LogoToken导航TokenDH.com
运维和基础设施敏感数据github未标认证来源可访问clear审计通过

macos-spm-app-packagingmacOS SPM 应用 packaging

Agent Skill

macos-spm-app-packaging 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

16,704

周安装

696

GitHub Stars

3,392

下载量

5,568
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:macos-spm-app-packaging(macOS SPM 应用 packaging)
来源仓库:https://github.com/dimillian/skills
仓库路径:skills/macos-spm-app-packaging
安装命令:
npx skills add https://github.com/dimillian/skills --skill macos-spm-app-packaging
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/dimillian/skills --skill macos-spm-app-packaging

简介

使用 shell 脚本和模板完全在 Xcode 之外构建、打包和签署基于 SwiftPM 的 macOS 应用程序。

  • 在 asset/templates/bootstrap/ 中包含一个最小的 SwiftPM 项目框架
  • 包含 Package.swift、Sources 结构和版本配置,可供重命名和自定义
  • 提供6个核心打包脚本:package_app.sh
  • 对于 .app 捆绑包程序集,compile_and_run.sh
  • 对于开发迭代,sign-and-notarize.sh
  • 用于发布签名和 Apple 公证,以及 make_appcast.sh
  • Sparkle 更新源
  • 涵盖从构建到代码签名、公证、装订和 GitHub 发布发布的完整发布管道,每个阶段都有验证检查点
  • 包括常见公证失败(重复提交、权利不匹配、强化运行时问题)的故障排除指南以及通过 MENU_BAR_APP 提供的菜单栏应用程序支持
  • 旗帜

SKILL.md

macOS SwiftPM App Packaging (No Xcode)

Overview

Bootstrap a complete SwiftPM macOS app folder, then build, package, and run it without Xcode. Use assets/templates/bootstrap/ for the starter layout and references/packaging.md + references/release.md for packaging and release details.

Two-Step Workflow

  1. Bootstrap the project folder

- Copy assets/templates/bootstrap/ into a new repo. - Rename MyApp in Package.swift, Sources/MyApp/, and version.env. - Customize APP_NAME, BUNDLE_ID, and versions.

  1. Build, package, and run the bootstrapped app

- Copy scripts from assets/templates/ into your repo (for example, Scripts/). - Build/tests: swift build and swift test. - Package: Scripts/package_app.sh. - Run: Scripts/compile_and_run.sh (preferred) or Scripts/launch.sh. - Release (optional): Scripts/sign-and-notarize.sh and Scripts/make_appcast.sh. - Tag + GitHub release (optional): create a git tag, upload the zip/appcast to the GitHub release, and publish.

Minimum End-to-End Example

Shortest path from bootstrap to a running app:

# 1. Copy and rename the skeleton
cp -R assets/templates/bootstrap/ ~/Projects/MyApp
cd ~/Projects/MyApp
sed -i '' 's/MyApp/HelloApp/g' Package.swift version.env

# 2. Copy scripts
cp assets/templates/package_app.sh Scripts/
cp assets/templates/compile_and_run.sh Scripts/
chmod +x Scripts/*.sh

# 3. Build and launch
swift build
Scripts/compile_and_run.sh

Validation Checkpoints

Run these after key steps to catch failures early before proceeding to the next stage.

After packaging (Scripts/package_app.sh):

# Confirm .app bundle structure is intact
ls -R build/HelloApp.app/Contents

# Check that the binary is present and executable
file build/HelloApp.app/Contents/MacOS/HelloApp

After signing (Scripts/sign-and-notarize.sh or ad-hoc dev signing):

# Inspect signature and entitlements
codesign -dv --verbose=4 build/HelloApp.app

# Verify the bundle passes Gatekeeper checks locally
spctl --assess --type execute --verbose build/HelloApp.app

After notarization and stapling:

# Confirm the staple ticket is attached
stapler validate build/HelloApp.app

# Re-run Gatekeeper to confirm notarization is recognised
spctl --assess --type execute --verbose build/HelloApp.app

Common Notarization Failures

SymptomLikely CauseRecovery
The software asset has already been uploadedDuplicate submission for same versionBump BUILD_NUMBER in version.env and repackage.
Package Invalid: Invalid Code Signing EntitlementsEntitlements in .entitlements file don't match provisioningAudit entitlements against Apple's allowed set; remove unsupported keys.
The executable does not have the hardened runtime enabledMissing --options runtime flag in codesign invocationEdit sign-and-notarize.sh to add --options runtime to all codesign calls.
Notarization hangs / no status emailxcrun notarytool network or credential issueRun xcrun notarytool history to check status; re-export App Store Connect API key if expired.
stapler validate fails after successful notarizationTicket not yet propagatedWait ~60 s, then re-run xcrun stapler staple.

Templates

  • assets/templates/package_app.sh: Build binaries, create the.app bundle, copy resources, sign.
  • assets/templates/compile_and_run.sh: Dev loop to kill running app, package, launch.
  • assets/templates/build_icon.sh: Generate.icns from an Icon Composer file (requires Xcode install).
  • assets/templates/sign-and-notarize.sh: Notarize, staple, and zip a release build.
  • assets/templates/make_appcast.sh: Generate Sparkle appcast entries for updates.
  • assets/templates/setup_dev_signing.sh: Create a stable dev code-signing identity.
  • assets/templates/launch.sh: Simple launcher for a packaged.app.
  • assets/templates/version.env: Example version file consumed by packaging scripts.
  • assets/templates/bootstrap/: Minimal SwiftPM macOS app skeleton (Package.swift, Sources/, version.env).

Notes

  • Keep entitlements and signing configuration explicit; edit the template scripts instead of reimplementing.
  • Remove Sparkle steps if you do not use Sparkle for updates.
  • Sparkle relies on the bundle build number (CFBundleVersion), so BUILD_NUMBER in version.env must increase for each update.
  • For menu bar apps, set MENU_BAR_APP=1 when packaging to emit LSUIElement in Info.plist.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.41%
按下载量换算1,638

OpenCode

22.25%
按下载量换算1,239

Codex

19.22%
按下载量换算1,070

Gemini CLI

12.88%
按下载量换算717

Cursor

8.07%
按下载量换算449

Antigravity

3.3%
按下载量换算184

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills