Install
$ agentstack add skill-gaelic-ghost-socket-sync-swift-package-guidance ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Sync Swift Package Guidance
Purpose
Bring an existing Swift package repository up to the expected guidance baseline without stretching the package bootstrap skill into an ongoing repo-guidance surface. This skill owns deterministic AGENTS.md creation or bounded section append behavior for existing SwiftPM repos and runs maintain-project-repo with the swift-package profile alongside that guidance. scripts/run_workflow.py is the runtime entrypoint, and scripts/sync_swift_package_guidance.py applies the current sync behavior.
Companion Plugin Requirement
This skill can be discovered from a standalone apple-dev-skills install, but its mutating guidance-sync path refreshes repo-maintenance files through the companion productivity-skills plugin. Before giving filesystem-level fallback instructions, first check the skills exposed in the current Codex session and use the harness-discovered productivity-skills:maintain-project-repo workflow when it is available. If the companion skill is not exposed, tell the user to add the socket marketplace with codex plugin marketplace add gaelic-ghost/socket, then install the relevant plugins from Codex's plugin directory so future sessions expose both apple-dev-skills and productivity-skills.
When To Use
- Use this skill when an existing Swift package repo needs
AGENTS.mdadded, refreshed, or merged with the current SwiftPM workflow baseline. - Use this skill when the repository already has
Package.swiftand the user wants package workflow guidance, onboarding rules, or repo policy brought up to date. - Use this skill when the user wants the repo guidance that used to be implied by the Swift package bootstrap flow to be made explicit in an existing package repo.
- Do not use this skill for brand-new package creation from nothing.
- Do not use this skill for ordinary package development, builds, tests, diagnostics, or dependency changes.
- Do not use this skill for Xcode app repos, workspaces, or native Apple app projects.
- Recommend
bootstrap-swift-packagewhen the package repo does not exist yet. - Recommend
swift-package-build-run-workfloworswift-package-testing-workflowwhen the task is ordinary package execution rather than repo guidance sync. - Recommend
xcode-build-run-workflowwhen the task is Xcode-managed package build, run, toolchain, Metal, or mutation work rather than repo guidance sync. - Recommend
xcode-testing-workflowwhen the task is Xcode-managed package test execution or test diagnosis rather than repo guidance sync. - Recommend
sync-xcode-project-guidancewhen the repo is an Xcode app project instead of a plain Swift package. - After updating this plugin's package-policy surfaces, recommend rerunning
sync-swift-package-guidancein downstream repos so theirAGENTS.mdandmaintain-project-repooutput stay aligned. - For maintainer notes about this repository itself, say plainly that the repo exports from top-level
skills/today and does not ship repo-local installer workflows.
Single-Path Workflow
- Collect the required inputs:
repo_root- optional
skip_validation - optional
dry_run
- Classify the request as existing Swift package guidance sync before continuing:
- continue only when the repo already contains
Package.swift - stop if the request is really new-package bootstrap or Xcode app-repo guidance sync
- stop if the repo boundary is ambiguous because both package and Xcode app markers are present at the same root
- Apply the Apple and Swift docs gate before shaping workflow guidance:
- read the relevant SwiftPM and Swift documentation first
- use Xcode MCP
DocumentationSearchor Xcode-local documentation first for Apple-owned SwiftPM, PackageDescription, SDK, framework, lifecycle, and Xcode behavior - use Dash MCP or Dash HTTP next when installed local Swift, SwiftPM, package, or Apple docsets are a better fit
- use official Swift project documentation, GitHub/source repositories, generated DocC, or release notes when the relevant Swift package or tool is open source and available there
- use official Apple web docs only when the page content is actually readable through a capable source; generic no-JS web search/open results, snippets, metadata shells, or bare URLs are not enough
- state the documented workflow boundary being relied on before proposing repo guidance changes
- current documented anchors for this workflow include:
- Swift Package Manager overview: Swift Package Manager
- package manifest structure: PackageDescription
- package manifest entrypoint: Package
- if the docs and the current guidance template conflict, stop and report that conflict
- if no relevant SwiftPM docs can be found, say that explicitly before proceeding
- Apply the shared Swift-package policy before making repo-guidance changes:
- apply the detailed local policy in
references/snippets/apple-swift-package-core.md - preserve its explicit
swiftLanguageModes: [.v6]package-manifest default and prefer that spelling over the legacyswiftLanguageVersionsalias on current manifest surfaces - preserve its default
swift-configurationpackage guidance: depend onhttps://github.com/apple/swift-configurationfrom1.2.0, enable.defaults,Reloading,YAML, andCommandLineArguments, and add theConfigurationproduct to the primary target unless the package has a concrete reason to remove it - preserve its optional
swift-configurationtrait note:PropertyListis available for property-list configuration parsing, andLoggingis available when configuration access should integrate withSwiftLog.Logger - preserve its simplicity-first Swift, SwiftPM, logging, telemetry, testing, package-resource, Metal handoff, and Debug/Release guidance
- Run
scripts/run_workflow.pyto normalize inputs, detect whether the repo is really SwiftPM-managed, and shape the sync plan. - Apply the sync path:
- if
AGENTS.mdis missing, copyassets/AGENTS.md - if
AGENTS.mdexists and already contains the managed section, keep the file unchanged - if
AGENTS.mdexists but lacks the managed section, appendassets/append-section.mdas a bounded section
- Validate the synced repo guidance:
- verify
AGENTS.mdexists - verify the synced file mentions
bootstrap-swift-package - verify the synced file mentions
sync-swift-package-guidance - verify the synced file preserves
swift buildandswift testas default validation paths
- Refresh
maintain-project-repo:
- refresh
scripts/repo-maintenance/ - refresh
.github/workflows/validate-repo-maintenance.yml - preserve repo-specific extra scripts that are not part of the managed file set
- Verify the synced maintenance guidance still points at the expected maintainer files:
.swiftformatscripts/repo-maintenance/hooks/pre-commit.samplescripts/repo-maintenance/validate-all.shscripts/repo-maintenance/sync-shared.shscripts/repo-maintenance/release.sh- protected branches, when configured, require the GitHub Actions check context
validaterather thanValidate Repo Maintenance / validate - when a GitHub remote exists, route repository settings audit or mutation
through productivity-skills:maintain-github-repository
- Hand off ongoing package work cleanly:
- prefer
swift-package-build-run-workfloworswift-package-testing-workflowfor ordinary package work after guidance sync - recommend
xcode-build-run-workfloworxcode-testing-workflowonly when package work needs Xcode-managed SDK, toolchain, or test behavior - recommend
bootstrap-swift-packageonly when the user actually needs a fresh repo instead of guidance sync
Inputs
repo_root: optional absolute or relative path to the repository root; defaults to.skip_validation: optional flag to skip post-sync file validationdry_run: optional flag to emit the planned contract without writing files- Defaults:
- runtime entrypoint: executable
scripts/run_workflow.py repo_root=.when omittedwriteMode=sync-if-needed- validation runs unless
--skip-validationis passed - successful mutating runs install
.codex/environments/swift-package.tomlfromtemplates/codex-local-environments/swift-package.tomlwhen missing, leave matching files unchanged, and preserve customized existing files - successful mutating runs refresh
maintain-project-repooutput in place
Outputs
statussuccess: guidance sync completed or was already satisfiedblocked: prerequisites, repo classification, or sync policy prevented completionfailed: the sync path started but did not complete successfullypath_typeprimary: the documented sync path completedfallback: a non-mutating guided result was returnedoutput- resolved repo root
- detected package and Xcode markers
AGENTS.mdpath- actions applied or planned
- installed or preserved
.codex/environments/swift-package.toml - refreshed
maintain-project-repopaths - validation result
- one concise next step or handoff
Guards and Stop Conditions
- Stop with
blockedif the repo root cannot be resolved. - Stop with
blockedif the repo does not containPackage.swift. - Stop with
blockedif the repo root looks ambiguous because it contains bothPackage.swiftand Xcode app markers. - Stop with
blockedif the chosenwriteModedoes not allow the mutation the repo still needs, such as creating a missingAGENTS.mdor appending the bounded Swift package guidance section. - Stop with
blockedif the targetAGENTS.mdpath exists but is not a regular file. - Fail with a clear message if the Codex local environment template is missing or the target
.codex/environments/swift-package.tomlpath exists but is not a regular file.
Fallbacks and Handoffs
- The only current fallback is a non-mutating dry-run or guided result that explains what the sync would do.
- After a successful sync, use
swift-package-build-run-workfloworswift-package-testing-workflowfor ordinary package work by default. - After a successful sync, use
scripts/repo-maintenance/validate-all.shfor local maintainer validation andscripts/repo-maintenance/release.sh --mode standard --version vX.Y.Zfrom a feature branch or worktree for protected-main releases. - After a successful sync, configure protected branches to require
validatefor the managed repo-maintenance workflow; GitHub exposes that job check context directly rather than the workflow title plus job string. - When a GitHub remote exists, use
productivity-skills:maintain-github-repository
to audit repository features, merge modes, security automation, sign-off policy, and branch protection without changing visibility implicitly.
- Recommend
xcode-build-run-workflowwhen package work needs Xcode-managed SDK or toolchain behavior. - Recommend
xcode-testing-workflowwhen package work needs Xcode-managed test execution behavior. - Recommend
bootstrap-swift-packagewhen the repository still needs to be created from scratch. - Recommend
sync-xcode-project-guidancewhen the repo root is really an Xcode app project rather than a plain Swift package.
Codex Subagent Fit
When the user explicitly asks for subagents, swift-steward, review-packet planning, or asks to keep working while broad Swift package repo-maintenance discovery happens in parallel, use the swift-steward custom-agent role for read-heavy discovery before this skill applies guidance sync.
Good swift-steward jobs for this skill:
- classify the package shape and flag ambiguous SwiftPM/Xcode boundaries
- inspect
AGENTS.md, README, CONTRIBUTING, ROADMAP,Package.swift,.swiftformat,.swiftlint.yml, andscripts/repo-maintenance/ - compare current repo guidance against this skill's current SwiftPM baseline
- return a review packet with proposed patch set, validation handoff, affected files, and blockers
Keep apply-mode edits in the main thread. The steward may return proposed patch-set entries, but the main agent should review them with the user before saving, editing, or applying any edits.
Customization
- Use
references/customization-flow.md. scripts/customization_config.pystores and reports customization state.scripts/run_workflow.pyloads runtime-safe defaults from customization state before invoking the supported sync path.- The current runtime-enforced customization surface is one
writeModeknob that controls whether the workflow may create missingAGENTS.md, append the bounded Swift package section, or stay report-only. - Run the Python wrapper and customization entrypoints through
uv, because they rely on inlinePyYAMLscript metadata rather than a repo-global Python environment. - In consuming repos, the supported path is
uv run scripts/run_workflow.py ...anduv run scripts/customization_config.py ...; do not assume plainpythonorpython3will have the needed YAML dependency installed.
References
Workflow References
references/project-detection.md
Contract References
references/automation-prompts.mdreferences/customization-flow.md
Support References
assets/AGENTS.mdassets/append-section.md- Recommend
references/snippets/apple-swift-package-core.mdwhen an existing Swift package repo needs the reusable baseline policy content in a human-reviewable form. references/snippets/apple-swift-package-core.mdtemplates/codex-local-environments/swift-package.toml
Script Inventory
scripts/run_workflow.pyscripts/sync_swift_package_guidance.pyscripts/customization_config.py
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: gaelic-ghost
- Source: gaelic-ghost/socket
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.