返回顶部
s

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
100
下载量
0
收藏
概述
安装方式
版本历史

swiftdata-code-review

# SwiftData Code Review ## Quick Reference | Issue Type | Reference | |------------|-----------| | @Model, @Attribute, @Relationship, delete rules | [references/model-design.md](references/model-design.md) | | @Query, #Predicate, FetchDescriptor, #Index | [references/queries.md](references/queries.md) | | @ModelActor, ModelContext, background operations | [references/concurrency.md](references/concurrency.md) | | VersionedSchema, MigrationStage, lightweight/custom | [references/migrations.md](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 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?

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 swiftdata-code-review-1776099003 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 swiftdata-code-review-1776099003 技能

通过命令行安装

skillhub install swiftdata-code-review-1776099003

下载 Zip 包

⬇ 下载 swiftdata-code-review v1.2.0

文件大小: 8.17 KB | 发布时间: 2026-4-14 10:17

v1.2.0 最新 2026-4-14 10:17
**Changelog for swiftdata-code-review v1.2.0:**

- Added SKILL.md with detailed skill description and quick reference table.
- Included a comprehensive review checklist covering model design, queries, concurrency, and migrations.
- Added guidance on when to consult specific reference files.
- Provided review questions to highlight common SwiftData pitfalls.
- Enhanced documentation to clarify use cases for code reviews involving SwiftData constructs.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部