Help us improve
Share bugs, ideas, or general feedback.
From skills
Registers newly created .swift, .m, .mm, .c, .cpp, .h files with .xcodeproj via Ruby script so they appear in Xcode navigator and compile.
npx claudepluginhub michaelboeding/skills --plugin skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/skills:add-to-xcodeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Every time you create a `.swift`, `.m`, `.mm`, `.c`, `.cpp`, or `.h` file in an Xcode project, you MUST run:**
Adds Swift Packages and links files to Xcode projects (.pbxproj). Invoked automatically when iOS dependencies like Firebase or Alamofire need installation.
Builds Objective-C / Objective-C++ projects with Xmake: `.m` / `.mm` files, Cocoa/Foundation frameworks, mixed C++, and macOS/iOS/tvOS targets.
Adds production features like CI/CD, auto-updates, logging, SwiftLint, localization, Launch at Login to existing macOS Swift apps after analyzing project status.
Share bugs, ideas, or general feedback.
Every time you create a .swift, .m, .mm, .c, .cpp, or .h file in an Xcode project, you MUST run:
ruby ${CLAUDE_PLUGIN_ROOT}/skills/add-to-xcode/scripts/add_to_xcode.rb <filepath>
If you skip this step:
# ALWAYS do this after creating any source file:
# Use subshell to get latest version (handles multiple cached versions)
ruby "$(ls -1d ~/.claude/plugins/cache/michaelboeding-skills/skills/*/skills/add-to-xcode/scripts/add_to_xcode.rb 2>/dev/null | sort -V | tail -1)" NewFile.swift
| Extension | Added to Compile Sources |
|---|---|
.swift | ✅ Yes |
.m | ✅ Yes |
.mm | ✅ Yes |
.c | ✅ Yes |
.cpp | ✅ Yes |
.h | ❌ No (reference only) |
# Example: Create a new Swift file
cat > Sources/Features/MyFeature.swift << 'EOF'
import Foundation
class MyFeature {
// Implementation
}
EOF
ruby ${CLAUDE_PLUGIN_ROOT}/skills/add-to-xcode/scripts/add_to_xcode.rb Sources/Features/MyFeature.swift
Output:
✓ Added Sources/Features/MyFeature.swift to MyApp.xcodeproj (target: MyApp)
.xcodeproj - Searches current directory and parents.swift, .m, .mm, .c, .cpp) are added to the first target's compile sourcesRuby with the xcodeproj gem:
gem install xcodeproj
# Create the file
cat > MyApp/ViewModels/ProfileViewModel.swift << 'EOF'
import SwiftUI
@Observable
class ProfileViewModel {
var name: String = ""
var email: String = ""
}
EOF
# Add to Xcode
ruby ${CLAUDE_PLUGIN_ROOT}/skills/add-to-xcode/scripts/add_to_xcode.rb MyApp/ViewModels/ProfileViewModel.swift
# Create header
cat > MyApp/Bridge/MyApp-Bridging-Header.h << 'EOF'
#import <SomeLibrary/SomeLibrary.h>
EOF
# Add to Xcode (headers are added but not to compile sources)
ruby ${CLAUDE_PLUGIN_ROOT}/skills/add-to-xcode/scripts/add_to_xcode.rb MyApp/Bridge/MyApp-Bridging-Header.h
# Create implementation
cat > MyApp/Legacy/LegacyManager.m << 'EOF'
#import "LegacyManager.h"
@implementation LegacyManager
// Implementation
@end
EOF
# Add to Xcode
ruby ${CLAUDE_PLUGIN_ROOT}/skills/add-to-xcode/scripts/add_to_xcode.rb MyApp/Legacy/LegacyManager.m
When working in an Xcode project, agents should:
.xcodeproj before creating source files# Pattern for agents:
# 1. Create file
cat > NewFile.swift << 'EOF'
// content
EOF
# 2. Register with Xcode
ruby ${CLAUDE_PLUGIN_ROOT}/skills/add-to-xcode/scripts/add_to_xcode.rb NewFile.swift
gem install xcodeprojsudo gem install xcodeproj.swift, .m, .mm, .c, .cpp).h) are not added to compile sources (this is correct)| Skill | Use Case |
|---|---|
ios-to-android | Convert iOS code to Android |
android-to-ios | Convert Android code to iOS |