agentleFS
igorkulmanigorkulman/pi-skills/skills/xcodebuild-xcsift/SKILL.md

xcodebuild-xcsift

Skill3 starsChanged 2 months agoMITView on GitHub

Fallback workflow for Xcode/iOS/macOS builds and tests when Xcode MCP is unavailable or cannot perform the required operation. Runs shell xcodebuild through xcsift with reliable failure propagation and compact output.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 6 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer the relevant Xcode MCP tool for builds, tests, diagnostics, SwiftUI previews, Apple documentation, and Swift snippets when it is …

    line 13
  2. Distinctive:

    Use this shell workflow only when Xcode MCP is unavailable, its connection fails, or it does not expose the required operation.

    line 14
  3. Very specific:

    Treat compilation errors and failing tests returned by Xcode MCP as real results.

    line 15
  4. Distinctive:

    Use one route for a verification cycle.

    line 16
  5. Very specific:

    Always pipe xcodebuild output to xcsift.

    line 22
  6. Distinctive:

    Always redirect stderr to stdout before piping:

    line 23
  7. Very specific:

    Prefer set -o pipefail so xcodebuild failures are not hidden by the pipe.

    line 27
  8. Very specific:

    Do not call xcsift --help just to remember common syntax.

    line 28
  9. Very specific:

    Only check command -v xcsift when availability is genuinely uncertain or a command fails because xcsift is missing.

    line 29
  10. Distinctive:

    Use project-local instructions first for workspace/project, scheme, destination, and test plan names.

    line 30
  11. Very specific:

    Prefer -workspace <Name>.xcworkspace whenever an .xcworkspace exists.

    line 31
  12. Very specific:

    If multiple workspaces are available and project-local instructions do not identify the intended one, ask before running xcodebuild.

    line 32
  13. Very specific:

    Use this whenever an .xcworkspace exists:

    line 39
  14. Very specific:

    Use this only when no .xcworkspace exists or project-local instructions explicitly require the project:

    line 53
  15. Very specific:

    Prefer the workspace form when an .xcworkspace exists:

    line 67
  16. Very specific:

    Use -project <ProjectName>.xcodeproj instead only when no workspace is available or project-local instructions explicitly require it.

    line 79
  17. Distinctive:

    After a command finishes, summarize:

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Xcodebuild with xcsift

Fallback workflow for invoking shell xcodebuild when Xcode MCP cannot perform the required build or test operation.

Select the execution route

  1. Prefer the relevant Xcode MCP tool for builds, tests, diagnostics, SwiftUI previews, Apple documentation, and Swift snippets when it is available.
  2. Use this shell workflow only when Xcode MCP is unavailable, its connection fails, or it does not expose the required operation.
  3. Treat compilation errors and failing tests returned by Xcode MCP as real results. Diagnose them through Xcode MCP instead of repeating the same operation with shell xcodebuild.
  4. Use one route for a verification cycle. Never run Xcode MCP and shell builds/tests concurrently.

Once the shell fallback is necessary, apply the rules and templates below.

Core rules

  • Always pipe xcodebuild output to xcsift.
  • Always redirect stderr to stdout before piping:
    xcodebuild ... 2>&1 | xcsift ...
  • Prefer set -o pipefail so xcodebuild failures are not hidden by the pipe.
  • Do not call xcsift --help just to remember common syntax; use the templates below.
  • Only check command -v xcsift when availability is genuinely uncertain or a command fails because xcsift is missing.
  • Use project-local instructions first for workspace/project, scheme, destination, and test plan names.
  • Prefer -workspace <Name>.xcworkspace whenever an .xcworkspace exists. Use -project <Name>.xcodeproj only when no workspace is available or project-local instructions explicitly require it.
  • If multiple workspaces are available and project-local instructions do not identify the intended one, ask before running xcodebuild.
  • Build/test verification may create derived artifacts, but must not edit source, schemes, project settings, or system permissions unless that change is authorized.

Common templates

Build an Xcode workspace preferred

Use this whenever an .xcworkspace exists:

set -o pipefail
xcodebuild \
  -workspace <WorkspaceName>.xcworkspace \
  -scheme "<Scheme Name>" \
  -destination 'generic/platform=iOS Simulator' \
  build \
  2>&1 | xcsift --quiet

Build an Xcode project fallback

Use this only when no .xcworkspace exists or project-local instructions explicitly require the project:

set -o pipefail
xcodebuild \
  -project <ProjectName>.xcodeproj \
  -scheme "<Scheme Name>" \
  -destination 'generic/platform=iOS Simulator' \
  build \
  2>&1 | xcsift --quiet

Run tests

Prefer the workspace form when an .xcworkspace exists:

set -o pipefail
xcodebuild \
  -workspace <WorkspaceName>.xcworkspace \
  -scheme "<Scheme Name>" \
  -destination 'platform=iOS Simulator,name=<Simulator Name>' \
  test \
  2>&1 | xcsift --quiet

Use -project <ProjectName>.xcodeproj instead only when no workspace is available or project-local instructions explicitly require it.

Include warning details

set -o pipefail
xcodebuild ... 2>&1 | xcsift --warnings

Treat warnings as failures

set -o pipefail
xcodebuild ... 2>&1 | xcsift --Werror

TOON output for compact summaries

set -o pipefail
xcodebuild ... 2>&1 | xcsift --format toon --quiet

Reporting results

After a command finishes, summarize:

  • command purpose: build/test
  • status: success/failure
  • errors count
  • failed tests count, if any
  • warnings count, if present
  • notable error messages or failing test names

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.