Setup Swift Repository
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
End-to-end bootstrap for a Swift repository of either flavor — a SwiftPM library or a native Apple app. It collects the project’s identity and pipeline parameters once, resolves which flavor and branching model apply, and orchestrates six other skills in a fixed order so nothing is asked twice.
Purpose
iru-setup-swift-repository is the top-level entry point (standalone, or as the Swift/Apple branch of
iru-setup-repository) for starting or catching up a Swift repository, whichever of its two flavors it is: a
redistributable SwiftPM library, or a native iOS/iPadOS/macOS/watchOS/visionOS app generated from an XcodeGen
or Tuist manifest, with SwiftUI or programmatic UIKit for its iOS/iPadOS target and an MVVM or MVC core (a
macOS-only app is pointed to Setup macOS Repository instead). Rather than duplicating the flavor’s own scaffold logic, documentation scaffolding, .gitignore setup,
CI/CD workflows, changelog bootstrapping, and README generation, it gathers the shared inputs — project identity
(package name or app name/bundle-id prefix, license, developer name/email/organization URL), flavor-specific
inputs (platforms, minimum deployment targets, generator, signing, and for an app ui/architecture), and pipeline parameters (branching model,
integration/stable branch, macOS runner, open-source/visibility/publish/distribution/sonar, and the cost-aware
CI choices ci, ci-tests and pages) — once, and passes each downstream skill only the args keys its own
Step 0 accepts. It announces up front whether it is setting the repository up from scratch or updating an existing
one (with an absent/present/partial inventory of every component it owns). It never skips the scaffold itself:
every sub-skill warns about and asks Update / Keep as is / Replace for each pre-existing file it owns (or applies
on-existing from args in scripted runs), and the final report states per component whether it was created,
updated, replaced, kept as is, or skipped (ci: no). Because macOS runner minutes cost roughly 10x Linux minutes
on private repositories, the CI questions are asked with visibility-aware cost guidance.
Plugin
Shipped by the iru-swift plugin of the ai-catalog marketplace (install with /plugin install iru-swift@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
Detected, else asked |
|
No |
|
|
|
No |
|
Detected, else |
|
Yes |
Free-text project-identity fields specific to the resolved flavor, asked in Step 2 using exactly the key names
the scaffold skill reads. Skipped entirely in |
None |
|
Yes |
Shared identity fields for both flavors, resolved once via |
None — user must choose |
|
Yes |
Flavor-specific vocabulary: |
None |
|
No |
|
Asked when |
|
No |
|
|
|
No |
Per-platform OS versions for a library (no universal default, asked directly); for an app the iOS deployment
target, which |
Asked (library) / resolved downstream (app) |
|
Yes |
|
None |
|
Yes |
|
|
|
No |
CI pipeline parameters consumed by |
|
|
No |
Shared open-source-driven pipeline vocabulary, resolved via |
|
|
No |
|
Detected, else asked |
|
No |
|
|
|
No |
|
|
|
No |
|
|
|
No |
|
Asked for |
|
No |
|
|
|
No |
Pass-through toggles never asked by this orchestrator — each downstream skill resolves or asks its own default when the key isn’t supplied. |
Resolved downstream |
Outputs
-
A "Setup mode" announcement (from scratch vs. updating, with a component inventory) before any question.
-
The flavor’s own scaffold:
Package.swift+Sources//Tests/(viairu-setup-swift-library), or the generator manifest +Packages/Core+Targets/+fastlane/Fastfile(viairu-setup-apple-app) — always invoked; the scaffold skill decides per existing file whether to update, keep or replace it. -
For the
appflavor,.ui-quality.ymlat the repository root (reported by the scaffold with the chosenaccessibilitylevel); the scaffold’s UI tests capture the sample screen into the gitignored.ui-screenshots/, which CI uploads as a 7-day artifact. -
A scaffolded Antora documentation site under
docs/(viairu-setup-antora). -
A root
.gitignorecovering.build/,DerivedData/,.xcresult, generated.xcodeproj/*.xcworkspace, signing material, and the Antora build output (viairu-setup-swift-gitignore). -
build.yml/release.yml(+sync.ymland.github/scripts/sync_versions.pyfor gitflow),security.yml, and.github/dependabot.yml(viairu-setup-swift-github-workflows) — all skipped whenci: no. -
A root
CHANGELOG.mdbackfilled from git tag/GitHub Release history (viairu-setup-changelog). -
A root
README.mdwith badges, a project-status table, documentation links, and installation instructions (viairu-setup-readme). -
A final report summarizing the resolved flavor/branching/mode, identity/license/pipeline parameters (
visibility,ci,ci-tests,pagesincluded), a per-component table of whether each was created, updated, replaced, kept as is (with any listed mismatches) or skipped (ci: no), the Sonar coverage conversion (lcov_to_sonar_generic.pyfor both flavors), the consolidated required-secrets/settings table (includingAPPLE_TEAM_IDfor a distributed app), every decision made on the user’s behalf, and explicit warnings to review every generated file before building, committing, or relying on CI.
Execution flow
Dependencies
Invokes
Each of the following is invoked via the iru-isolated-skill-executor
agent rather than a direct Skill call — every sub-skill re-derives what it needs straight from the filesystem
this orchestrator has just written to, so only a short completion summary needs to come back, keeping each
sub-skill’s own exploration/file reads (and the two scaffold skills' very long template listings) out of this
orchestrator’s own context. Every sub-agent runs with run_in_background: false since each step depends on the
previous one’s files being on disk:
-
Setup Swift Library — Step 5,
flavor: library: writesPackage.swiftand the source folders, passing Steps 2–4’s answers (package-name,platforms,min-deployment-targets, license, developer fields,open-source,publish,sonar+ detail keys,formatterif supplied,visibility,ci,on-existingif supplied,mode) asargs. Always invoked, even whenPackage.swiftalready exists. -
Setup Apple App — Step 5,
flavor: app: writes the generator manifest,Packages/Core, per-platformTargets/, and an optionalsigning/distribution-gatedfastlane/Fastfile, passing the app-specific identity (app-name,bundle-id-prefix),platforms,generator,ui,architecture,distribution,signing,min-deployment-targetif supplied, license, developer fields,open-source,sonar+ detail keys,visibility,ci,on-existingif supplied, andmodeasargs. Always invoked, even when the generator manifest already exists. -
Setup Antora — Step 6: scaffolds the Antora documentation site, invoked with no
args(onlyon-existingwhen supplied) since it derives the component name/title/version directly from the manifest Step 5 just wrote (or an initial1.0.0if no tags/releases exist yet). Run before Step 8 so that skill’s own docs-site check finds everything in place. -
Setup Swift Gitignore — Step 7: writes or updates the root
.gitignore, passingflavor(so itsPackage.resolvedrecommendation matches the project shape) andpackage-resolvedonly if supplied, pluson-existingif supplied;modeis deliberately not passed since the skill’s own.gitignore-presence check is the more precise signal. -
Setup Swift GitHub Workflows — Step 8, skipped entirely when
ci: no: writes the CI/CD + security workflows, passingflavor,platforms,branching,integration-branch(gitflow only),stable-branch,runner,xcode-versionif supplied,generator/signing(app only),release-pleaseif supplied (library only),open-source,publish/distribution,sonar+ detail keys,visibility,ci-tests,pages,security-*if supplied,on-existingif supplied, andmodeasargs. -
Setup Changelog — Step 9: bootstraps the root
CHANGELOG.md, invoked with noargs(onlyon-existingwhen supplied) since it works from the repository’s own git tag/GitHub Release history; position relative to Steps 5–8 doesn’t matter functionally. -
Setup Readme — Step 10, last: bootstraps the root
README.md, passingsonar,ci,pages(only whenci: yes) andon-existingif supplied, and otherwise exploring the finished state left by every earlier step.
Invoked by
-
Setup Repository — Step 4, Swift library/Apple app bootstrap, via the
iru-isolated-skill-executoragent; it asks its own visionOS follow-up and passesplatformsinargs, which this skill then doesn’t re-ask for an app.
Related agents
-
iru-isolated-skill-executor— spawned once per sub-skill (Steps 5–10), so all six sub-skills' own exploration/file-read transcripts don’t accumulate in this orchestrator’s context over the course of a single bootstrap run.
Source
SKILL.md on GitHub — the file this page was generated from.