swiftdata-code-review

SwiftData Code Review

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "swiftdata-code-review" with this command: npx skills add existential-birds/beagle/existential-birds-beagle-swiftdata-code-review

SwiftData Code Review

Quick Reference

Issue Type Reference

@Model, @Attribute, @Relationship, delete rules references/model-design.md

@Query, #Predicate, FetchDescriptor, #Index references/queries.md

@ModelActor, ModelContext, background operations references/concurrency.md

VersionedSchema, MigrationStage, lightweight/custom references/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

  • Could this relationship assignment cause NULL foreign keys?

  • Is @Relationship on both sides creating circular references?

  • Could this @Query block the main thread with large datasets?

  • Are model objects being passed between actors unsafely?

  • Would schema changes require a migration plan?

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

langgraph-code-review

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

docling

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

python-code-review

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

fastapi-code-review

No summary provided by upstream source.

Repository SourceNeeds Review