axiom-sqlitedata

Enable type-safe SQLite persistence for Swift applications using SQLiteData.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-sqlitedata-pradeepmouli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-sqlitedata
Source: https://github.com/pradeepmouli/swift-template/tree/main/.agents/skills/axiom-sqlitedata
Command: npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-sqlitedata-pradeepmouli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Type-safe SQLite persistence for Swift applications using SQLiteData, providing a safer, expressive alternative to raw SQL and enabling CloudKit synchronization.

Core Features & Use Cases

  • Type-safe models using @Table and Swift structs
  • CloudKit synchronization for shared data across devices
  • Advanced SQL patterns: CTEs, views, custom aggregates, and the #sql macro
  • Deterministic mutations inside database.write blocks

Quick Start

Create a simple Item model and initialize a local database to begin using SQLiteData.

Frequently Asked Questions about axiom-sqlitedata

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up type-safe SQLite persistence in Swift?

Type-safe SQLite persistence in Swift is set up by defining @Table models and initializing a local database. You establish robust local storage using SQLiteData, which enforces Swift 6 strict concurrency and deterministic mutations.

Does this approach support CloudKit synchronization across iOS and macOS?

Yes, CloudKit synchronization is supported for shared data across devices. This allows your robust local SQLite storage to sync seamlessly across iOS and macOS applications.

What's the best way to execute advanced SQL patterns like CTEs in Swift?

The best way to execute advanced SQL patterns like CTEs in Swift is by using the #sql macro and StructuredQueries. This provides a safer, expressive alternative to raw SQL while maintaining type safety.

Can I use GRDB with Swift 6 strict concurrency for database mutations?

Yes, GRDB is fully compatible and relies on Swift 6 strict concurrency for database mutations. You perform deterministic mutations securely inside database.write blocks to ensure data integrity.

Why use StructuredQueries instead of raw SQL for Swift applications?

StructuredQueries replaces raw SQL to provide a safer, expressive alternative for Swift applications. It enables type-safe models using @Table and Swift structs, preventing runtime errors associated with raw SQL strings.