ddg-xcode-add-file
Skill274 starsChanged 9 days agoApache-2.0View on GitHub
Use when creating, moving, renaming or deleting a file or folder that belongs to the iOS or macOS Xcode project rather than a Swift package.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .maestro/AGENTS.mdAGENTS.md
- ddg-add-feature-flagSkill
- ddg-add-pixelSkill
- ddg-apple-feedback-reviewSkill
- ddg-design-systemSkill
- ddg-diagnose-ci-failureSkill
- ddg-drk-add-iconSkill
- ddg-macos-add-promoSkill
- ddg-sentry-reportSkill
- verify-iosSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Buildable folder: create, move or delete the file on disk and stop.
- Distinctive: line 38
New directory under a group: ask the user to create it in Xcode as a folder (File ▸ New ▸ Folder) so it becomes a buildable folder, on iOS …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Add, move or delete a file in the Xcode projects
Files inside a Swift package (SharedPackages/, iOS/LocalPackages/, macOS/LocalPackages/) need
no project change: SwiftPM reads them from disk. For everything else, what to do depends on how the
destination folder is represented in iOS/DuckDuckGo-iOS.xcodeproj/project.pbxproj or
macOS/DuckDuckGo-macOS.xcodeproj/project.pbxproj.
- Classify the destination. For each ancestor folder, nearest first, run
grep "path = <FolderName>;" <project.pbxproj> | grep PBXFileSystemSynchronizedRootGroup. A match is a buildable folder; no match all the way up is a group. If a folder name is ambiguous, confirm the match's ID is listed in the parent group'schildren. On iOS,iOS/DuckDuckGo/itself andiOS/DuckDuckGoTests/are still groups. The macOS project is mid-migration: most of its folders are still groups. - Buildable folder: create, move or delete the file on disk and stop. A pbxproj entry on top
of that compiles the file twice. If the file needs a different target than its folder gives
it, mirror an existing
PBXFileSystemSynchronizedBuildFileExceptionSet, or ask the user to set it in Xcode's File Inspector. Group: pick a sibling file with the same target membership and copy its entries with fresh IDs (
python3 -c "import secrets; print(secrets.token_hex(12).upper())", thengrepthat each ID is unused):- one
PBXFileReference - one
PBXBuildFileper target - one child line in the parent
PBXGroup - one line in each target's
PBXSourcesBuildPhase
On macOS that is normally two targets:
DuckDuckGo Privacy BrowserandDuckDuckGo Privacy Browser App Store, orUnit TestsandUnit Tests App Store. A file in only one of them builds locally and fails in CI. Moving or deleting a file removes the same entries.- one
- Edit surgically. Insert or delete lines anchored on the sibling's exact lines. Never
re-serialize the file, for example with the
xcodeprojgem: it rewrites package references and produces an unreviewable diff. - New directory under a group: ask the user to create it in Xcode as a folder (File ▸ New ▸ Folder) so it becomes a buildable folder, on iOS and macOS alike. Converting existing groups belongs in dedicated migration PRs that use Xcode's Convert to Folder.
Done when plutil -lint passes on the project file, its git diff holds only the lines for your
files, and each file is in every target its siblings are in.
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.

