What problem does it solve?
This Skill establishes clear data access rules to prevent inconsistent transactions, leaked business logic in repositories, query inefficiencies, and unsafe migrations, making database operations predictable and maintainable.
Core Features & Use Cases
- Transaction Boundary: Prescribes that transactions live in the service layer to safely coordinate multi-entity operations.
- Repository Pattern Template: Provides a minimal repository structure that isolates database operations and accepts a transaction client.
- Query Optimization Rules: Enforces explicit selects, mandatory pagination, indexing guidance, and strategies to avoid N+1 queries.
- Migration & Soft Delete Strategy: Defines reversible migrations, safe rename patterns, and soft-delete conventions for business data.
- Use Case: Implementing an order creation flow that creates an order, inserts items, and decrements stock atomically across repositories.
Quick Start
Create a service-layer transaction that composes repository calls to create an order, insert order items, and decrement product stock within a single atomic operation.