Agent Skillsrobinebers/openusage › macos-swiftpm

macos-swiftpm

GitHub

指导在macOS上使用Swift Package Manager构建、运行和测试Swift包。适用于无Xcode项目或Package.swift为主入口的场景,涵盖构建、执行及测试流程与故障排查。

.agents/skills/macos-swiftpm/SKILL.md robinebers/openusage

Trigger Scenarios

需要构建SwiftPM包 需要运行Swift可执行文件 需要运行Swift测试

Install

npx skills add robinebers/openusage --skill macos-swiftpm -g -y
More Options

Non-standard path

npx skills add https://github.com/robinebers/openusage/tree/main/.agents/skills/macos-swiftpm -g -y

Use without installing

npx skills use robinebers/openusage@macos-swiftpm

指定 Agent (Claude Code)

npx skills add robinebers/openusage --skill macos-swiftpm -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": "macos-swiftpm",
    "description": "Build, run, and test SwiftPM macOS packages and executables. Use when the repo is package-first or has no Xcode project."
}

SwiftPM for macOS

Quick Start

Use this skill when Package.swift is the primary entrypoint or when SwiftPM is the fastest path to a reproducible result.

Workflow

  1. Inspect the package.

    • Read Package.swift.
    • Identify executable, library, and test products.
  2. Build with SwiftPM.

    • Use swift build by default.
    • Use release mode only when the user explicitly needs it.
  3. Run the right product.

    • Use swift run <product> when an executable exists.
    • If multiple executables exist, explain the default choice.
  4. Test narrowly.

    • Use swift test.
    • Apply filters when a specific test target or case is known.
  5. Summarize failures.

    • Module/import resolution
    • Package graph or dependency issue
    • Linker failure
    • Runtime failure
    • Test regression

Guardrails

  • Prefer SwiftPM over Xcode when both exist and the package path is clearly simpler.
  • Do not assume an app bundle exists in a pure package workflow.
  • Explain when the package is library-only and therefore not directly runnable.

Output Expectations

Provide:

  • the package products you found
  • the command you ran
  • whether build, run, or test succeeded
  • the top blocker if not

Version History

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

Same Skill Collection

.agents/skills/appkit-interop/SKILL.md
.agents/skills/build-and-run-macos-app/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-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
3f732960
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 $방문자$