What problem does it solve?
Manually implementing pagination logic, state management, and infinite scroll UI for Swift apps is time-consuming and prone to edge case bugs like duplicate requests or lost data on errors. This Skill eliminates that manual work by generating production-ready pagination infrastructure out of the box.
Core Features & Use Cases
- Dual Pagination Patterns: Supports both offset-based (page number + size) and cursor-based (opaque token) pagination for REST APIs and real-time feeds.
- Flexible Loading Triggers: Configurable infinite scroll (with threshold prefetching) or manual "Load More" button, with optional pull-to-refresh support.
- Search Integration: Optional debounced search that resets pagination context automatically when queries change.
- Robust State Management: Built-in @Observable state machine handles idle, loading, loaded, error, and exhausted states, with retry logic that preserves existing items on failure.
- Pre-built SwiftUI Views: Includes ready-to-use list wrappers, loading spinners, empty state views, and error banners for common UI patterns.
- Use Case: Perfect for building social feeds, product listings, search results, or any list view that loads data in pages from a backend API.
Quick Start
Use the pagination skill to add cursor-based infinite scroll pagination to your SwiftUI music track list view.