generators-pagination

Generate SwiftUI pagination infrastructure with offset and cursor APIs.

4|1|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/AutisticAF/claude-code-apple-dev-plugin --skill generators-pagination
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generators-pagination
Source: https://github.com/AutisticAF/claude-code-apple-dev-plugin/tree/main/skills/generators-pagination
Command: npx skills add https://github.com/AutisticAF/claude-code-apple-dev-plugin --skill generators-pagination

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of production-ready pagination infrastructure for SwiftUI apps, eliminating manual, error-prone wiring for infinite scroll, load-more buttons, and paginated search results.

Core Features & Use Cases

  • Offset and cursor support: scaffolds unified PageRequest, OffsetPaginatedResponse, and CursorPaginatedResponse models for REST APIs.
  • Stateful managers and adapters: generates PaginationManager with a clear state machine, prefetch thresholding, cancellation-safe concurrency, and a SearchablePaginationManager adapter for debounced queries.
  • SwiftUI integration and UX: provides PaginatedList, LoadMoreButton, error and skeleton views, and example test cases so teams can quickly add robust paginated lists to user interfaces.
  • Use Case: Add infinite scrolling with search to a Users list backed by a cursor-based API while preserving existing items on errors and handling retries.

Quick Start

Generate pagination scaffolding for your SwiftUI app including PaginationManager, PaginatedDataSource, and PaginatedList views.

Frequently Asked Questions about generators-pagination

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

FAQPage Schema
How do I implement infinite scroll with cursor-based pagination in SwiftUI?

Pagination search in SwiftUI is handled by a SearchablePaginationManager adapter that provides debounced queries, preventing excessive API calls while maintaining stateful list updates during user input.

Can I use offset pagination instead of cursor pagination for REST APIs in iOS 17?

Pagination infrastructure targets Swift 5.9 and iOS 17+, providing Observable-based managers, PaginatedDataSource protocols, and example test cases that integrate directly into SwiftUI list views across iOS, macOS, iPadOS, watchOS, and visionOS.

What is the best way to add a load-more button to a SwiftUI list without losing data on errors?

Pagination errors are managed through the PaginationManager state machine, which uses cancellation-safe concurrency to preserve currently loaded items during API failures and provides error views with retry capabilities within the SwiftUI list interface.

How do I add debounced search to a paginated SwiftUI list?

Pagination prefetching is handled through threshold-based logic in the PaginationManager, which triggers data fetching before the user reaches the end of the list, ensuring smooth infinite scrolling within the PaginatedList view.