swift-package-extension-workflow

swift-package-extension-workflow is a skill for Claude Code, Codex from gaelic-ghost/socket. It costs 46 tokens per session (1,461 once invoked), scanned A, original, Apache-2.0.

A guide to extending Swift Package Manager with build and command plugins, macros, package traits, generated source files, and permission settings.

In plain words
What is it for?
Use it to create or review package plugins and macros, configure traits, inspect generated sources, and plan the handoff between SwiftPM and Xcode.
Why use it?
It helps manage package extensions safely when generated code, sandbox access, network access, or differences between Swift toolchains and Xcode affect the build.

Skill for Claude CodeCodex

Part of the apple-dev-skills plugin — 65 skills, 2 MCP servers shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/gaelic-ghost/socket/swift-package-extension-workflow
Any agent
npx skills add gaelic-ghost/socket --skill swift-package-extension-workflow
Clone the repo
git clone --depth 1 https://github.com/gaelic-ghost/socket

Made for: Claude Code, Codex.

Or install apple-dev-skills, the plugin that ships this one along with the rest of its 65 skills, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swift-package-extension-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaelic-ghost/socket/swift-package-extension-workflow.svg)](https://agentmods.dev/skills/gaelic-ghost/socket/swift-package-extension-workflow)
Your own site
<a href="https://agentmods.dev/skills/gaelic-ghost/socket/swift-package-extension-workflow"><img src="https://agentmods.dev/badge/skills/gaelic-ghost/socket/swift-package-extension-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,461 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00046 $0.01461
Opus 5 $0.00023 $0.00731
Sonnet 5 $0.00009 $0.00292
Haiku 4.5 $0.00005 $0.00146

Measured 2d ago against content hash 812b0a985d71, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

swift-package-extension-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/apple-dev-skills/skills/swift-package-extension-workflow/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Swift Package Extension Workflow

Purpose

Own SwiftPM extension work that does not belong in ordinary package build/run or testing workflows. Keep package plugins, macros, traits, generated-source policy, permission review, and toolchain comparison in one package-first path, then hand off when Xcode-managed project context becomes authoritative.

When To Use

  • Use this skill for build tool plugins, command plugins, plugin products, target plugin usage, and plugin commands.
  • Use this skill for macro targets, macro declaration/implementation boundaries, expansion inspection, diagnostics, and macro tests.
  • Use this skill for package traits, default traits, optional dependencies, conditional compilation, and trait-aware build/test matrices.
  • Use this skill for generated sources, generated build products, plugin sandboxing, write access, or network permissions.
  • Use this skill when the Swiftly-selected toolchain and Xcode-selected toolchain may differ.
  • Recommend swift-package-build-run-workflow for ordinary manifests, dependencies, resources, builds, and executable runs.
  • Recommend swift-package-testing-workflow when ordinary test organization or failure diagnosis is primary.
  • Recommend format-swift-sources for formatter-specific plugin operation after this skill establishes plugin permissions and ownership.
  • Recommend xcode-build-run-workflow or xcode-testing-workflow when schemes, destinations, app hosts, Xcode project context, or Xcode-only evidence controls the result.
  • Recommend explore-apple-swift-docs when the task is documentation lookup rather than package mutation or execution.

Single-Path Workflow

  1. Inspect Package.swift, Plugins/, macro targets, generated outputs, test targets, and any Xcode project or workspace markers.
  2. Establish both toolchain identities before planning commands:
    • Swiftly path: swiftly use --print-location, swift --version, and relevant swift package, swift build, or swift test help.
    • Xcode path: xcode-select -p, xcrun --find swift, xcrun swift --version, and matching xcrun swift package, build, or test help.
    • If Swiftly is set to xcode, record that bridge explicitly instead of presenting the two command paths as independent compiler distributions.
    • Do not assume the two toolchains expose identical SwiftPM commands, flags, manifest APIs, macro support, or plugin behavior.
  3. Read the relevant official SwiftPM, Swift Evolution, or Apple/Xcode documentation and state the behavior relied on before editing.
  4. Classify the primary extension concern as build-tool-plugin, command-plugin, macro, traits, or generated-source.
  5. Run the managed FSX planner through the owning repository recipe for nearest-package resolution and a non-mutating command plan.
  6. Load only the reference needed for the selected concern:
    • plugins: references/package-plugins-build-command-and-xcode.md
    • permissions: references/plugin-permissions-sandbox-and-outputs.md
    • macros: references/swift-macros-package-shape.md
    • traits: references/package-traits-feature-flags.md
    • generated files: references/generated-source-and-build-products.md
  7. Use references/cli-command-matrix.md to keep Swiftly and Xcode commands distinct.
  8. Use Xcode only when the requested operation changes an Xcode scheme, target, build phase, preview, or other Xcode-owned state; co-located Xcode files never change package routing.
  9. Validate the smallest relevant matrix first, then the supported Swift minor window and both host toolchains when the package claims both.
  10. Report the manifest/API floor, selected toolchain, commands run, generated or permission-sensitive outputs, and any handoff.

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 105 lines · 46 tokens per session scan A 812b0a985d71

Subscribe to this mod's changes

swift-package-extension-workflow is a skill published in the GitHub repository gaelic-ghost/socket (7 stars, last pushed 9d ago), licensed Apache-2.0. It adds 46 tokens to every session and 1,461 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

pipeline

Use when the user wants a feature idea taken end-to-end in one autonomous run — phrases like "run the whole pipeline", "take this feature from idea to finished branch", "brainstorm then build it autonomously", "do everything from idea to merged", "implement all phases without stopping". Triggers when they want…

kardebadas/claude-plugin · 80 tokens

craft

Use when a product idea is still vague and needs to become a clear definition of what to build — "let's craft an app like X", "help me define what I actually want", "clarify this idea before we plan it". Also use before planning or implementation when requirements, UX, domain behaviour, or technical preferences have…

kardebadas/claude-plugin · 83 tokens

bug-fix

Use when a bug, regression, or unexpected behaviour is reported and the user wants it fixed end to end — "why is X broken", "this stopped working after Y", "fix this crash". Also use when a symptom is known but its cause is not. Not for building new behaviour, and not for a change whose cause is already proven.

kardebadas/claude-plugin · 74 tokens

bug-investigate

Use when someone wants to know WHY something is broken and has not asked for it to be fixed — "why is this happening", "what's causing this error", "find out what's wrong", "diagnose this before we decide". Also use before committing to a fix, when the cause is unknown and the decision depends on it. Not for fixing …

kardebadas/claude-plugin · 83 tokens

setup

Use when superb's skills need their dependencies installed or checked — "set up superb", "install the dependencies", "why does pipeline say superpowers is missing", after a fresh plugin install, or on a new machine. Also use when a skill fails complaining that a superpowers sub-skill cannot be found.

kardebadas/claude-plugin · 64 tokens

phx-deps-audit

Audit Hex deps for supply-chain security risk — bidi chars, compile-time exec, maintainer changes, typosquats, CVEs. Use after mix deps.update, when checking if a package upgrade is safe, or reviewing mix.lock PR diffs.

oliver-kriska/claude-elixir-phoenix · 58 tokens