CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

swiftdata

Implement, review, or improve data persistence using SwiftData. Use when defining @Model classes with @Attribute, @Relationship, @Transient, #Unique, or #Index; when querying with @Query, #Predicate, FetchDescriptor, or SortDescriptor; when configuring ModelContainer and ModelContext for SwiftUI or background work with @ModelActor; when planning schema migrations with VersionedSchema and SchemaMigrationPlan; when setting up CloudKit sync with ModelConfiguration; or when coexisting with or migrating from Core Data.

Quality

94%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

The canonical home for this skill is dpearson2699/swift-ios-skills

SKILL.md
Quality
Evals
Security

Quality

Content

86%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A high-quality reference skill: lean and version-specific content, executable examples with only minor symbol-undefined gaps, explicit validate-and-retry loops for destructive operations, and clean one-level progressive disclosure. The main residual improvements are making the illustrative migration/predicate snippets self-consistent with the shown model.

Suggestions

Define SchemaV3 (or note that migrateV2toV3 is illustrative and lives inside a SchemaMigrationPlan enum) so the custom-migration snippet is self-contained and consistent with the lightweight example above it.

Add the tags relationship (e.g., a to-many Tag model) to the Trip example, or annotate the #Predicate collection example as using a relationship defined in references/swiftdata-queries.md.

For the CloudKit schema rollout steps, add one explicit verification command/checkpoint (e.g., what to confirm in CloudKit Dashboard before promotion) to close the remaining implicit validation gaps.

DimensionReasoningScore

Conciseness

Prose is terse and every section is SwiftData-specific: version-gated facts Claude cannot reliably know (iOS 18 unidirectional relationships, iOS 26 model inheritance, default deleteRule .nullify, ModelContext non-Sendable, @ModelActor save requirements). Nothing explains Swift/SwiftUI basics, so it matches anchor 5 ('every token earns its place') rather than anchor 4, which would require trimmable over-explanation.

5 / 5

Actionability

Nearly all code is executable and covers the common cases (model definition, container setup, CRUD, @Query variants, migration plan, @ModelActor), matching anchor 5 in spirit. But minor gaps exist: the custom-migration snippet references an undefined SchemaV3 and declares 'static let migrateV2toV3' outside any enum, and the #Predicate example uses a 'tags' relationship absent from the Trip model shown earlier. Anchor 4 ('minor gaps') is the best fit.

4 / 5

Workflow Clarity

Destructive/batch operations include explicit feedback loops — 'first run the exact predicate or version hop against a disposable copy and record affected identifiers/counts... On failure, fix the predicate/schema and restore a pristine fixture before retry', plus 'migrate a fresh copy of each old store and assert post-migration data before release' and a review checklist — so the batch-operation cap does not apply. Still, the skill is organized topically rather than as a sequenced workflow, and some processes (e.g., CloudKit schema rollout) verify only implicitly, fitting anchor 4 rather than 5.

4 / 5

Progressive Disclosure

The body keeps core patterns inline while bulk detail is split across five real, one-level-deep reference files (swiftdata-advanced, swiftdata-queries, core-data-coexistence, predicate-pitfalls, indexing), each verified to exist and linked with a descriptive label in the References section. This matches anchor 5 ('well-signaled one-level-deep references; content appropriately split'); it is not anchor 4, since no bulk content that belongs in a reference is inlined.

5 / 5

Total

18

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: concrete actions, explicit multi-clause trigger guidance, and clean boundary delineation against Core Data. It is long but not padded — every clause covers a distinct trigger scenario with specific APIs.

DimensionReasoningScore

Specificity

Multiple concrete actions are named ('Implement, review, or improve data persistence using SwiftData') and elaborated across the when-clauses: defining @Model classes, querying with @Query/#Predicate/FetchDescriptor, configuring ModelContainer/ModelContext, planning migrations with VersionedSchema/SchemaMigrationPlan, setting up CloudKit sync, and migrating from Core Data. Comprehensive coverage of the domain matches the anchor-5 example rather than anchor 4, which requires minor gaps.

5 / 5

Completeness

Explicitly answers 'what' ('Implement, review, or improve data persistence using SwiftData') and 'when' with six concrete trigger clauses ('Use when defining... when querying... when configuring... when planning... when setting up... or when coexisting with or migrating from Core Data'). This matches the anchor-5 example pattern of actions plus an explicit 'Use when' clause; it is well above anchor 4's weaker 'when'.

5 / 5

Trigger Term Quality

Covers the natural terms a user would say for this domain — 'SwiftData', 'data persistence', 'CloudKit sync', 'schema migrations', 'Core Data' — plus the exact API names (@Model, @Attribute, #Predicate, FetchDescriptor) users quote verbatim when asking for help. No meaningful synonym is missing; it is not anchor 4, which expects a few natural terms absent.

5 / 5

Distinctiveness Conflict Risk

The description carves a clear SwiftData niche and even names the Core Data boundary ('coexisting with or migrating from Core Data'), which minimizes overlap with a sibling core-data skill rather than inviting it. Written in third-person/infinitive voice with no fluff; distinct triggers make wrong-skill triggering unlikely.

5 / 5

Total

20

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

dpearson2699/swift-ios-skills

Path

skills/swiftdata/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.