swiftui-modernize
Modernize existing macOS SwiftUI code by replacing deprecated APIs with verified current production patterns.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Modernize existing macOS SwiftUI code by replacing deprecated APIs with verified current production patterns.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Audit macOS SwiftUI accessibility for correctness, current APIs, and production conventions. Use for that domain or as part of a full audit.
Audit macOS SwiftUI animation motion for correctness, current APIs, and production conventions. Use for that domain or as part of a full audit.
Audit macOS SwiftUI api currency for correctness, current APIs, and production conventions. Use for that domain or as part of a full audit.
Audit macOS SwiftUI appearance color for correctness, current APIs, and production conventions. Use for that domain or as part of a full audit.
Audit macOS SwiftUI appkit interop for correctness, current APIs, and production conventions. Use for that domain or as part of a full audit.
Audit macOS SwiftUI appkit overuse for correctness, current APIs, and production conventions. Use for that domain or as part of a full audit.
استنادا إلى تصنيف SOC المهني
| name | swiftui-modernize |
| description | Modernize existing macOS SwiftUI code by replacing deprecated APIs with verified current production patterns. |
| license | MIT |
Let <swiftui-plugin-root> be the absolute plugin directory two levels above this SKILL.md. Resolve that path before running commands or opening shared references. When these instructions say swiftui-ctx, invoke <swiftui-plugin-root>/scripts/swiftui-ctx; do not assume the command is on PATH.
Operates on code that already exists: it finds deprecated and outdated SwiftUI and migrates it to what
shipping macOS apps use today, using swiftui-ctx as the source of truth. (Writing new code → swiftui-examples.
Scaffolding a whole pattern → macos-app-patterns.)
swiftui-ctx = <swiftui-plugin-root>/scripts/swiftui-ctx (or swiftui-ctx on PATH). It self-builds + self-locates the catalog.
Do not guess whether an API is current. Check it. A call that compiles can still be deprecated — the catalog knows (it's flagged across 200–1,100 real repos). Announce: "Using swiftui-modernize to verify against production."
swiftui-ctx deprecated <api> → it returns deprecated: true/false, the replacement, and a note.
Run swiftui-ctx deprecated (no arg) once to see the full deprecated-in-the-wild list to scan against.swiftui-ctx lookup <replacement> → the modern idiom +
file --smart a real example, then rewrite.old → new with the permalink evidence, then apply.The common migrations are tabulated in references/migrations.md (read it for the fast path).
replacement the tool gives; confirm the new call's shape via lookup <replacement> consensus.@Observable over ObservableObject, NavigationStack/Split over
NavigationView, the Settings scene + MenuBarExtra for macOS — swiftui-ctx lookup shows current adoption.doc: link) to confirm the replacement's signature before rewriting.3 not-found → swiftui-ctx search "<broader>". 5 no catalog → STOP, tell the user, don't fabricate a migration.
| File | Read when |
|---|---|
references/migrations.md | You want the common deprecated→modern macOS SwiftUI migration table up front. |