xxf-database

Define Repository protocols and domain models decoupled from GRDB or ObjectBox.

6|1|Updated May 22, 2025
One-click install
npx skills add https://github.com/NBXXF/xxf_ios --skill xxf-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xxf-database
Source: https://github.com/NBXXF/xxf_ios/tree/main/skills/xxf-database
Command: npx skills add https://github.com/NBXXF/xxf_ios --skill xxf-database

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

XXFDatabase 提供持久化抽象层和接口规范,帮助用户在设计 Repository 协议、定义模型、规划分层时保持解耦,并把具体 ORM 实现限定在 GRDB 或 ObjectBox。

Core Features & Use Cases

  • Interface-first design: Define Repository protocol and domain models decoupled from ORM.
  • Layered architecture guidance: Enforce Domain/Repository/Database separation for scalable data layers.
  • Use Case: Planning data layer, defining models, ORM selection.

Quick Start

Define your Repository protocol and domain models, then choose GRDB or ObjectBox for the ORM implementation and wire up the database layer.

Frequently Asked Questions about xxf-database

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

FAQPage Schema
How do I decouple Swift domain models from ORM implementations?

Decouple Swift domain models from ORM implementations by defining interface-first Repository protocols, keeping data access logic separated from core domain boundaries.

GRDB vs ObjectBox: which ORM works best for a layered iOS architecture?

Choosing between GRDB and ObjectBox depends on your specific persistence needs, but both integrate cleanly once you enforce Domain/Repository/Database separation through protocol boundaries.

How to plan a scalable data layer for an iOS app?

Plan a scalable iOS data layer by enforcing Domain, Repository, and Database separation, defining clean persistence abstractions that keep specific ORM implementations decoupled.

Does this repository pattern support ORM-agnostic interfaces?

Yes, the repository pattern supports ORM-agnostic interfaces by defining clean persistence abstraction layers and model boundaries, allowing you to swap underlying implementations freely.

When do I need a repository protocol for my persistence layer?

You need a repository protocol for your persistence layer when planning modular design, requiring decoupled data access, and enforcing strict boundaries between domain models and database implementations.