codex-bootstrap
Skill2 starsChanged 2 months agoMITView on GitHub
Use when bootstrapping a new iOS or macOS SwiftUI project or major feature set in the consumer workspace. Chain skills from this repo (design system, components, reviews). Do not use for one-off screens, editing this repo's archived package, or rebuilding AppleDevelopmentFoundation archive/Sources unless explicitly asked.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apple-accessibility-reviewSkill
- apple-app-marketing-siteSkill
- apple-design-systemSkill
- apple-development-foundationSkill
- apple-error-statesSkill
- apple-platform-plannerSkill
- apple-security-privacy-reviewSkill
- codex-skill-maintainerSkill
- ios-macos-platform-adaptationSkill
- maestro-apple-app-testingSkill
- reusable-code-extractorSkill
- swift-concurrency-reviewSkill
- swift-package-module-authorSkill
- swift-testing-verificationSkill
- swiftui-component-authorSkill
- swiftui-tab-navigationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Before creating project files:
- Distinctive: line 32
If no consumer AGENTS.md exists, propose the neutral contract from assets/consumer-AGENTS.md.template and create it only when project-local …
- Distinctive: line 50
If existing guidance lacks this engineering baseline (including the Apple verification policy section and both knobs), show the missing …
- Very specific: line 55
Never modify global ~/.codex/AGENTS.md or infer the foundation repository itself as the consumer target.
- Distinctive: line 60
Create minimal clean structure in the consumer workspace:
- Very specific: line 66
If a shared design-system module is needed, create it in the consumer repo (local SPM target or app group), not in …
- Very specific: line 68
Do not copy or rebuild modules from AppleDevelopmentFoundation archive/Sources/.
- Very specific: line 88
Use XcodeBuildMCP (see repo MCP.md) — not raw xcodebuild/simctl.
- Very specific: line 107
macOS: use the macos workflow — prefer build_run_macos for a launch smoke.
- Distinctive: line 116
Both: verify each platform with its own tool path above
- Distinctive: line 118
If an MCP capability is unavailable, follow this ladder without skipping tiers.
- Distinctive: line 119
Read the consumer AGENTS.md Apple verification policy knobs.
- Distinctive: line 132
Never infer fallback permission from shell access or an installed command.
- Distinctive: line 154
Stop and ask when:
- Distinctive: line 157
No clear consumer workspace (which repo/app to bootstrap)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codex bootstrap
Bootstrap a consumer app or package in the active workspace using sibling skills from this repo. Do not add code to AppleDevelopmentFoundation's archive/Sources/ unless the user explicitly requests package work.
Step 1 — Intake
Confirm before writing files:
- Explicit consumer repository path and whether project-local operating guidance is authorized
- Target platforms (iOS, macOS, or both) and minimum OS versions
- SwiftUI app vs Swift Package vs mixed (app + local packages)
- Primary peer destinations and whether the app needs tabs, a sidebar, or no persistent navigation yet
- Existing design system to reuse, or need for a minimal neutral token/component layer
- Auth, persistence, networking, or entitlements constraints (app-owned; not prescribed here)
- Planning-only vs implementation request
Inputs: bootstrap request + any existing design system or app constraints. If planning-only, output the plan and skill selection without writing files.
Step 2 — Project-local operating guidance
Before creating project files:
- Inspect the consumer repository's root
AGENTS.mdand every applicable scopedAGENTS.md. Summarize the instructions that already govern the bootstrap. - Preserve existing instructions exactly. Never replace, append to, or merge an
existing
AGENTS.mdwithout the user's explicit authorization for that edit. - If no consumer
AGENTS.mdexists, propose the neutral contract from assets/consumer-AGENTS.md.template and create it only when project-local guidance is within the authorized bootstrap scope. The foundation repository'sScripts/init-consumer-guidance.sh --target <consumer> --dry-runcan preview the file; the non-dry-run form refuses conflicts by default. - Customize project/workspace, scheme, configuration, platforms, deployment
versions, exact simulator or
.xcodebuildmcp/config.yaml, repository-native formatter/linter/test commands, the UI inspection contract for user-visible iOS/iPadOS work, and Apple verification policy knobs from inspected consumer configuration and team preference. The inspection contract records deterministic routes or states, safe UI-only launch arguments, a small risk-based evidence matrix, and artifact handling. The policy knobs are XcodeBuildMCP CLI fallback and repository-native rawxcodebuild/xcrun/simctl, eachrequire-approval|allowed|denied. Template default isrequire-approvalfor both — keep that unless the user authorizes a different policy. Leave an explicit placeholder when a value cannot be established; do not invent it. - If existing guidance lacks this engineering baseline (including the Apple verification policy section and both knobs), show the missing sections and ask for authorization before merging them. A bootstrap can continue under existing instructions when guidance changes are not authorized.
Never modify global ~/.codex/AGENTS.md or infer the foundation repository itself
as the consumer target.
Step 3 — Skeleton expectations
Create minimal clean structure in the consumer workspace:
- SwiftUI
@mainapp entry with a single root view shell - Native primary navigation only when the user supplied multiple peer destinations; use
swiftui-tab-navigationfor a tab shell - Platform-appropriate project layout (Xcode project or SPM + app target)
- Empty or stub feature areas — no business domain models unless the user supplied them
- If a shared design-system module is needed, create it in the consumer repo (local SPM target or app group), not in AppleDevelopmentFoundation
Do not copy or rebuild modules from AppleDevelopmentFoundation archive/Sources/. Do not run ./archive/Scripts/create-module.sh in the skills reference repo.
Step 4 — Skill chaining order
Apply skills in this order; skip steps that do not apply:
apple-platform-planner— scope the feature set and platform split when the request is broadswiftui-tab-navigation— when the app has multiple persistent peer destinationsapple-design-system— semantic tokens, neutral defaults, appearance/contrast/motionswiftui-component-author— reusable components built on the design systemios-macos-platform-adaptation— when iOS and macOS behavior divergesswift-concurrency-review— after async/actor code existsapple-security-privacy-review— after file access, logging, imports, or permissionsapple-accessibility-review— after shared UI components existswift-testing-verification— before calling bootstrap complete
For extraction from an existing app, use reusable-code-extractor into the consumer's shared module — not into this reference repo.
Step 5 — XcodeBuildMCP verification
Use XcodeBuildMCP (see repo MCP.md) — not raw xcodebuild/simctl. Enable the
macos workflow in .xcodebuildmcp/config.yaml when macOS tools are missing
(simulator tools alone are the MCP default).
session_show_defaults— establish or confirm project/workspace, scheme, configuration, and platform destination; report that context before the first actiondiscover_projs— only if defaults are missing or wrong- Branch by target platform (do not use iOS simulator tools for macOS-only apps):
- iOS (simulator): resolve and reuse one exact
simulatorId; preferbuild_run_simfor launch; before tests, wait for same-projectxcodebuild/xctest/ test-runner processes; runtest_simwithout a redundant preceding build and default toextraArgs: ["-parallel-testing-enabled", "NO"]. For user-visible iOS/iPadOS work, run the consumer's small risk-based evidence matrix: a primary route by default, plus only affected sheet, appearance, or Dynamic Type scenarios. For each selected scenario, capture ascreenshot, inspect the rendered image, then capturesnapshot_ui(ui-automation workflow; iOS simulator only) - macOS: use the
macosworkflow — preferbuild_run_macosfor a launch smoke; runtest_macoswhen a test target exists (required verification when tests are present). If neither launch smoke nortest_macosruns, require at leastbuild_macosso the skeleton is compiled. DefaultextraArgs: ["-parallel-testing-enabled", "NO"]. Do not calltest_sim,build_run_sim, or ui-automation screenshot/hierarchy tools — XcodeBuildMCP ui-automation is iOS-simulator-only. If no test target exists yet, report thattest_macoswas skipped and residual risk only afterbuild_run_macosorbuild_macossucceeds - Both: verify each platform with its own tool path above
- iOS (simulator): resolve and reuse one exact
If an MCP capability is unavailable, follow this ladder without skipping tiers.
Read the consumer AGENTS.md Apple verification policy knobs; shell access or
an installed binary is never permission by itself:
- XcodeBuildMCP MCP tools.
- Matching XcodeBuildMCP CLI workflow only when the CLI policy is
allowed, orrequire-approvalwith fresh user approval for this step. Skip whendenied. - Repository-native raw
xcodebuild/xcrun/simctlonly when the raw-tooling policy isallowed, orrequire-approvalwith fresh user approval. Skip whendenied. For macOS fallbacks, state destination architecture explicitly (for exampleplatform=macOS,arch=arm64). - Report blocked when no authorized path exists, including the policy values in force, checks not run, next action, and residual risk.
Never infer fallback permission from shell access or an installed command. Preserve the same project/workspace, scheme, configuration, exact destination, serialized test scope, and reporting in any authorized fallback.
Report scheme, destination (simulatorId or macOS), and any failure with the next actionable tool call. Full checklist: references/bootstrap-checklist.md.
Step 6 — Handoff
Output:
- Initial project structure and key files created in the consumer workspace
- Whether consumer
AGENTS.mdwas created, preserved, or left as a proposed merge - Which skills were applied and which to invoke next
- Verification results or blocker from the authorized capability ladder, including project/workspace, scheme, configuration, exact simulator/device, tools/commands, and residual risk
- Explicit stop: do not expand AppleDevelopmentFoundation archived package unless asked
Stop conditions
Stop and ask when:
- User wants to rebuild or extend AppleDevelopmentFoundation's archived package
- No clear consumer workspace (which repo/app to bootstrap)
- Project-local guidance is requested but permission to create or merge it is unclear
- Request is a single screen or copy change — use
swiftui-component-authordirectly instead
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

