skillfed

swiftdata-code-review

swiftdata-code-review provides intelligent code review tailored to SwiftData model patterns, helping developers validate schema design and follow framework conventions. The skill analyzes your data models for correctness, performance considerations, and alignment with SwiftData best practices, offering actionable feedback on architecture and implementation details.

swiftdata-code-review provides intelligent code review tailored to SwiftData model patterns, analyzing your data models for correctness, performance considerations, and alignment with SwiftData best practices. The skill validates schema design, checks @model and @query decorators, examines relationship definitions and delete rules, reviews concurrency patterns with actors, and audits schema migrations and versioning to offer actionable feedback on architecture and implementation details.

AI-generated summary based on this skill's SKILL.md

74 10 Apache-2.0 updated by existential-birds

Install

existential-birds/beagle/swiftdata-code-review · repository language: TypeScript

CLI (skillfed)coming soon
git clone https://github.com/existential-birds/beagle
cp -r beagle/plugins/beagle-ios/skills/swiftdata-code-review ~/.claude/skills/swiftdata-code-review

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What does swiftdata-code-review analyze in my models?

swiftdata-code-review provides intelligent code review tailored to SwiftData model patterns, analyzing your data models for correctness, performance considerations, and alignment with SwiftData best practices. The skill validates schema design, checks @model and @query decorators, examines relationship definitions and delete rules, reviews concurrency patterns with actors, and audits schema migrations and versioning to offer actionable feedback on architecture and implementation details.

How does swiftdata-code-review review SwiftData models?

swiftdata-code-review reviews SwiftData models by examining @model decorator usage, property definitions, and relationship configurations for correctness. It validates that models follow framework conventions, checks for common design pitfalls, and ensures relationships use appropriate delete rules. The skill also assesses whether your model structure supports efficient querying and proper data persistence patterns aligned with SwiftData best practices.

Can swiftdata-code-review validate SwiftData queries and predicates for performance?

Yes. swiftdata-code-review validates SwiftData queries and predicates for performance by analyzing @query definitions, predicate construction, and filtering logic. The skill identifies inefficient query patterns, checks for unnecessary data fetching, and reviews predicate complexity to help you optimize database access and reduce performance bottlenecks in your SwiftData implementation.

Does swiftdata-code-review check for concurrency issues?

Yes. swiftdata-code-review checks SwiftData concurrency and actor-based operations by reviewing how you structure model access across threads. The skill audits actor isolation, validates main-thread safety in model contexts, and identifies potential data race conditions or blocking operations that could impact app responsiveness and data consistency.

What schema migration issues can swiftdata-code-review audit?

swiftdata-code-review audits SwiftData schema migrations and versioning by reviewing @VersionedSchema usage, migration plans, and version transitions. The skill validates that your migration strategy handles data transformations correctly, checks for proper version sequencing, and ensures delete rules and relationship changes are handled safely during schema evolution.

How does swiftdata-code-review identify relationship and delete rule issues?

swiftdata-code-review identifies SwiftData relationship and delete rule issues by examining @Relationship decorators, delete rule configurations, and cascade behavior. The skill validates that relationships are properly defined with appropriate delete rules (.cascade, .deny, .nullify), checks for orphaned data risks, and ensures relationship decorators align with your data model's integrity requirements.

SKILL.md

rendered from the published skill — quoted content, verbatim

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

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

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 5 files
plugins/beagle-ios/skills/swiftdata-code-review/SKILL.md
plugins/beagle-ios/skills/swiftdata-code-review/references/concurrency.md
plugins/beagle-ios/skills/swiftdata-code-review/references/migrations.md
plugins/beagle-ios/skills/swiftdata-code-review/references/model-design.md
plugins/beagle-ios/skills/swiftdata-code-review/references/queries.md

Related skills

Tags

data-persistence swift-framework schema-validation concurrency-safety orm-patterns migration-strategy query-optimization relationship-design