ios-add-file

Adds Swift files to Cubit projects by editing config files directly, bypassing Xcode's GUI.

1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/asnar00/miso --skill ios-add-file
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ios-add-file
Source: https://github.com/asnar00/miso/tree/main/.claude/skills/ios-add-file
Command: npx skills add https://github.com/asnar00/miso --skill ios-add-file

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables command-line workflows for iOS development by allowing you to add Swift source files to an Xcode project without opening the Xcode IDE. It automates the complex process of directly editing the project.pbxproj file, saving time and facilitating headless development.

Core Features & Use Cases

  • Headless Project Management: Programmatically updates the Xcode project file to include new Swift files, ensuring they are part of the build system.
  • UUID Generation: Handles the creation of unique identifiers required for project file entries, preventing manual errors.
  • Use Case: When generating a new Swift file from a template or another skill, use this skill to automatically integrate it into your Xcode project, ensuring it's included in the build without manual Xcode interaction.

Quick Start

Add a new Swift file named 'MyHelper.swift' to the 'NoobTest' Xcode project.

Frequently Asked Questions about ios-add-file

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a Swift file to an Xcode project from the command line?

Add a Swift file to an Xcode project without launching Xcode by automating edits to the project.pbxproj file. The skill updates PBXBuildFile, PBXFileReference, PBXGroup, and PBXSourcesBuildPhase entries, then verifies the build with xcodebuild to ensure the file integrates correctly into your build system.

Can I automate adding Swift files to Xcode projects in headless workflows?

Yes. This skill enables headless iOS development by programmatically integrating new Swift files into your Xcode project without GUI interaction. It handles UUID generation for project identifiers and includes the file in build phases automatically.

What do I need to add a Swift file to an Xcode project from the command line?

You need an existing .xcodeproj directory, a pre-created Swift file, and the uuidgen tool available on macOS. The skill directly modifies the project.pbxproj file and validates the result using xcodebuild.

How does the skill integrate a Swift file into the Xcode build system?

The skill edits the project.pbxproj file to create PBXBuildFile and PBXFileReference entries with unique identifiers, adds the file to the appropriate PBXGroup, and registers it in PBXSourcesBuildPhase so xcodebuild includes it during compilation.

Why use command-line file addition instead of Xcode's GUI for iOS projects?

Command-line workflows eliminate manual Xcode interaction, enabling automation when generating files from templates or other skills. This approach scales for bulk operations and integrates into CI/CD pipelines without IDE overhead.

What happens if I add a Swift file that's already registered in the Xcode project?

The skill requires a pre-created Swift file and expects the project.pbxproj to be editable. Duplicate entries would cause build errors; verify the file doesn't already exist in the project before running the skill.