← Back to Skills Marketplace
anderskev

Swiftdata Code Review

by Kevin Anderson · GitHub ↗ · v1.2.1 · MIT-0
cross-platform ✓ Security Clean
161
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install swiftdata-code-review
Description
Reviews SwiftData code for model design, queries, concurrency, and migrations. Use when reviewing .swift files with import SwiftData, @Model, @Query, @ModelA...
README (SKILL.md)

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 evaluate (models, queries, concurrency, migrations), you opened the matching references/*.md from the Quick Reference table or wrote N/A: no \x3Carea> 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?
Usage Guidance
This skill appears coherent: it bundles detailed SwiftData review guidance and instructs the agent to analyze only .swift files and cite findings. Because it is instruction-only and requests no credentials or installs, the technical risk is low. Two practical cautions: (1) provenance is unknown (no homepage / unknown owner), so if you care about source-trust, prefer skills from known publishers; (2) when using the skill, avoid pasting secrets or production credentials into the code snippets you ask it to review — the skill will produce findings based on whatever you provide. If you need higher assurance, request the publisher's identity or test the skill on non-sensitive sample code first.
Capability Assessment
Purpose & Capability
Name/description match the included references and the SKILL.md review checklist. No binaries, env vars, or unrelated config paths are requested — everything requested is appropriate for a static code-review helper for SwiftData code.
Instruction Scope
SKILL.md confines work to .swift files that use SwiftData surface markers and requires citing findings with [FILE:LINE]. References are local files bundled with the skill. There are no instructions to read system files, fetch remote endpoints, or access secrets.
Install Mechanism
No install spec and no code files to execute — instruction-only skill. This minimizes on-disk/remote install risk.
Credentials
Skill declares no required environment variables, credentials, or config paths. The review logic uses only the bundled reference docs and the input code, which is proportionate to its purpose.
Persistence & Privilege
always:false and default model invocation are used (normal for skills). The skill does not request persistent system privileges or modify other skills or global configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install swiftdata-code-review
  3. After installation, invoke the skill by name or use /swiftdata-code-review
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.1
- Introduced a new "Hard gates" section to clarify the step-by-step preconditions for issuing findings in reviews. - Hard gates now require explicit scope confirmation, reference usage or N/A statements, specific evidence for each finding, and citations formatted as [FILE:LINE] ISSUE_TITLE. - Instructions emphasize only reporting issues after these hard gates are satisfied, making reviews more precise and structured. - No changes to the reference content, checklist, or review questions.
v1.2.0
**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.
Metadata
Slug swiftdata-code-review
Version 1.2.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Swiftdata Code Review?

Reviews SwiftData code for model design, queries, concurrency, and migrations. Use when reviewing .swift files with import SwiftData, @Model, @Query, @ModelA... It is an AI Agent Skill for Claude Code / OpenClaw, with 161 downloads so far.

How do I install Swiftdata Code Review?

Run "/install swiftdata-code-review" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Swiftdata Code Review free?

Yes, Swiftdata Code Review is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Swiftdata Code Review support?

Swiftdata Code Review is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Swiftdata Code Review?

It is built and maintained by Kevin Anderson (@anderskev); the current version is v1.2.1.

💬 Comments