本文へ移動
cccskills
無料GitHub で公開

swiftdata-pro

Writes, reviews, and improves SwiftData code using modern APIs and best practices. Use when reading, writing, or reviewing projects that use SwiftData.

日本語の概要は準備中です。原文の説明を表示しています。

n0an/VivaDictaスター 135(GitHub 135 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(9)

  • SKILL.md3.6 KB
  • agents/openai.yaml340 B
  • assets/swiftdata-pro-icon.png3.0 KB
  • assets/swiftdata-pro-icon.svg1.5 KB
  • references/class-inheritance.md3.7 KB
  • references/cloudkit.md662 B
  • references/core-rules.md3.9 KB
  • references/indexing.md800 B
  • references/predicates.md2.4 KB

SKILL.md(原文)

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

Write and review SwiftData 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 core SwiftData issues using references/core-rules.md.
  2. Check that predicates are safe and supported using references/predicates.md.
  3. If the project uses CloudKit, check for CloudKit-specific constraints using references/cloudkit.md.
  4. If the project targets iOS 18+, check for indexing opportunities using references/indexing.md.
  5. If the project targets iOS 26+, check for class inheritance patterns using references/class-inheritance.md.

If doing partial work, load only the relevant reference files.

Core Instructions

  • Target Swift 6.2 or later, using modern Swift concurrency.
  • The user strongly prefers to use SwiftData across the board. Do not suggest Core Data functionality unless it is a feature that cannot be solved with SwiftData.
  • Do not introduce third-party frameworks without asking first.
  • Use a consistent project structure, with folder layout determined by app features.

Output Format

If the user asks for a review, organize findings by file. For each issue:

  1. State the file and relevant line(s).
  2. Name the rule being violated.
  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.

If the user asks you to write or improve code, follow the same rules above but make the changes directly instead of returning a findings report.

Example output:

Destination.swift

Line 8: Add an explicit delete rule for relationships.

// Before
var sights: [Sight]

// After
@Relationship(deleteRule: .cascade, inverse: \Sight.destination) var sights: [Sight]

Line 22: Do not use isEmpty == false in predicates – it crashes at runtime. Use ! instead.

// Before
#Predicate<Destination> { $0.sights.isEmpty == false }

// After
#Predicate<Destination> { !$0.sights.isEmpty }

DestinationListView.swift

Line 5: @Query must only be used inside SwiftUI views.

// Before
class DestinationStore {
    @Query var destinations: [Destination]
}

// After
class DestinationStore {
    var modelContext: ModelContext

    func fetchDestinations() throws -> [Destination] {
        try modelContext.fetch(FetchDescriptor<Destination>())
    }
}

Summary

  1. Data loss (high): Missing delete rule on line 8 of Destination.swift means sights will be orphaned when a destination is deleted.
  2. Crash (high): isEmpty == false on line 22 will crash at runtime – use !isEmpty instead.
  3. Incorrect behavior (high): @Query on line 5 of DestinationListView.swift only works inside SwiftUI views.

End of example.

References

  • references/core-rules.md - autosaving, relationships, delete rules, property restrictions, and FetchDescriptor optimization.
  • references/predicates.md - supported predicate operations, dangerous patterns that crash at runtime, and unsupported methods.
  • references/cloudkit.md - CloudKit-specific constraints including uniqueness, optionality, and eventual consistency.
  • references/indexing.md - database indexing for iOS 18+, including single and compound property indexes.
  • references/class-inheritance.md - model subclassing for iOS 26+, including @available requirements, schema setup, and predicate filtering.

レビュー

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

コメント

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

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

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

0 / 1000 文字

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

同じリポジトリのスキル

Pull unrecognized host app bundle IDs from Google Analytics via gog, diff them against the mapping tables and add URL scheme mappings

日本語の概要は準備中です。原文の説明を表示しています。

n0an/VivaDicta1352026年10月25日 更新

Print the path to VivaDicta's app container directory in the iOS Simulator

日本語の概要は準備中です。原文の説明を表示しています。

n0an/VivaDicta1352026年10月25日 更新

Print the path to VivaDicta's App Group container directory in the iOS Simulator

日本語の概要は準備中です。原文の説明を表示しています。

n0an/VivaDicta1352026年10月25日 更新

Run an offline ASO audit on canonical App Store metadata under `./metadata` and surface keyword gaps using Astro MCP. Use after pulling metadata with `asc metadata pull`.

日本語の概要は準備中です。原文の説明を表示しています。

n0an/VivaDicta1352026年10月25日 更新

Pull current keyword rankings from Astro MCP, compare against the previous rankings check, and save a new rankings file to the vault. Use to measure ASO impact after metadata changes.

日本語の概要は準備中です。原文の説明を表示しています。

n0an/VivaDicta1352026年10月25日 更新

Automatically translate and sync App Store metadata (description, keywords, what's new, subtitle) to multiple languages using LLM translation and asc CLI. Use when asked to localize an app's App Store listing, translate app descriptions, or add new languages to App Store Connect.

日本語の概要は準備中です。原文の説明を表示しています。

n0an/VivaDicta1352026年10月25日 更新

n0an のスキルをすべて見る

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