Back to list
existential-birds

swiftdata-code-review

by existential-birds

Claude Code plugin for code review skills and verification workflows. Python, Go, React, FastAPI, BubbleTea, and AI frameworks (Pydantic AI, LangGraph, Vercel AI SDK).

11🍴 2📅 Jan 24, 2026

SKILL.md


name: swiftdata-code-review description: Reviews SwiftData code for model design, queries, concurrency, and migrations. Use when reviewing .swift files with import SwiftData, @Model, @Query, @ModelActor, or VersionedSchema.

SwiftData Code Review

Quick Reference

Issue TypeReference
@Model, @Attribute, @Relationship, delete rulesreferences/model-design.md
@Query, #Predicate, FetchDescriptor, #Indexreferences/queries.md
@ModelActor, ModelContext, background operationsreferences/concurrency.md
VersionedSchema, MigrationStage, lightweight/customreferences/migrations.md

Review Checklist

  • Models marked final (subclassing crashes)
  • @Relationship decorator on ONE side only (not both)
  • Delete rules explicitly set (not relying on default .nullify)
  • Relationships initialized to empty arrays, not default objects
  • Batch operations used for bulk inserts (append(contentsOf:))
  • @Query not loading thousands of items on main thread
  • External values in predicates captured in local variables
  • Scalar comparisons in predicates (not object references)
  • @ModelActor used for background operations
  • PersistentIdentifier/DTOs used to pass data between actors
  • VersionedSchema defined for each shipped version
  • MigrationPlan passed to ModelContainer

When to Load References

  • Reviewing @Model or relationships -> model-design.md
  • Reviewing @Query or #Predicate -> queries.md
  • Reviewing @ModelActor or background work -> concurrency.md
  • Reviewing schema changes or migrations -> migrations.md

Review Questions

  1. Could this relationship assignment cause NULL foreign keys?
  2. Is @Relationship on both sides creating circular references?
  3. Could this @Query block the main thread with large datasets?
  4. Are model objects being passed between actors unsafely?
  5. Would schema changes require a migration plan?

Score

Total Score

75/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon