Get the FREE Ultimate OpenClaw Setup Guide →

apple-swift-cli-fallback

npx machina-cli add skill gaelic-ghost/apple-dev-skills/apple-swift-cli-fallback --openclaw
Files (1)
SKILL.md
2.6 KB

Apple Swift CLI Fallback

Use this skill when MCP-first execution cannot complete the requested task.

Core Rules

  • Fallback must be automatic and use official tooling.
  • Keep fallback commands explicit and reproducible.
  • Include concise MCP advisory only if cooldown allows.
  • If CLI command is unavailable or blocked, provide ~/.codex/rules allowlist guidance.

Workflow

  1. Receive handoff from $xcode-mcp-first-executor or detect MCP unavailability.
  2. Select official command path from references/cli-fallback-matrix.md.
  3. Execute fallback command.
  4. Check advisory cooldown via scripts/advisory_cooldown.py.
  5. If eligible, include short MCP setup benefit note.
  6. If command blocked/missing, provide minimal allowlist and setup actions.

Toolchain Policy

  • Prefer swiftly when available.
  • Otherwise use official Xcode toolchain and CLT guidance from references/toolchain-management.md.

References

  • references/cli-fallback-matrix.md
  • references/toolchain-management.md
  • references/allowlist-guidance.md

Scripts

  • scripts/advisory_cooldown.py

Interactive Customization Flow

  1. Load current effective customization settings first:
  • uv run python scripts/customization_config.py effective
  1. Ask targeted customization questions:
  • Use references/customization-flow.md to drive knob-by-knob questions.
  • Confirm desired behavior changes and safety constraints.
  1. Map requested changes to implementation files:
  • Update SKILL.md, references/*, and any runtime script files listed in references/customization-flow.md.
  1. Persist durable customization state:
  • Start from customization.template.yaml defaults.
  • Apply approved overrides with uv run python scripts/customization_config.py apply --input <yaml-file>.
  • Durable path: ~/.config/gaelic-ghost/apple-dev-skills/<skill-name>/customization.yaml.
  • Optional override root: APPLE_DEV_SKILLS_CONFIG_HOME.
  1. Report resulting effective configuration:
  • Re-run uv run python scripts/customization_config.py effective and summarize final active settings.
  • If the user asks to remove customization state, run uv run python scripts/customization_config.py reset.

Use references/customization-flow.md for skill-specific knobs, file mapping, guardrails, validation checks, and example requests.

Source

git clone https://github.com/gaelic-ghost/apple-dev-skills/blob/main/swift-xcode-tools/apple-swift-cli-fallback/SKILL.mdView on GitHub

Overview

Automatically fallback to official Apple CLI tooling when MCP-first execution cannot complete. It targets xcodebuild, xcrun, SwiftPM, and swiftly toolchain workflows, ensuring reproducible commands and optional MCP advisory notes when cooldown permits.

How This Skill Works

When MCP-first execution fails or is blocked, the system selects an official CLI path from references/cli-fallback-matrix.md and executes it. If swiftly is available, it is preferred; otherwise it follows the toolchain guidance in references/toolchain-management.md. The script checks advisory cooldown via scripts/advisory_cooldown.py and may surface a short MCP setup benefit note.

When to Use It

  • MCP-first path unavailable or returns errors.
  • Xcode toolchains are installed but MCP paths are incomplete.
  • You need to build with xcodebuild or xcrun using the official CLI instead of MCP.
  • SwiftPM or swiftly toolchain workflows require a CLI fallback path.
  • You want to customize or audit the fallback behavior via the customization flow.

Quick Start

  1. Step 1: Detect MCP unavailability or failure from the MCP-first executor.
  2. Step 2: Execute the chosen official CLI command path (prefer swiftly if present).
  3. Step 3: Run advisory cooldown check and report MCP benefits if eligible; provide allowlist guidance if blocked.

Best Practices

  • Prefer swiftly when available for speed and compatibility.
  • Keep fallback commands explicit and reproducible via references/cli-fallback-matrix.md.
  • Provide concise MCP advisory only when the cooldown allows.
  • If a CLI command is blocked, surface minimal allowlist guidance and setup steps.
  • Document any customization changes via the customization flow.

Example Use Cases

  • MCP fails to locate the Xcode path; the system runs xcrun or xcodebuild via CLI fallback.
  • SwiftPM build is triggered; fallback uses the official Swift CLI to perform the build.
  • Swiftly toolchain is available; the fallback chooses swiftly for the task.
  • Command is blocked by policy; fallback presents an allowlist and minimal setup guidance.
  • User requests to customize fallback behavior; the system engages the customization flow and updates guidance.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers