Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
existential-birds avatar

Swiftdata Code Review

  • 119 installs
  • 74 repo stars
  • Updated July 21, 2026
  • existential-birds/beagle

Audit SwiftData models, migrations, fetch descriptors, and CloudKit sync assumptions to prevent data loss and query performance issues.

About

Specialized review skill for SwiftData stacks: inspects @Model definitions, versioning, fetch performance, delete rules, and sync edge cases so mobile apps avoid corrupt stores and slow on-device queries.

  • Model schema review
  • Migration safety
  • Fetch predicate tuning
  • Relationship integrity
  • CloudKit sync risks

Swiftdata Code Review by the numbers

  • 119 all-time installs (skills.sh)
  • Ranked #547 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/existential-birds/beagle --skill swiftdata-code-review

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs119
repo stars74
Last updatedJuly 21, 2026
Repositoryexistential-birds/beagle

What it does

Audit SwiftData models, migrations, fetch descriptors, and CloudKit sync assumptions to prevent data loss and query performance issues.

Files

SKILL.mdMarkdownGitHub ↗

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

Hard gates (before reporting findings)

Run in order; do not assert an issue until the gate for that issue passes.

1. Scope — pass when: You have the target .swift path(s) and confirmed SwiftData surface in scope (e.g. import SwiftData, @Model, @Query, @ModelActor, VersionedSchema, or migration types). If none apply, stop or narrow scope with one sentence. 2. Reference — pass when: For each checklist area you evaluate (models, queries, concurrency, migrations), you opened the matching references/*.md from the Quick Reference table or wrote N/A: no <area> in this review with a one-line reason. 3. Evidence — pass when: Every finding uses the [FILE:LINE] ISSUE_TITLE header (line range allowed) from the file you read; no finding without a cite. 4. Report — pass when: Findings list cites first (or inline) using [FILE:LINE] ISSUE_TITLE, then severity or checklist grouping—no uncited assertions.

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?

Related skills

Mobile Developmentbackendtesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.