本文へ移動
cccskills
無料GitHub で公開日本語紹介

swiftui-pro

SwiftUIのコードを読み、古いAPIやデータの受け渡し、画面構成、操作のしやすさ、性能を点検。問題のある箇所と修正前後のコードをファイル別に示します。

原文原文の説明を見る

Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projects.

インストール方法を見る

こんなときに便利

  • 既存のSwiftUIコードをレビュー
  • 非推奨APIを更新したいとき
  • 読み上げや文字サイズへの対応確認
  • データフロー・画面遷移・性能の点検

日本語での紹介

できること

SwiftUIのコードを点検し、正しさ、保守のしやすさ、性能に関わる問題を具体的な修正例とともに示します。古いAPI、ビューやアニメーション、データの受け渡し、画面遷移、Swiftの書き方を確認します。文字サイズへの追従、VoiceOverによる読み上げ、動きを抑える設定への対応など、アクセシビリティも対象です。

こんなときに便利

既存のSwiftUIアプリを見直すときや、実装中の画面がプロジェクトの規約に沿っているか確認したいときに向いています。指摘はファイルと行番号ごとに整理され、修正前後の短いコードが付きます。最後に優先順位が示されるため、影響の大きい変更から着手できます。特定分野だけの部分レビューにも対応します。

使い方の例

  • 「このSwiftUI画面のデータフローと性能をレビューして」
  • 「古いAPIとVoiceOverへの対応を確認し、修正例を示して」

注意点

Swift 6.2以降を対象とし、新規アプリの標準の配備対象はiOS 26とする方針です。UIKitは依頼がある場合に扱い、サードパーティー製フレームワークの追加前には確認を求めます。ライセンスはMITです。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(13)

  • SKILL.md4.0 KB
  • agents/openai.yaml330 B
  • assets/swiftui-pro-icon.png3.0 KB
  • assets/swiftui-pro-icon.svg1.5 KB
  • references/accessibility.md1.9 KB
  • references/api.md3.0 KB
  • references/data.md2.9 KB
  • references/design.md2.5 KB
  • references/hygiene.md1.1 KB
  • references/navigation.md1.3 KB
  • references/performance.md2.7 KB
  • references/swift.md4.0 KB
  • references/views.md2.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Review Swift and SwiftUI code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems - do not nitpick or invent issues.

Review process:

  1. Check for deprecated API using references/api.md.
  2. Check that views, modifiers, and animations have been written optimally using references/views.md.
  3. Validate that data flow is configured correctly using references/data.md.
  4. Ensure navigation is updated and performant using references/navigation.md.
  5. Ensure the code uses designs that are accessible and compliant with Apple’s Human Interface Guidelines using references/design.md.
  6. Validate accessibility compliance including Dynamic Type, VoiceOver, and Reduce Motion using references/accessibility.md.
  7. Ensure the code is able to run efficiently using references/performance.md.
  8. Quick validation of Swift code using references/swift.md.
  9. Final code hygiene check using references/hygiene.md.

If doing a partial review, load only the relevant reference files.

Core Instructions

  • iOS 26 exists, and is the default deployment target for new apps.
  • Target Swift 6.2 or later, using modern Swift concurrency.
  • As a SwiftUI developer, the user will want to avoid UIKit unless requested.
  • Do not introduce third-party frameworks without asking first.
  • Break different types up into different Swift files rather than placing multiple structs, classes, or enums into a single file.
  • Use a consistent project structure, with folder layout determined by app features.

Output Format

Organize findings by file. For each issue:

  1. State the file and relevant line(s).
  2. Name the rule being violated (e.g., "Use foregroundStyle() instead of foregroundColor()").
  3. Show a brief before/after code fix.

Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.

Example output:

ContentView.swift

Line 12: Use foregroundStyle() instead of foregroundColor().

// Before
Text("Hello").foregroundColor(.red)

// After
Text("Hello").foregroundStyle(.red)

Line 24: Icon-only button is bad for VoiceOver - add a text label.

// Before
Button(action: addUser) {
    Image(systemName: "plus")
}

// After
Button("Add User", systemImage: "plus", action: addUser)

Line 31: Avoid Binding(get:set:) in view body - use @State with onChange() instead.

// Before
TextField("Username", text: Binding(
    get: { model.username },
    set: { model.username = $0; model.save() }
))

// After
TextField("Username", text: $model.username)
    .onChange(of: model.username) {
        model.save()
    }

Summary

  1. Accessibility (high): The add button on line 24 is invisible to VoiceOver.
  2. Deprecated API (medium): foregroundColor() on line 12 should be foregroundStyle().
  3. Data flow (medium): The manual binding on line 31 is fragile and harder to maintain.

End of example.

References

  • references/accessibility.md - Dynamic Type, VoiceOver, Reduce Motion, and other accessibility requirements.
  • references/api.md - updating code for modern API, and the deprecated code it replaces.
  • references/design.md - guidance for building accessible apps that meet Apple’s Human Interface Guidelines.
  • references/hygiene.md - making code compile cleanly and be maintainable in the long term.
  • references/navigation.md - navigation using NavigationStack/NavigationSplitView, plus alerts, confirmation dialogs, and sheets.
  • references/performance.md - optimizing SwiftUI code for maximum performance.
  • references/data.md - data flow, shared state, and property wrappers.
  • references/swift.md - tips on writing modern Swift code, including using Swift Concurrency effectively.
  • references/views.md - view structure, composition, and animation.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

app-store-review

無料概要あり

AppleのApp Store審査ガイドラインに沿ってアプリのコードを点検します。課金や個人情報、ログインなどを確認し、申請前に却下につながり得る問題を洗い出します。

  • App Store申請前の点検
  • 課金やサブスクリプションの確認
  • 個人情報とアカウント削除の確認
jacklandrin/OnlySwitch6,0032026年10月21日 更新

onlyswitch-deeplink

無料概要あり

自然な言葉で頼んだ操作をOnlySwitchの内蔵機能に対応付けて実行します。macOSでスリープ防止やダークモードの切り替え、ごみ箱の消去などを呼び出せます。

  • スリープ防止を切り替えたいとき
  • ダークモードを切り替えたいとき
  • ごみ箱を空にしたいとき
jacklandrin/OnlySwitch6,0032026年10月21日 更新

swift-concurrency-pro

無料概要あり

Swiftの非同期・並行処理をレビューし、共有データの扱い、タスクの構成、キャンセルなどを点検。問題箇所と修正前後のコード、対応の優先順位を示します。

  • actorと共有データの扱いを確認
  • タスク構成とキャンセル処理の点検
  • 厳格な並行処理チェックのエラー調査
jacklandrin/OnlySwitch6,0032026年10月21日 更新

swift-testing-pro

無料概要あり

Swift Testingを使う単体・結合テストの作成とレビューを支援します。非同期処理や検証方法を点検し、XCTestからの移行にも対応します。

  • 単体・結合テストを作成したいとき
  • 非同期処理のテストを点検したいとき
  • XCTestから移行したいとき
jacklandrin/OnlySwitch6,0032026年10月21日 更新

writing-plans

無料概要あり

仕様や要件を、変更ファイル・実装コード・テスト手順まで含む実装計画にまとめます。作業を小さく分け、コードを書き始める前の準備や引き継ぎに使えます。

  • 実装前に開発計画を立てたいとき
  • 開発作業の引き継ぎ
  • 要件を検証可能なタスクに分けたいとき
jacklandrin/OnlySwitch6,0032026年10月21日 更新

jacklandrin のスキルをすべて見る

このスキルの問題を報告する