К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

xcode-project-setup — скилл для Codex: установка

Скилл добавляет Swift Packages и связывает файлы в проектах Xcode. Пригодится для настройки зависимостей iOS, включая Firebase и Alamofire.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add firebase/agent-skills --skill xcode-project-setup -a claude-code
Открыть на GitHub

Что делает xcode-project-setup

Скилл настраивает зависимости Swift Package Manager в проекте .xcodeproj: добавляет репозиторий пакета, выбирает продукты и подключает их к основному target. Для конфигурационных файлов вроде GoogleService-Info.plist он также добавляет файл в ресурсную фазу сборки.

Изменения выполняет Swift-пакет scripts/xcode_spm_setup, который запускается через swift run. Повторный запуск пропускает уже добавленные пакеты и файлы. Для работы нужны macOS, установленный Swift и существующий проект Xcode; если .xcodeproj или .xcworkspace ещё нет, сначала создайте его вручную.

Для Firebase скрипт добавляет -ObjC в OTHER_LDFLAGS, когда подключаются продукты Firebase. Это повод проверить флаг в настройках сборки, если приложение падает при запуске.

Какие задачи решает

  • добавить Swift Package в проект Xcode
  • подключить продукты пакета к основному target
  • связать GoogleService-Info.plist с ресурсами
  • настроить Firebase через Swift Package Manager
  • повторно запустить настройку без дублирования связей

Примеры запросов агенту

  • Настрой `MyApp.xcodeproj` и добавь пакет Alamofire через `xcode_spm_setup`, подключив продукт `Alamofire`.
  • Подключи Firebase к `MyApp.xcodeproj` через Swift Package Manager и добавь `FirebaseCore`, `FirebaseAuth` и `FirebaseFirestore`.
  • Добавь `MyApp/GoogleService-Info.plist` в ресурсы проекта и проверь настройки линковщика для Firebase.

Как установить xcode-project-setup

1Через Skills CLI (Vercel)

npx skills add firebase/agent-skills --skill xcode-project-setup -a claude-code

2Вручную: положить файлы

~/.claude/skills/xcode-project-setup/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/xcode-project-setup/

Из того же набора8

Весь набор →
firebase-hosting-basics Google LLC Разворачивает статические сайты и SPA на Firebase Hosting CDN с SSL, preview-каналами и кастомными доменами. Claude Code CX Codex Cursor +1 169 800установок firebase-app-hosting-basics Google LLC Скилл помогает разворачивать и управлять SSR-приложениями на Next.js и Angular через Firebase App Hosting. Нужен для конфигурации, секретов и деплоя. Claude Code CX Codex Cursor +1 169 200установок firebase-data-connect Google LLC Скилл помогает проектировать схемы PostgreSQL, писать GraphQL-запросы и генерировать типизированные SDK для Firebase SQL Connect. Полезен при работе с реляционными базами в Firebase. Claude Code CX Codex Cursor +1 168 300установок firebase-security-rules-auditor Google LLC Проверяет правила безопасности Firebase на утечки, обход ролей и ошибки валидации. Нужен для аудита Firestore и Cloud Storage. Claude Code CX Codex Cursor +1 138 200установок firebase-ai-logic-basics Google LLC Подключает модели Gemini напрямую в клиенты Android, iOS, Web и Flutter через Firebase AI Logic. Помогает настроить вызовы API, стриминг и мультимодальные входы. Claude Code CX Codex Cursor +1 135 300установок firebase-crashlytics Google LLC Скилл для подключения Firebase Crashlytics к агентам в Claude Code, Cursor и других платформах. Собирает данные о падениях приложений на Android и iOS, помогает отследить ошибки через MCP-сервер Firebase CLI. Claude Code CX Codex Cursor +1 131 200установок firebase-remote-config-basics Google LLC Скилл помогает управлять Remote Config в приложениях на Android и iOS через Firebase CLI. Позволяет менять флаги функций и параметры без выкатки обновлений в магазины. Claude Code CX Codex Cursor +1 120 800установок

Похожие

react-native-design Seth Hobson Скилл помогает собирать React Native-приложения со стилями, навигацией и анимациями Reanimated. Пригодится для кроссплатформенной мобильной разработки. Claude Code CX Codex Cursor 15 522установок react-native-architecture Seth Hobson Скилл для Claude Code, Codex и Cursor: подсказывает структуру проекта, навигацию, нативные модули и офлайн-синхронизацию в React Native на Expo. Claude Code CX Codex Cursor 15 087установок accessibility-compliance Seth Hobson Скилл помогает проверять доступность интерфейсов и исправлять проблемы с клавиатурной навигацией, экранными дикторами и формами. Подключайте его при работе с WCAG 2.2. Claude Code CX Codex Cursor 14 596установок developer-device-platform-basics официальный google Скилл помогает управлять удалёнными Android-устройствами в Developer Device Platform: находить модели, запускать сессии и подключать их через ADB. Claude Code Gemini CLI CX Codex 4 500установок vercel-react-native-skills vercel Набор правил по React Native и Expo для ИИ-агента: списки, анимации, навигация. Пригодится, когда агент правит мобильный код и надо, чтобы он делал это одинаково. Claude Code CX Codex Cursor +1 253 900установок animate-expo emilkowalski Создаёт мобильные анимации для React Native и Expo на базе Reanimated и Gesture Handler. Помогает избежать просадок кадров на реальных устройствах. Claude Code CX Codex Cursor +1 135 900установок mobile-native emilkowalski Убирает мелочи, из-за которых веб-приложение на телефоне выдаёт себя: залипающий hover, вспышку при тапе, ошибку с 100vh. Claude Code CX Codex Cursor +1 84 500установок aso coreyhaines31 Анализирует страницы приложений в App Store и Google Play по правилам поисковой оптимизации. Находит слабые места в метаданных, графике и конверсии. Claude Code CX Codex Cursor +1 74 900установок

Вопросы о xcode-project-setup

Как установить xcode-project-setup в Codex?

Выполните npx skills add firebase/agent-skills --skill xcode-project-setup -a codex, затем откройте .agents/skills/xcode-project-setup/SKILL.md.

Что делает xcode-project-setup?

Скилл добавляет Swift Packages в проект Xcode, подключает выбранные продукты к основному target и связывает конфигурационные файлы с ресурсами.

Что нужно для работы xcode-project-setup?

Нужны macOS, установленный Swift и уже созданный проект Xcode. Перед настройкой зависимостей проверяется команда swift --version.

Исходный текст

SKILL.md · Apache-2.0
---
name: xcode-project-setup
description: 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).
compatibility: Requires Swift to be installed locally and macOS environment.
metadata:
  author: Google LLC
  category: ApplicationDevelopment
---

# 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](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`).
1. 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.
1. **Execute:** Run the native `swift run` command using the signature below:

```bash
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.

```bash
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).*

```bash
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.*

© Google LLC · Apache-2.0 · firebase/agent-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой