Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

axiom-storage

БесплатноБез исполняемых скриптовНе проверен

Use when asking 'where should I store this data', 'should I use SwiftData or files', 'CloudKit vs iCloud Drive', 'Documents vs Caches', 'local or cloud…

ComeOnOliverот ComeOnOliver★ 67 звёзд на GitHub

Об этом скилле

iOS Storage Guide

Purpose: Navigation hub for ALL storage decisions — database vs files, local vs cloud, specific locations iOS Version: iOS 17+ (iOS 26+ for latest features) Context: Complete storage decision framework integrating SwiftData (WWDC 2023), CKSyncEngine (WWDC 2023), and file management best practices

When to Use This Skill

✅ Use this skill when:

  • Starting a new project and choosing storage approach
  • Asking "where should I store this data?"
  • Deciding between SwiftData, Core Data, SQLite, or files
  • Choosing between CloudKit and iCloud Drive for sync
  • Determining Documents vs Caches vs Application Support
  • Planning data architecture for offline/online scenarios
  • Migrating from one storage solution to another
  • Debugging "files disappeared" or "data not syncing"

❌ Do NOT use this skill for:

  • SwiftData implementation details (use axiom-swiftdata skill)
  • SQLite/GRDB specifics (use axiom-sqlitedata or axiom-grdb skills)
  • CloudKit sync implementation (use axiom-cloudkit-ref skill)
  • File protection APIs (use axiom-file-protection-ref skill)

Related Skills:

  • Existing database skills: axiom-swiftdata, axiom-sqlitedata, axiom-grdb
  • New file skills: axiom-file-protection-ref, axiom-storage-management-ref, axiom-storage-diag
  • New cloud skills: axiom-cloudkit-ref, axiom-icloud-drive-ref, axiom-cloud-sync-diag

Core Philosophy

"Choose the right tool for your data shape. Then choose the right location."

Storage decisions have two dimensions:

  1. Format: How is data structured? (Queryable records vs files)
  2. Location: Where is it stored? (Local vs cloud, which directory)

Getting the format wrong forces workarounds. Getting the location wrong causes data loss or backup bloat.


The Complete Decision Tree

Level 1: Format — What Are You Storing?

What is the shape of your data?

├─ STRUCTURED DATA (queryable records, relationships, search)
│   Examples: User profiles, task lists, notes, contacts, transactions
│   → Continue to "Structured Data Path" below
│
└─ FILES (documents, images, videos, downloads, caches)
    Examples: Photos, PDFs, downloaded content, thumbnails, temp files
    → Continue to "File Storage Path" below

Structured Data Path

Modern Apps (iOS 17+)

// ✅ CORRECT: SwiftData for modern structured persistence
import SwiftData

@Model
class Task {
    var title: String
    var isCompleted: Bool
    var dueDate: Date

    init(title: String, isCompleted: Bool = false, dueDate: Date) {
        self.title = title
        self.isCompleted = isCompleted
        self.dueDate = dueDate
    }
}

// Query with type safety
@Query(sort: \Task.dueDate) var tasks: [Task]

Why SwiftData:

  • Modern Swift-native API (no Objective-C)
  • Type-safe queries
  • Built-in CloudKit sync support
  • Observable models integrate with SwiftUI
  • Use skill: axiom-swiftdata for implementation details

When NOT to use SwiftData:

  • Need advanced SQLite features (FTS5, complex joins)
  • Existing Core Data app (migration overhead)
  • Ultra-performance-critical (direct SQLite is faster)

Advanced Control Needed

// ✅ CORRECT: SQLiteData or GRDB for advanced features
import SQLiteData

// Full-text search, custom indices, raw SQL when needed
let results = try db.prepare("SELECT * FROM users WHERE name MATCH ?", "John")

Use SQLiteData when:

  • Need full-text search (FTS5)
  • Custom SQL queries and indices
  • Maximum performance (direct SQLite)
  • Migration from existing SQLite database
  • Use skill: axiom-sqlitedata for modern SQLite patterns

Use GRDB when:

  • Need reactive queries (ValueObservation)
  • Complex database operations
  • Type-safe query builders
  • Use skill: axiom-grdb for advanced patterns

Legacy Apps (iOS 16 and earlier)

// ❌ LEGACY: Core Data (avoid for new projects)
import CoreData

// NSManagedObject, NSFetchRequest, NSPredicate...

Only use Core Data if:

  • Maintaining existing Core Data app
  • Can't upgrade to iOS 17 minimum deployment

File Storage Path

Decision Tree for Files

What kind of file is it?

├─ USER-CREATED CONTENT (documents, photos created by user)
│   Where: Documents/ directory
│   Backed up: ✅ Yes (iCloud/iTunes)
│   Purged: ❌ Never
│   Visible in Files app: ✅ Yes
│   Example: User's edited photos, documents, exported data
│   → See "Documents Directory" section below
│
├─ APP-GENERATED DATA (not user-visible, must persist)
│   Where: Library/Application Support/
│   Backed up: ✅ Yes
│   Purged: ❌ Never
│   Visible in Files app: ❌ No
│   Example: Database files, user settings, downloaded assets
│   → See "Application Support Directory" section below
│
├─ RE-DOWNLOADABLE / REGENERABLE CONTENT
│   Where: Library/Caches/
│   Backed up: ❌ No (set isExcludedFromBackup)
│   Purged: ✅ Yes (under storage pressure)
│   Example: Thumbnails, API responses, downloaded images
│   → See "Caches Dir
Полный SKILL.md на GitHub

Установить axiom-storage в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл axiom-storage?

Use when asking 'where should I store this data', 'should I use SwiftData or files', 'CloudKit vs iCloud Drive', 'Documents vs Caches', 'local or cloud storage', 'how do I sync data', 'where do app files go' - comprehensive decision framework for all iOS storage options

Как установить скилл axiom-storage?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл axiom-storage запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom-storage с