Bootstrap xcode app project
Skill gaelic-ghost/socket/plugins/apple-dev-skills/skills/bootstrap-xcode-app-project
Bootstrap a new native Apple app project for macOS, iOS, or iPadOS when the user wants to start, begin, create, or bootstrap an Xcode app project. Use for new SwiftUI-first app repositories on macOS, with optional XcodeGen generation preference and repo-baseline setup guidance. Do not use for plain Swift packages, libraries, or tools that are not native Apple apps.From its SKILL.md
npx -y skills add gaelic-ghost/socket --skill bootstrap-xcode-app-projectAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
17.6 KB, ~3.8k tokens by cl100k_base, as published. Nobody here has run it
Bootstrap Xcode App Project
Purpose
Create a new native Apple app repository from nothing to a usable baseline on disk. The first implementation prioritizes a deterministic XcodeGen path for SwiftUI app projects and a guarded planning path for the standard Xcode-created-project flow. scripts/run_workflow.py is the runtime entrypoint, and scripts/bootstrap_xcode_app_project.py is the current implementation core for XcodeGen-backed scaffold creation plus maintain-project-repo installation with the xcode-app profile.
Companion Plugin Requirement
This skill can be discovered from a standalone apple-dev-skills install, but its mutating bootstrap path installs repo-maintenance files through the companion productivity-skills plugin. If the companion maintain-project-repo runner is missing, tell the user to install productivity-skills alongside apple-dev-skills, or add the socket marketplace with codex plugin marketplace add gaelic-ghost/socket and then install or enable both apple-dev-skills and productivity-skills from the Socket catalog.
When To Use
- Use this skill when the user wants to start, begin, create, or bootstrap one new macOS, iOS, or iPadOS app project on macOS.
- Use this skill when the user explicitly asks for a new Xcode app, a native Apple app, or a new SwiftUI app repository.
- Use this skill when the user wants a reproducible app-project generator flow and prefers
XcodeGen. - Use this skill when a brand-new app repo should also get baseline repo guidance such as
AGENTS.md. - Do not use this skill for ordinary collaboration inside an existing Xcode project.
- Do not use this skill to bootstrap an Apps/Packages workspace with more than one app project; use
bootstrap-xcode-workspacefirst and let it route each child app here. - Do not use this skill for plain Swift packages, libraries, or tools that are not native Apple apps.
- Recommend
bootstrap-swift-packagewhen the user wants a regular SwiftPM package instead of a native Apple app. - Recommend
xcode-build-run-workflowwhen the project already exists and the task is execution, diagnostics, docs lookup, mutation, build, run, or preview work inside that existing project. - Recommend
xcode-testing-workflowwhen the project already exists and the task is primarily about Swift Testing, XCTest, XCUITest,.xctestplan, or test diagnosis.
Single-Path Workflow
- Collect the required inputs:
namedestinationplatformui_stackproject_generator- optional
bundle_identifier - optional
org_identifier - optional
skip_validation - optional
dry_run
- Classify the request as a native Apple app bootstrap request before continuing:
- continue only for
project_kind=app - stop if the request is actually a Swift package, library, or tool bootstrap
- continue only for
- Apply the Apple docs gate before recommending project structure or implementation guidance:
- read the relevant Apple documentation first
- use Xcode MCP
DocumentationSearchfirst for Apple-owned SDK, framework, lifecycle, and Xcode project-creation behavior - use the Dash.app MCP second when its installed docsets cover the question; use Dash HTTP only when that MCP is unavailable or incomplete
- use checked-out source, generated DocC, GitHub/source repositories, release notes, and readable online documentation only after those local MCP paths; generic no-JS web search/open results, snippets, metadata shells, or bare URLs are not enough
- state the documented behavior being relied on before design or implementation guidance
- current documented anchors for this workflow include:
- Apple's Xcode project-creation guidance: Creating an Xcode project for an app
- SwiftUI app lifecycle guidance through the
Appprotocol: App - scene composition guidance through
SceneandWindowGroup: Scene and WindowGroup
- if the docs and the current code or planned scaffold conflict, stop and report that conflict
- if no relevant Apple docs can be found, say that explicitly before proceeding
- Apply the shared Swift policy before giving implementation guidance:
- apply the detailed local policy in
references/snippets/apple-xcode-project-core.md - preserve its simplicity-first, shape-preserving, and anti-ceremony Swift guidance
- apply the detailed local policy in
- Run
scripts/run_workflow.pyto normalize inputs, load customization state, and select the supported bootstrap path. - Resolve the generator path:
- prefer
xcodegenby default for new app projects unless the user explicitly prefers the standard Xcode project-creation flow - use
xcodeonly when the user explicitly prefers the standard Xcode project-creation flow - treat
askas a legacy explicit-blocking value only when the user or customization state supplies it intentionally
- prefer
- Create the project:
- for
xcodegen, letscripts/bootstrap_xcode_app_project.pygenerate the repo scaffold fromtemplates/xcodegen/swiftui-app/, includingproject.yml, checked-in.xcconfigfiles, source files, tests, andAGENTS.md, then runxcodegen generate - create the standard top-level Xcode app layout:
Sources/,Tests/,Shared/,Extensions/,Configurations/,Scripts/, andPackages/ - create
Sources/Resources/Localizable.xcstringsfor every app target by default; the generated XcodeGen app target owns the broad syncedSourcesroot, so the catalog is a tracked project resource without a separate source entry - keep app-owned implementation/resources/support under
Sources/, tests underTests/, reusable app/extension source underShared/, extension target roots underExtensions/,.xcconfiglayers underConfigurations/, project-local automation underScripts/, and justified local Swift package boundaries underPackages/ - inside
Sources/, create the strict app structure:Views/Shared,Views/macOS,Views/iOS,Models,Services/Consumed,Services/Internal, andServices/Provided - require an explicit
--file-prefixcontaining three uppercase letters after offering reasonable initials-based suggestions - create
GEAApp.swiftas the lifecycle entry andGEA.swiftas the application runtime/domain value; do not generate an umbrellaGEAAppService.swift - create prefixed, self-contained SwiftUI views such as
GEAContentView.swift, using component-local@Stateand@Observablestate only when direct state is not sufficient; add a concrete feature service only when the new app has a real capability that needs one - prefix every project-owned Swift file except
Package.swift, externally generated Swift, and vendored third-party Swift; never generate+filenames - install
.codex/environments/xcode-project.tomlfromtemplates/codex-local-environments/xcode-project.tomland replace the scheme placeholder with the generated app target name - keep the generated
project.ymlaligned with the current XcodeGen project spec concepts: projectoptions,configs,configFiles, targets, sources, schemes, packages, project references, test-plan references, andminimumXcodeGenVersion; when this app is opened from a workspace, setoptions.schemePathPrefix: "../"in the owning spec - keep the generated
minimumXcodeGenVersionon the recent validated baseline declared by the templates; when the baseline is raised, update the templates, docs, and tests together - use exactly one top-level
Sourcesentry for the app target, exactly one top-levelSharedentry for shared app/extension source, and exactly one top-levelTestsentry for the test target when the generated project format is Xcode 16 or newer; prefertype: syncedFolderon those broad roots, and use the same broad roots with explicitincludesandexcludesas the fallback when synchronized folders are not appropriate - never split ordinary generated app project paths into separate XcodeGen source entries such as
Sources/App,Sources/Resources,Sources/Support, feature subfolders, orTests/<AppName>Tests; extension targets may use oneExtensions/<ExtensionName>entry per extension target - create exactly one app lifecycle entry point for the app target; do not create alternate
@mainapp types, duplicatemain.swiftfiles, target-specific app entry files, or parallel app structs for variants; keep platform or configuration differences inside the single entry point with Swift conditional compilation or runtime conditionals - keep nontrivial build settings in external
.xcconfigfiles by default, using shared, target-level, and per-configuration layers wired through the XcodeGen spec instead of duplicating settings inline - install a checked-in external app entitlement plist and wire it through
CODE_SIGN_ENTITLEMENTSin the app.xcconfigso capability changes have a real tracked file owner instead of living only in generated project state - for
xcode, use a guarded guidance path for now instead of pretending the repo supports full GUI automation already
- for
- Validate the scaffold:
- verify the expected app files exist
- verify the standard top-level directories exist
- verify the strict app source directories exist under
Sources/Views,Sources/Models, andSources/Services - verify the app entry point, runtime/domain value, and shared content view use the strict naming contract without a generated ViewModel or umbrella app service
- verify
.swiftformatexists - verify
Sources/Resources/Localizable.xcstringsexists and that the generated target's broadSourcesroot includes it as a resource - verify
AGENTS.mdexists when enabled - verify
.codex/environments/xcode-project.tomlexists and uses the generated app target name for Codex GUI actions - verify generated guidance says tracked
.pbxprojchanges must be reviewed, staged, and committed before push, merge, release, or cleanup - verify generated guidance says Xcode Build Settings UI edits may need to be moved from generated project overrides back into the owning
.xcconfig - verify
Scripts/repo-maintenance/hooks/pre-commit.sampleexists - verify
Scripts/repo-maintenance/validate-all.shandScripts/repo-maintenance/release.shexist - verify branch protection, when enabled, requires the GitHub Actions check context
validaterather thanValidate Repo Maintenance / validate - when a GitHub remote is created or already exists, route repository
settings audit or mutation through
productivity-skills:maintain-github-repositoryinstead of embedding a separate Xcode-specific baseline - if validation is enabled, verify project generation and basic project introspection succeeded
- Hand off existing-project work cleanly:
- recommend
sync-xcode-project-guidancewhen the repo guidance should be refreshed or merged after creation - recommend
xcode-build-run-workflowfor normal Xcode build or run collaboration after bootstrap and guidance sync - recommend
xcode-testing-workflowfor test-focused collaboration after bootstrap and guidance sync
- recommend
Inputs
name: required; app project name and repo directory name.destination: parent directory for the new app repo.project_kind: defaults toapp; any non-app value blocks the workflow.platform:macos,ios, oripados.ui_stack:swiftui,uikit, orappkit.project_generator:ask,xcode, orxcodegen.bundle_identifier: optional explicit bundle identifier.org_identifier: optional organization identifier used to derive a bundle identifier whenbundle_identifieris omitted.skip_validation: optional flag to skip post-generation verification.dry_run: optional flag to resolve inputs and emit the planned execution contract without creating files.- Defaults:
- runtime entrypoint: executable
scripts/run_workflow.py project_kinddefaults toappdestinationdefaults to.platformdefaults toaskunless explicitly setui_stackdefaults toswiftuiproject_generatordefaults toxcodegencopy_agents_mddefaults totrue- Codex GUI local environments are installed from
templates/codex-local-environments/xcode-project.tomlinto.codex/environments/xcode-project.toml - validation runs unless
--skip-validationis passed maintain-project-repoinstallsScripts/repo-maintenance/on successful mutating runs
- runtime entrypoint: executable
Outputs
statussuccess: bootstrap completed on the supported pathblocked: prerequisites, unsupported selections, or safety rules prevented completionfailed: the implementation path started but did not complete successfully
path_typeprimary: the documented supported path completedfallback: a guided fallback or non-mutating plan was returned instead
output- resolved project path
- normalized inputs
- resolved bundle identifier
- generator path
- installed
.codex/environments/xcode-project.toml - installed default String Catalog path
- installed
maintain-project-repopaths - validation result
- one concise next step or handoff
Guards and Stop Conditions
- Stop with
blockedifnameis missing. - Stop with
blockedifproject_kindis notapp. - Stop with
blockedif the platform cannot be resolved safely. - Stop with
blockedifproject_generator=askand the request intentionally asks not to choose the default generator. - Stop with
blockedifui_stackis not supported by the current implementation path. - Stop with
blockedif the target directory already exists and contains non-ignorable files. - Stop with
blockedifproject_generator=xcodegenandxcodegenis not available onPATH. - Stop with
blockedif the user chose the standard Xcode flow and the repo cannot safely automate that path yet.
Fallbacks and Handoffs
- Preferred implementation path in the first iteration is
XcodeGenplus generated scaffold files. - Use the standard Xcode-created-project path only as a guided fallback for now.
- After a successful XcodeGen bootstrap, treat
project.ymlas the editable source for generated project structure and regenerate withxcodegen generateafter project-spec changes. - After a successful bootstrap, hand off to
sync-xcode-project-guidancefor repo-guidance alignment when needed, then toxcode-build-run-workflowfor build, run, diagnostics, mutation, preview, and docs work. - After a successful bootstrap, hand off to
xcode-testing-workflowfor Swift Testing, XCTest, XCUITest,.xctestplan, and test diagnosis work. - After a successful bootstrap, 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 bootstrap, 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 the app repository is published to GitHub, use
productivity-skills:maintain-github-repositoryto audit repository features, merge modes, security automation, sign-off policy, and branch protection. - Recommend
bootstrap-swift-packagedirectly when the task is really package bootstrap. - Recommend
sync-xcode-project-guidancewhen the repo already exists and only needs repo-guidance or documentation alignment.
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 implementation path.- Current runtime-enforced knobs include the default platform, bundle-ID prefix, and
AGENTS.mdcopy behavior. Project kind, UI stack, generator choice, and validation policy now live as fixed workflow behavior or explicit invocation inputs. - 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-generators.mdreferences/xcodegen-synced-folder-and-config-notes.mdreferences/platform-matrix.md
Contract References
references/automation-prompts.mdreferences/customization-flow.md
Support References
assets/AGENTS.md- Recommend
references/snippets/apple-xcode-project-core.mdwhen the new app repo should start with reusable Xcode-project baseline policy content next to the generatedAGENTS.md. references/snippets/apple-xcode-project-core.mdtemplates/xcodegen/swiftui-app/project.yml.tmpltemplates/xcodegen/swiftui-app/Configurations/*.xcconfig.tmpl
Script Inventory
scripts/run_workflow.pyscripts/bootstrap_xcode_app_project.pyscripts/customization_config.py
What ships with it: 13 files
103.5 KB alongside SKILL.md, 3 of them executable
agents/
- openai.yaml273 B
assets/
- AGENTS.md13.2 KB
references/
scripts/
- bootstrap_xcode_app_project.pyruns17.5 KB
- customization_config.pyruns6.2 KB
- run_workflow.pyruns9.2 KB