
setup
by leepokai
SKILL.md
name: setup description: This skill should be used when the user asks to "setup smart build", "configure build settings", "initialize smart build", "run setup", or uses the /setup command. First-time configuration for Smart Build plugin.
Smart Build Setup Skill
⚠️ CRITICAL: READ THIS FIRST
YOU MUST follow these instructions EXACTLY as written.
DO NOT:
- ❌ Use Search or Glob tools - use the exact bash commands shown
- ❌ Skip steps or change the order
- ❌ Assume user preferences - YOU MUST use AskUserQuestion
- ❌ Use AppleScript or osascript
- ❌ Improvise or use alternative methods
YOU MUST:
- ✅ Run the EXACT bash commands shown in each step
- ✅ Use AskUserQuestion to ask user for mode preference
- ✅ Follow the step order: 1 → 2 → 3 → 4
Step 1: Check Project Directory
YOU MUST run this command first:
ls *.xcodeproj 2>/dev/null || ls *.xcworkspace 2>/dev/null || echo "NO_PROJECT"
If output is "NO_PROJECT": STOP and tell user:
"No Xcode project found. Please run Claude from your project directory:
cd /path/to/YourApp claudeThen run
/swiftui-smart-build:setupagain."
Do NOT proceed if no project found.
Step 2: Check Existing Config
YOU MUST run:
cat .smart-build.json 2>/dev/null || echo "NO_CONFIG"
If config exists: Show current settings and ask if user wants to reconfigure.
If "NO_CONFIG": Continue to Step 3.
Step 3: Ask User Preference
YOU MUST use AskUserQuestion with these exact options:
Question: "How should Smart Build determine your build settings?"
Options:
1. "Xcode Sync (Recommended)" - Automatically use whatever is selected in Xcode
2. "Custom" - Specify a fixed scheme and destination
Step 4A: Xcode Sync Mode
If user chose Xcode Sync:
- Show current Xcode settings:
${CLAUDE_PLUGIN_ROOT}/scripts/get-xcode-settings.sh
- Create config file with EXACTLY this format:
{
"mode": "xcode"
}
- Write to file:
echo '{"mode": "xcode"}' > .smart-build.json
- Tell user: "Setup complete! Smart Build will sync with Xcode."
Step 4B: Custom Mode
If user chose Custom:
- List available schemes:
xcodebuild -project *.xcodeproj -list -json 2>/dev/null | jq -r '.project.schemes[]'
-
Ask user to pick a scheme using AskUserQuestion
-
List available simulators:
xcrun simctl list devices available -j | jq -r '.devices[][] | select(.isAvailable==true) | select(.name | contains("iPhone")) | "\(.name) - \(.udid)"' | head -10
-
Ask user to pick a destination using AskUserQuestion
-
Create config file with EXACTLY this format:
{
"mode": "custom",
"scheme": "<USER_SELECTED_SCHEME>",
"destination": {
"type": "simulator",
"name": "<DEVICE_NAME>",
"udid": "<DEVICE_UDID>",
"platform": "iphonesimulator"
}
}
- Write config to
.smart-build.json
Config Format
Xcode mode (simple):
{
"mode": "xcode"
}
Custom mode:
{
"mode": "custom",
"scheme": "MyApp",
"destination": {
"type": "simulator",
"name": "iPhone 16 Pro",
"udid": "12345678-ABCD-1234-ABCD-123456789ABC",
"platform": "iphonesimulator"
}
}
DO NOT
❌ Do NOT add fields like xcodeSync, projectPath, defaultScheme, defaultDestination
❌ Do NOT use AppleScript to get Xcode settings
❌ Do NOT skip asking user for their preference
❌ Do NOT create config if no .xcodeproj found
❌ Do NOT use any format other than what is specified above
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon