Update Swiftui Apis

作者 avdlee204dba7c6725無授權條款3.6K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 天前更新

Scan Apple's SwiftUI documentation for deprecated APIs and update the SwiftUI Expert Skill with modern replacements. Use when asked to "update latest APIs", "refresh deprecated SwiftUI APIs", "check for new SwiftUI deprecations", "scan for API changes", or after a new iOS/Xcode release. Requires the Sosumi MCP to be available.

AI 產生的概覽

掃描 Apple SwiftUI 文件中的已棄用 API,並更新現代替代方案的參考檔案。

功能
此技能引導代理透過 Sosumi MCP 掃描 Apple 開發者文件,找出已棄用的 SwiftUI API 及其現代替代方案。它會將結果與現有參考檔案比對,歸類新增棄用、修正項目和新的版本區段,然後依規定格式更新該檔案,包含程式碼範例和快速查詢表。最後建立分支並開啟提取要求,附上變更摘要。
適用情境
當被要求更新最新 SwiftUI API、更新已棄用的 SwiftUI API、檢查新的 SwiftUI 棄用項目或掃描 API 變更時使用。它也適用於新的 iOS 或 Xcode 版本發布之後。
執行需求
需要啟用 Sosumi MCP,並使用其文件搜尋、擷取、影片逐字稿和外部文件工具。需要對目標儲存庫或分支具備寫入權限,並需要 gh CLI 來開啟提取要求。不附帶指令碼,僅為指示文件,另有一個掃描清單參考檔案。

Update SwiftUI APIs

Systematically scan Apple's developer documentation via the Sosumi MCP, identify deprecated SwiftUI APIs and their modern replacements, and update skills/swiftui-expert-skill/references/latest-apis.md.

Prerequisites

  • Sosumi MCP must be enabled and available (provides searchAppleDocumentation, fetchAppleDocumentation, fetchAppleVideoTranscript, fetchExternalDocumentation)
  • Write access to this repository (or a fork)

Workflow

1. Understand current coverage

Read skills/swiftui-expert-skill/references/latest-apis.md to understand:

  • Which deprecated-to-modern transitions are already documented
  • The version segments in use (iOS 15+, 16+, 17+, 18+, 26+)
  • The Quick Lookup Table at the bottom

2. Load the scan manifest

Read references/scan-manifest.md (relative to this skill). It contains the categorized list of API areas, documentation paths, search queries, and WWDC video paths to scan.

3. Scan Apple documentation

For each category in the manifest:

  1. Call searchAppleDocumentation with the listed queries to discover relevant pages.
  2. Call fetchAppleDocumentation with specific documentation paths to get full API details.
  3. Look for deprecation notices, "Deprecated" labels, and "Use ... instead" guidance.
  4. Note the iOS version where the modern replacement became available.
  5. Optionally call fetchAppleVideoTranscript for WWDC sessions that announce API changes.

Batch related searches together for efficiency. Focus on finding new deprecations not yet in latest-apis.md.

4. Compare and identify changes

Compare findings against existing entries. Categorize results:

  • New deprecations: APIs not yet documented in latest-apis.md
  • Corrections: Existing entries that need updating (wrong version, better replacement available)
  • New version segments: If a new iOS version introduces deprecations, add a new section

5. Update latest-apis.md

Follow the established format exactly. Each entry must include:

Section placement -- place under the correct version segment:

  • "Always Use (iOS 15+)" for long-deprecated APIs
  • "When Targeting iOS 16+" / "17+" / "18+" / "26+" for version-gated changes

Entry format:

markdown
**Always use `modernAPI()` instead of `deprecatedAPI()`.**
\```swift// ModernView()    .modernAPI()
// DeprecatedView()    .deprecatedAPI()\```

Quick Lookup Table -- add a row at the bottom of the file:

markdown
| `deprecatedAPI()` | `modernAPI()` | iOS XX+ |

Keep the attribution line at the top of the file:

Based on a comparison of Apple's documentation using the Sosumi MCP, we found the latest recommended APIs to use.

6. Open a pull request

  1. Create a branch from main named update/latest-apis-YYYY-MM (use current year and month).
  2. Commit changes to skills/swiftui-expert-skill/references/latest-apis.md.
  3. Open a PR via gh pr create with:
    • Title: "Update latest SwiftUI APIs (Month Year)"
    • Body: Summary of new/changed entries, attribution to Sosumi MCP

Sosumi MCP Tool Reference

ToolParametersReturns
searchAppleDocumentationquery (string)JSON with results[] containing title, url, description, breadcrumbs, tags, type
fetchAppleDocumentationpath (string, e.g. /documentation/swiftui/view/foregroundstyle(_:))Markdown documentation content
fetchAppleVideoTranscriptpath (string, e.g. /videos/play/wwdc2025/10133)Markdown transcript
fetchExternalDocumentationurl (string, full https URL)Markdown documentation content

Tips

  • Start broad with searchAppleDocumentation queries, then drill into specific paths with fetchAppleDocumentation.
  • Apple's deprecation docs typically say "Deprecated" in the page and link to the replacement.
  • WWDC "What's new in SwiftUI" sessions are the best source for newly introduced replacements.
  • When unsure about the exact iOS version for a deprecation, verify by checking the "Availability" section in the fetched documentation.
  • If an API is deprecated but no direct replacement exists, note this rather than suggesting an incorrect alternative.

來源與署名

來源:avdlee/swiftui-agent-skill位於.agents/skills/update-swiftui-apis提交204dba7

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架