bootstrap-swift-package
Bootstrap Swift Package
Overview
Create a new Swift package quickly with repeatable defaults. Prefer the bundled script for deterministic setup.
Workflow
- Confirm package intent.
- Ask for package
name,type(library,executable, ortool), destination path, platform preset (mac,mobile,multiplatform), and version profile (latest-major,current-minus-one,current-minus-two). - Accept aliases:
macosformac,iosformobile,bothformultiplatform, andlatest/minus-one/minus-twofor version profiles.
- Create the package.
- Preferred: run
scripts/bootstrap_swift_package.sh --name <Name> --type <library|executable|tool> --destination <dir> --platform <mac|macos|mobile|ios|multiplatform|both> --version-profile <latest-major|current-minus-one|current-minus-two|latest|minus-one|minus-two>. - Fallback: run
swift package init --name <Name> --type <library|executable|tool>manually inside the target directory, patchPackage.swiftplatforms, copyassets/AGENTS.mdto repo root asAGENTS.md, then rungit init.
- Validate bootstrap output.
- Verify
Package.swiftexists. - Verify
.gitexists. - Verify
AGENTS.mdexists. - Verify
Tests/exists. - Run
swift buildandswift testin the package root.
- Report result.
- Summarize created path, package type, platform preset, version profile, build/test status, and immediate next steps.
Defaults
- Use
libraryunless the user clearly asks forexecutableortool. - Use
multiplatformunless the user clearly wants onlymacormobile. - Use
current-minus-oneas the default version profile. - Keep generated structure minimal; do not add extra frameworks unless requested.
- Always initialize git.
- Always include
AGENTS.mdwith repository expectations for working with Swift Package Manager and Swift packages.
Automation Prompting
- Codex App automation fit: Guarded. Prefer event-driven or explicit scaffold requests over frequent recurring schedules.
- Codex CLI automation fit: Strong. Use deterministic
codex execprompts with explicit placeholders and strict scope. - Use
references/automation-prompts.mdfor ready-to-use Codex App and Codex CLI templates. - Keep schedule and workspace configuration outside the prompt body for App automations.
Troubleshooting
- If
swiftis missing, stop and ask the user to install Xcode command line tools or Swift toolchain. - If
gitis missing, stop and ask the user to install git or Xcode command line tools. - If
assets/AGENTS.mdis missing, stop and restore the template before bootstrapping packages. - If destination exists and is non-empty (excluding ignorable macOS metadata like
.DS_Store), do not overwrite; ask for a new destination or explicit cleanup instructions. - If validation fails in constrained environments, rerun with
--skip-validationand report that checks were skipped.
Resources
scripts/
scripts/bootstrap_swift_package.sh: Create package directory, runswift package init, apply platforms defaults toPackage.swift, initialize git, and run safety/validation checks.
references/
references/package-types.md: Quick selection guide for package types, platform presets, and version profiles.references/automation-prompts.md: Codex App and Codex CLI automation prompt templates with placeholders and guardrails.
assets/
assets/AGENTS.md: Template copied into each new package repository to set repository expectations for Swift Package Manager workflows.
Interactive Customization Flow
- Load current effective customization settings first:
uv run python scripts/customization_config.py effective
- Ask targeted customization questions:
- Use
references/customization-flow.mdto drive knob-by-knob questions. - Confirm desired behavior changes and safety constraints.
- Map requested changes to implementation files:
- Update
SKILL.md,references/*, and any runtime script files listed inreferences/customization-flow.md.
- Persist durable customization state:
- Start from
customization.template.yamldefaults. - Apply approved overrides with
uv run python scripts/customization_config.py apply --input <yaml-file>. - Durable path:
~/.config/gaelic-ghost/apple-dev-skills/<skill-name>/customization.yaml. - Optional override root:
APPLE_DEV_SKILLS_CONFIG_HOME.
- Report resulting effective configuration:
- Re-run
uv run python scripts/customization_config.py effectiveand summarize final active settings. - If the user asks to remove customization state, run
uv run python scripts/customization_config.py reset.
Use references/customization-flow.md for skill-specific knobs, file mapping, guardrails, validation checks, and example requests.
More from gaelic-ghost/apple-dev-skills
apple-xcode-workflow
Guide Apple and Swift development work in or around Xcode, including workspace inspection, diagnostics, builds, tests, runs, toolchain checks, Apple and Swift documentation lookup, mutation guard decisions, and official CLI fallback planning. Use for existing Apple or Swift projects when Xcode-aware execution or Apple docs reasoning is needed.
18apple-dash-docsets
Manage Dash docsets and cheatsheets on macOS, including search and discovery, install guidance for missing docsets, local access fallback paths between Dash MCP, HTTP, and URL or Service integration, and generation guidance when a docset is unavailable. Use when Codex needs Dash docset or cheatsheet help rather than Apple or Xcode execution work.
15apple-swift-package-bootstrap
Bootstrap new Swift Package Manager repositories with consistent defaults, generated AGENTS guidance, validation, and customizable bootstrap settings. Use when creating a new Swift package, choosing platform or version presets, scaffolding its initial structure, or maintaining this skill's bootstrap defaults.
14dash-docset-search
Search and reason about Dash.app docsets and cheatsheets on macOS. Use when the task involves explaining Dash capabilities, listing installed docsets, searching one or more docsets, enabling full-text search, detecting missing docsets before handoff to -docset-install-generate, or customizing this skills search policy.
10swift-package-agents-maintainer
Create, update, and maintain a canonical AGENTS.md (agents file) across Swift Package repositories. Use when Codex needs to update AGENTS.md for Swift packages, sync agents files across repos, enforce shared policy baselines, detect drift in automation, apply canonical templates, or customize this skills sync policy.
10dash-docset-install-generate
Install, guide installation, and generate Dash.app docsets or cheatsheets on macOS. Use when the user asks to add missing Dash docsets, install from built-in or contributed sources, install cheat sheets, subscribe to feeds, generate custom docsets, verify installation, or customize this skills install/generation policy.
10