Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
firebase avatar

Xcode Project Setup

  • 74.7k installs
  • 394 repo stars
  • Updated July 30, 2026
  • firebase/agent-skills

xcode-project-setup is a Firebase agent skill that safely configures Xcode projects by adding SPM dependencies and handling framework linking via native Swift scripting.

About

Safely modifies Xcode projects to add Swift Package Manager dependencies and configure iOS development. Uses a native Swift script (not Ruby) to inject SPM packages, handle linker flags for frameworks like Firebase, and link configuration files. Use when iOS projects need dependency installation or configuration.

  • Safely modify Xcode projects to add Swift Package Manager dependencies without Ruby
  • Automatically handle linker flags for Firebase and other static frameworks
  • Link configuration files like GoogleService-Info.plist to project resources

Xcode Project Setup by the numbers

  • 74,676 all-time installs (skills.sh)
  • +4,743 installs in the week ending Jul 29, 2026 (Skillselion tracking)
  • Ranked #1 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
At a glance

xcode-project-setup capabilities & compatibility

Capabilities
spm setup · xcode configuration · framework linking
Use cases
frontend
Platforms
macOS
From the docs

What xcode-project-setup says it does

Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).
SKILL.md description
npx skills add https://github.com/firebase/agent-skills --skill xcode-project-setup

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs74.7k
repo stars394
Security audit2 / 3 scanners passed
Last updatedJuly 30, 2026
Repositoryfirebase/agent-skills

How do you scaffold an Xcode project with SPM dependencies?

Safely modifies Xcode projects to add Swift Package Manager dependencies and configure iOS development. Uses a native Swift script (not Ruby) to inject SPM packages, handle linker flags for framework

Who is it for?

Adding and configuring Swift Package Manager dependencies in Xcode projects, especially Firebase and other static frameworks

Skip if: Existing Xcode projects that only need minor dependency updates or cross-platform React Native and Flutter setups.

When should I use this skill?

An iOS developer needs to add SPM packages to an Xcode project or configure project dependencies

What you get

Configured .xcodeproj with Swift Package Manager dependency pins and workspace-ready structure

  • Configured Xcode project with SPM dependencies
  • Proper linker flags
  • Linked configuration files

By the numbers

  • Requires Swift (no Ruby allowed)
  • Automatically injects -ObjC flag for Firebase
  • Script is idempotent

Files

SKILL.mdMarkdownGitHub ↗

Xcode Project Setup

⛔️ CRITICAL RULES & ENVIRONMENT CHECKS

Before performing any Xcode setup or file manipulation, you MUST adhere to the following rules. A hefty fee will be applied if you violate them.

1. The Anti-Ruby Mandate

You are strictly forbidden from using Ruby, Rails, or any Ruby gems (including the xcodeproj gem). Under no circumstances may you write or execute Ruby scripts.

2. Modern Xcode Folder Synchronization

Modern Xcode projects support folder synchronization. When adding new source code (.swift) or resource files, simply write them to the correct directory on disk. They will be automatically included in the Xcode project. Never manually modify the `.pbxproj` file to add files.

3. Allowed Scripting Languages

If you absolutely must write a script to manipulate the project environment (e.g., configuring SPM packages beyond what the provided xcode_spm_setup script does), you must use Swift. Only as an absolute last resort, if Swift is completely unviable, may you use Node.js or TypeScript.

4. Toolchain Verification

Because this skill relies entirely on a native Swift script, you must verify the environment:

  • Run swift --version before proceeding.
  • If the Swift command is not found, you must stop and recommend the user install the Swift toolchain (e.g., via xcode-select --install on macOS), or ask if you can attempt to install it for them. Do not attempt to proceed without Swift.

5. Mandatory Linker Flags for Static Frameworks (Firebase)

When setting up SPM dependencies that heavily rely on internal Objective-C categories and +load methods (such as the Firebase iOS SDK suite), the Apple linker will aggressively strip these methods out if they are linked statically.

This causes fatal runtime crashes (e.g., FirebaseAuth/Auth.swift:167: Fatal error: Unexpectedly found nil).

The provided `xcode_spm_setup` Swift script automatically injects the `-ObjC` flag to `OTHER_LDFLAGS` when adding Firebase products. However, you should still verify it is present in the build settings if you encounter issues.

  • Failing to include this flag when adding Firebase dependencies is a critical error.

---

Empty Directory Workflow

If you are asked to build an iOS app or configure Xcode dependencies but no `.xcodeproj` or `.xcworkspace` exists, you MUST ask the user to create the project first:

"No Xcode project found in this directory. Please create an empty Xcode project manually and let me know when you are ready to proceed."

Wait for the user to confirm they have created the .xcodeproj via Xcode, then proceed with the Standard Xcode Workflow below.

---

Standard Xcode Workflow

Do not use raw text parsing, sed, or Ruby scripts to modify .pbxproj files directly.

Instead, execute the Swift configuration package bundled with this skill (scripts/xcode_spm_setup) to securely install SPM packages and link optional config files (like GoogleService-Info.plist).

CRITICAL: Always Use Latest SDK Version

To ensure access to the latest features and security fixes, always use the most recent version of the Firebase iOS SDK. Check for the latest release version at https://github.com/firebase/firebase-ios-sdk/releases.

  • Use the most recent version number (e.g., 11.x.y) in your commands instead of hardcoded placeholders.

Understanding the Script's Actions

When adding a Swift Package to an Xcode project, two distinct steps must occur: 1. Adding the package repository dependency (e.g., https://github.com/Alamofire/Alamofire). 2. Selecting the target (e.g., MyApp), navigating to General > Frameworks, Libraries, and Embedded Content, and hitting the + button to explicitly link the specific product modules (e.g., Alamofire).

The provided `xcode_spm_setup` Swift script automatically handles BOTH of these steps for you. By passing the list of modules as arguments, it safely injects the package dependency and automatically wires those modules to the main target's Frameworks build phase. You do not need to do any manual linking.

Usage

1. Locate the package path: Find the absolute path to this skill's scripts/xcode_spm_setup directory on disk. 2. Execute: Run the native swift run command using the signature below:

swift run --package-path <PATH_TO_SKILL>/scripts/xcode_spm_setup xcode_spm_setup <ProjectPath.xcodeproj> <RepoURL> <VersionRequirement> [--plist <Optional/Path/To/Config.plist>] <Product1> [Product2 ...]

Example 1: Generic Package (e.g., Alamofire)

Adding Alamofire to a standard Xcode project. Notice there is no --plist flag.

swift run --package-path /Users/foo/.agents/skills/xcode-project-setup/scripts/xcode_spm_setup xcode_spm_setup MyApp.xcodeproj https://github.com/Alamofire/Alamofire 5.8.1 Alamofire

Example 2: Firebase (Requires Plist)

Adding Firebase and linking the GoogleService-Info.plist to the resources build phase automatically. Note: Replace `11.0.0` with the actual latest version from [the releases page](https://github.com/firebase/firebase-ios-sdk/releases).

swift run --package-path /Users/foo/.agents/skills/xcode-project-setup/scripts/xcode_spm_setup xcode_spm_setup MyApp.xcodeproj https://github.com/firebase/firebase-ios-sdk 11.0.0 --plist MyApp/GoogleService-Info.plist FirebaseCore FirebaseAuth FirebaseFirestore

Note: The script is idempotent. It will automatically skip linking files or packages that are already present in the project.

Related skills

Forks & variants (1)

Xcode Project Setup has 1 known copy in the catalog totaling 375 installs. They canonicalize to this original listing.

FAQ

What platforms does xcode-project-setup target?

xcode-project-setup creates and configures Xcode projects for iOS and macOS with Swift Package Manager dependencies. The skill automates project scaffolding so agents can start native Apple platform development without manual Xcode wizard steps.

Which SPM packages does xcode-project-setup pin?

xcode-project-setup pins AEXML at version 4.7.0 and PathKit at version 1.0.1 as remote Swift Package Manager dependencies. These packages support programmatic manipulation of .xcodeproj files during agent-driven project setup.

When should agents use xcode-project-setup?

Agents should use xcode-project-setup when a developer needs a fresh Xcode workspace with SPM configured for a new iOS or macOS project. The skill is not intended for minor updates to existing projects or non-native cross-platform frameworks.

Is Xcode Project Setup safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.