/ الدليل / الملعب / SwiftUI Agent Skill
● مجتمع twostraws ⚡ فوري

SwiftUI Agent Skill

بواسطة twostraws · twostraws/SwiftUI-Agent-Skill

Paul Hudson's SwiftUI patterns packaged as a Claude skill.

By Paul Hudson (Hacking with Swift), this skill teaches Claude modern SwiftUI: @Observable, NavigationStack, async views, proper state ownership. The result: SwiftUI code that actually compiles and follows Apple's current guidance.

لماذا تستخدمه

الميزات الأساسية

عرض مباشر

كيف يبدو في الممارسة

swiftui-agent-skill.replay ▶ جاهز
0/0

التثبيت

اختر العميل

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "swiftui-agent-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/twostraws/SwiftUI-Agent-Skill",
        "~/.claude/skills/SwiftUI-Agent-Skill"
      ],
      "_inferred": true
    }
  }
}

افتح Claude Desktop → Settings → Developer → Edit Config. أعد التشغيل بعد الحفظ.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "swiftui-agent-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/twostraws/SwiftUI-Agent-Skill",
        "~/.claude/skills/SwiftUI-Agent-Skill"
      ],
      "_inferred": true
    }
  }
}

يستخدم Cursor نفس مخطط mcpServers مثل Claude Desktop. إعدادات المشروع أولى من الإعدادات العامة.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "swiftui-agent-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/twostraws/SwiftUI-Agent-Skill",
        "~/.claude/skills/SwiftUI-Agent-Skill"
      ],
      "_inferred": true
    }
  }
}

انقر على أيقونة MCP Servers في شريط Cline الجانبي، ثم "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "swiftui-agent-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/twostraws/SwiftUI-Agent-Skill",
        "~/.claude/skills/SwiftUI-Agent-Skill"
      ],
      "_inferred": true
    }
  }
}

نفس الصيغة مثل Claude Desktop. أعد تشغيل Windsurf لتطبيق التغييرات.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "swiftui-agent-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/twostraws/SwiftUI-Agent-Skill",
        "~/.claude/skills/SwiftUI-Agent-Skill"
      ]
    }
  ]
}

يستخدم Continue مصفوفة من كائنات الخادم بدلاً من خريطة.

~/.config/zed/settings.json
{
  "context_servers": {
    "swiftui-agent-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/twostraws/SwiftUI-Agent-Skill",
          "~/.claude/skills/SwiftUI-Agent-Skill"
        ]
      }
    }
  }
}

أضف إلى context_servers. يعيد Zed التحميل تلقائيًا عند الحفظ.

claude mcp add swiftui-agent-skill -- git clone https://github.com/twostraws/SwiftUI-Agent-Skill ~/.claude/skills/SwiftUI-Agent-Skill

أمر من سطر واحد. تحقق باستخدام claude mcp list. احذف باستخدام claude mcp remove.

حالات الاستخدام

استخدامات عملية: SwiftUI Agent Skill

Build a settings screen the right way (iOS 17+)

👤 iOS devs ⏱ ~15 min intermediate

متى تستخدمه: You want a Settings screen that's actually idiomatic for iOS 17+.

المتطلبات الأساسية
  • Server/skill installed and authenticated — See repo README
الخطوات
  1. Plan
    Using the SwiftUI skill, design a Settings view with sections: Account, Notifications, About. Use @Observable for the view model.✓ تم النسخ
    → View hierarchy + ViewModel sketch
  2. Code
    Write the full file with toggles, NavigationLink to subpages, and a confirmation dialog for sign-out.✓ تم النسخ
    → Compiles on Xcode 15+

النتيجة: Idiomatic SwiftUI you don't have to rewrite next year.

المزالق
  • Don't mix @StateObject with @Observable — Don't mix @StateObject with @Observable — the skill enforces one or the other; follow it.

التكلفة والحدود

تكلفة التشغيل

حصة API
See provider docs for rate limits
الرموز لكل استدعاء
Varies by tool
التكلفة المالية
See repo README for pricing details
نصيحة
Cache tool results and avoid repeated identical calls.

الأمان

الصلاحيات والأسرار ونطاق الأثر

تخزين بيانات الاعتماد: Use environment variables; never commit secrets
نقل البيانات الخارجي: Tool calls go to the provider's API as documented

استكشاف الأخطاء

الأخطاء الشائعة وحلولها

view doesn't update on state change

Ensure the property is on an @Observable class, not a struct. The skill's checklist covers this.

تحقق: @Observable annotation present
preview crashes

@Observable views need a real instance in #Preview. The skill's examples show the pattern.

تحقق: Preview compiles

البدائل

SwiftUI Agent Skill مقابل البدائل

البديلمتى تستخدمهاالمقايضة
wholiver/swiftui-design-skillYou want design direction, not code patternsDesign-focused; twostraws is code-focused

المزيد

الموارد

📖 اقرأ ملف README الرسمي على GitHub

🐙 تصفح القضايا المفتوحة

🔍 تصفح أكثر من 400 خادم MCP و Skills