swiftpm-macos — Codex skill: what it does, how to install
Builds, runs, and tests SwiftPM macOS packages and executables. Use it when Package.swift is the main entry point and no Xcode project is present.
npx skills add openai/plugins --skill swiftpm-macos -a codexWhat swiftpm-macos does
The skill reads Package.swift first and identifies the package products: executables, libraries, and test targets. It then runs swift build; when an executable product exists, it uses swift run <product>. Release mode is reserved for an explicit request.
Testing uses swift test, with a filter when a specific target or test case is known. The agent reports the products it found, the commands it ran, and whether build, run, or test succeeded. Failures are grouped around module or import resolution, package dependencies, the linker, runtime behavior, or test regressions.
SwiftPM is preferred when the package path is simpler than Xcode. A library-only package cannot be run directly, so check its products before asking for a run.
What it helps with
- build a package with SwiftPM
- run an executable package product
- narrow tests to a known case
- trace a build failure to its source
- inspect products declared in
Package.swift
Example prompts for the agent
- Inspect `Package.swift`, build the package, and report the products you find.
- Run the right executable with `swift run <product>` and explain the choice if there is more than one.
- Run `swift test`, identify the failure, and classify it as a dependency, linker, runtime, or test issue.
How to install swiftpm-macos
1Skills CLI (Vercel)
npx skills add openai/plugins --skill swiftpm-macos -a codex2Manually: put the files in place
.agents/skills/swiftpm-macos/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/plugins --skill swiftpm-macos -a claude-code2Manually: put the files in place
~/.claude/skills/swiftpm-macos/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swiftpm-macos/
Manually: put the files in place
.cursor/skills/swiftpm-macos/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/plugins swiftpm-macos2Manually: put the files in place
.github/skills/swiftpm-macos/SKILL.mdPlatform CLI
gemini skills install https://github.com/openai/plugins --path plugins/build-macos-apps/skills/swiftpm-macosManually: put the files in place
.devin/skills/swiftpm-macos/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set201
The whole set →Similar
Questions about swiftpm-macos
How do I install swiftpm-macos in Codex?
Run npx skills add openai/plugins --skill swiftpm-macos, then npx skills add openai/plugins --skill swiftpm-macos -a codex. The skill file will be at .agents/skills/swiftpm-macos/SKILL.md.
What does swiftpm-macos do?
It inspects Package.swift, builds with swift build, runs an executable product with swift run <product>, and checks the package with swift test. It also explains the main blocker when a step fails.
Can it run a package that contains only libraries?
No. A library-only package has no product to run directly, and the skill calls this out when it inspects the package.
Source text
SKILL.md · MIT
--- name: swiftpm-macos 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
© OpenAI · MIT · openai/plugins