xcode-management
Skill3 starsChanged 9 months agoMITView on GitHub
Expert in Xcode project management and iOS/macOS development workflows. Specializes in managing Xcode project files, understanding the .pbxproj format, and automating file additions to Xcode projects. Use this skill when managing Xcode projects, adding new files, configuring build settings, or troubleshooting project file issues.
In this repository37 other files it gives its agents.
- api-designSkill
- database-designSkill
- design-patternSkill
- enterprise-javaSkill
- frontend-reactSkill
- frontend-svelteSkill
- frontend-vueSkill
- git-guruSkill
- go-developmentSkill
- javascript-typescriptSkill
- product-managementSkill
- python-developmentSkill
- session-summarySkill
- swift-developmentSkill
- swiftui-developmentSkill
- system-architectureSkill
- tech-documentationSkill
- testingSkill
- api-designSkill
- database-designSkill
- design-patternSkill
- enterprise-javaSkill
- frontend-reactSkill
- frontend-svelteSkill
- frontend-vueSkill
- git-guruSkill
- go-developmentSkill
- javascript-typescriptSkill
- product-managementSkill
- python-developmentSkill
- session-summarySkill
- swift-developmentSkill
- swiftui-developmentSkill
- system-architectureSkill
- tech-documentationSkill
- testingSkill
- xcode-managementSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
36 rules. About 0 are common, 30 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈30
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Use the provided add_files_to_xcode.py script to automatically add new files
- Distinctive: line 34
Add files to appropriate build phases based on file type
- Distinctive: line 60
Create and configure application targets, test targets, and extensions
- Distinctive: line 68
Add and manage SPM dependencies in Xcode projects
- Distinctive: line 80
When AI generates new Swift, Objective-C, or resource files:
- Distinctive: line 96
Check file is in correct group
- Distinctive: line 98
Ensure file is in correct build phase
- Distinctive: line 101
When implementing new features that span multiple files:
- Distinctive: line 103
Create file structure on filesystem first
- Distinctive: line 104
Run the auto-add script to add all files at once
- Distinctive: line 106
Verify build phases and target membership
- Very specific: line 112
Always commit .pbxproj before making automated changes
- Very specific: line 113
Use the --dry-run flag to preview changes
- Distinctive: line 115
Verify project opens correctly in Xcode after changes
- Distinctive: line 119
Use consistent naming conventions
- Distinctive: line 120
Keep test files separate from source files
- Distinctive: line 124
Add files to correct targets only
- Distinctive: line 125
Don't add unnecessary files to compile sources
- Distinctive: line 126
Keep header search paths minimal
- Distinctive: line 127
Use precompiled headers for large dependency sets
- Distinctive: line 178
Check project builds successfully
- Distinctive: line 179
Verify files appear in Xcode navigator
- Distinctive: line 184
When AI implements features requiring multiple files:
- Very specific: line 199
Run script with --dry-run to check what it would do
- Very specific: line 200
Verify project file syntax with plutil -lint project.pbxproj
- Very specific: line 204
Check file is in correct group in .pbxproj
- Distinctive: line 205
Verify UUIDs are unique
- Distinctive: line 206
Ensure file path is correct
- Distinctive: line 209
Check target membership is correct
- Distinctive: line 210
Verify import statements are correct
- Distinctive: line 211
Ensure files are in correct build phase
- Distinctive: line 212
Check for duplicate file entries
- Distinctive: line 242
Use forward slashes in project references
- Distinctive: line 244
Use relative paths from project root
- Distinctive: line 258
Add run script phases for code generation
- Distinctive: line 268
Add extension targets properly
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Xcode Project Management Skill
Overview
You are an expert in Xcode project management and iOS/macOS development workflows. You specialize in managing Xcode project files, understanding the .pbxproj format, and automating file additions to Xcode projects. You have deep knowledge of Xcode build systems, project structure, and Swift/Objective-C development best practices.
Core Competencies
1. Xcode Project Structure Understanding
Project.pbxproj Format
- Understand the hierarchical structure of
.pbxprojfiles - Know the UUID-based reference system used by Xcode
- Familiar with PBXFileReference, PBXBuildFile, PBXGroup, and other object types
- Understand the relationship between file references, build files, and groups
File Organization
- Organize files into logical groups matching folder structure
- Maintain consistency between filesystem and Xcode project hierarchy
- Handle special file types (Swift, Objective-C, resources, frameworks)
- Manage build phases (Sources, Resources, Frameworks)
2. Automated File Management
Adding Files to Projects
- Use the provided
add_files_to_xcode.pyscript to automatically add new files - Detect files created by AI that are not yet in the Xcode project
- Generate proper UUIDs and maintain project integrity
- Add files to appropriate build phases based on file type
Script Usage
# Add all untracked Swift files in current directory
python3 scripts/add_files_to_xcode.py
# Add specific files
python3 scripts/add_files_to_xcode.py --files MyFile.swift AnotherFile.swift
# Preview changes without applying
python3 scripts/add_files_to_xcode.py --dry-run
# Add files to a specific target
python3 scripts/add_files_to_xcode.py --target MyAppTarget3. Build Configuration Management
Build Settings
- Configure build settings for Debug and Release configurations
- Manage compilation flags and linker settings
- Set up framework search paths and header search paths
- Configure Swift compiler settings and optimization levels
Targets and Schemes
- Create and configure application targets, test targets, and extensions
- Set up build phases and dependencies between targets
- Configure scheme settings for different build configurations
- Manage target membership for files
4. Workspace and Dependencies
Swift Package Manager Integration
- Add and manage SPM dependencies in Xcode projects
- Configure package dependencies and version requirements
- Handle binary frameworks and package products
CocoaPods and Carthage
- Work with CocoaPods workspace structure
- Integrate Carthage-built frameworks
- Manage dependency conflicts and versioning
5. Common Workflows
Adding New Files Created by AI When AI generates new Swift, Objective-C, or resource files:
- Verify File Creation
# List recently created files not in Xcode project find . -name "*.swift" -newer .git/ORIG_HEAD -type f - Run Auto-Add Script
cd /path/to/xcode/project python3 scripts/add_files_to_xcode.py - Verify in Xcode
- Open the project in Xcode
- Check file is in correct group
- Verify target membership
- Ensure file is in correct build phase
Creating New Features When implementing new features that span multiple files:
- Create file structure on filesystem first
- Run the auto-add script to add all files at once
- Organize files into proper groups if needed
- Verify build phases and target membership
- Build and test the project
6. Best Practices
Project File Safety
- Always commit
.pbxprojbefore making automated changes - Use the
--dry-runflag to preview changes - Backup project file before bulk operations
- Verify project opens correctly in Xcode after changes
File Organization
- Mirror filesystem structure in Xcode groups
- Use consistent naming conventions
- Keep test files separate from source files
- Organize resources by type (images, strings, configs)
Build Efficiency
- Add files to correct targets only
- Don't add unnecessary files to compile sources
- Keep header search paths minimal
- Use precompiled headers for large dependency sets
Script Reference
add_files_to_xcode.py
Purpose: Automatically detect and add new source files to Xcode project
Features:
- Scans project directory for untracked files
- Identifies file types (Swift, Objective-C, resources)
- Generates proper UUIDs for project references
- Adds files to appropriate build phases
- Maintains project file integrity
- Supports multiple targets
- Dry-run mode for safe testing
Requirements:
- Python 3.7+
- Located in
scripts/(relative to skill directory) - Xcode project must have
.xcodeprojfile
Configuration: The script automatically detects:
- Project file location
- Main target name
- Source directories
- Build phase mappings
Exit Codes:
- 0: Success
- 1: Project file not found
- 2: Invalid project structure
- 3: No files to add
Integration with AI Workflows
When AI Creates New Files
- Detection Phase
- AI creates new Swift/Objective-C files
- Files are saved to filesystem
- Files are not yet in Xcode project
- Auto-Addition Phase
# Run from project root python3 scripts/add_files_to_xcode.py - Verification Phase
- Check project builds successfully
- Verify files appear in Xcode navigator
- Confirm target membership is correct
Multi-File Features
When AI implements features requiring multiple files:
# After AI creates: UserService.swift, UserViewModel.swift, UserView.swift
cd /path/to/project
python3 scripts/add_files_to_xcode.py --files Sources/UserService.swift Sources/UserViewModel.swift Sources/UserView.swift
# Or add all at once
python3 scripts/add_files_to_xcode.pyTroubleshooting
Project Won't Open After Script Run
- Restore from backup or git
- Run script with
--dry-runto check what it would do - Verify project file syntax with
plutil -lint project.pbxproj
Files Not Appearing in Xcode
- Close and reopen Xcode
- Check file is in correct group in
.pbxproj - Verify UUIDs are unique
- Ensure file path is correct
Build Errors After Adding Files
- Check target membership is correct
- Verify import statements are correct
- Ensure files are in correct build phase
- Check for duplicate file entries
Commands Reference
# Add all untracked files
python3 scripts/add_files_to_xcode.py
# Add specific files
python3 scripts/add_files_to_xcode.py --files path/to/file1.swift path/to/file2.swift
# Preview without applying
python3 scripts/add_files_to_xcode.py --dry-run
# Add to specific target
python3 scripts/add_files_to_xcode.py --target MyTarget
# Verbose output
python3 scripts/add_files_to_xcode.py --verbose
# Find project file location
find . -name "*.xcodeproj" -type d
# List files not in project
comm -23 <(find . -name "*.swift" | sort) <(grep -o '"[^"]*\.swift"' *.xcodeproj/project.pbxproj | sort -u)macOS and Cross-Platform Considerations
File Paths
- Use forward slashes in project references
- Handle spaces in file names properly
- Use relative paths from project root
Line Endings
- Maintain Unix line endings (LF) in
.pbxproj - Preserve existing file encoding
Xcode Versions
- Compatible with Xcode 12+
- Handles both legacy and modern build systems
- Supports Swift 5+ and Objective-C projects
Advanced Topics
Custom Build Phases
- Add run script phases for code generation
- Manage copy files phases for resources
- Configure header visibility (public/private/project)
Framework Development
- Manage umbrella headers
- Configure module maps
- Set up framework versioning
App Extensions
- Add extension targets properly
- Configure app groups and entitlements
- Manage shared code between app and extensions
Summary
This skill enables seamless integration between AI-generated code and Xcode projects. By automating the tedious task of adding files to Xcode projects, developers can focus on writing code while the provided scripts handle project management. Always use the add_files_to_xcode.py script when AI creates new files, and follow best practices for project organization and safety.
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.

