swiftdata-code-review
БесплатноБез исполняемых скриптовНе проверенReviews SwiftData code for model design, queries, concurrency, and migrations. Use when reviewing .swift files with import SwiftData, @Model, @Query…
от existential-birds★ 92 звезды на GitHubОб этом скилле
SwiftData Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
@Model, @Attribute, #Unique, @Relationship, delete rules |
references/model-design.md |
@Query, #Predicate, FetchDescriptor, #Index |
references/queries.md |
@ModelActor, ModelContext, background operations, DTOs |
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.
- Scope — pass when: You have the target
.swiftpath(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. - Reference — pass when: For each checklist area you evaluate (models, queries, concurrency, migrations), you opened the matching
references/*.mdfrom the Quick Reference table or wroteN/A: no <area> in this reviewwith a one-line reason. - Evidence & protocol — pass when: Every finding satisfies
review-verification-protocol(review-verification-protocol) and uses the[FILE:LINE] ISSUE_TITLEheader (line range allowed) from the file you read; no finding without a cite. - 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
finalon iOS 17–18 (or when inheritance is not intended; iOS 26+ supports@Modelsubclassing) -
@Relationshipdecorator on ONE side only (not both) - Delete rules explicitly set (not relying on default
.nullify) - Relationships initialized to empty arrays (
= []), not default model objects - No
@Attribute(.unique)or#Unique(iOS 18+) if CloudKit sync is enabled - Batch operations used for bulk inserts (
append(contentsOf:)) -
@Querynot loading thousands of items on main thread - External values in predicates captured in local variables (including inside
init()) - Scalar comparisons in predicates (not object references)
-
@ModelActorused for background operations (created off@MainActor) -
PersistentIdentifierorSendableDTOs used to pass data between actors (never@Modelinstances) -
VersionedSchemadefined for each shipped version andMigrationPlanpassed toModelContainer
When to Load References
- Reviewing
@Model,#Unique, or relationships -> references/model-design.md - Reviewing
@Query,#Predicate, or#Index-> references/queries.md - Reviewing
@ModelActoror background work -> references/concurrency.md - Reviewing schema changes or migrations -> references/migrations.md
Review Questions
- Could this relationship assignment cause NULL foreign keys?
- Is
@Relationshipon both sides creating circular references? - Could this
@Queryblock the main thread with large datasets? - Are
@Modelobjects being passed across actor boundaries instead ofPersistentIdentifierorSendableDTOs? - Would schema changes require a
VersionedSchemaandSchemaMigrationPlan?
Установить swiftdata-code-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл swiftdata-code-review?
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?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл swiftdata-code-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic