pagination
Skill777 starsChanged 5 months agoMITView on GitHub
Generates pagination infrastructure with offset or cursor-based patterns, infinite scroll, and search support. Use when user wants to add paginated lists, infinite scrolling, or load-more functionality.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Pradnyeshp/Claude-Skillstheir own version, first seen Jul 6, 2026
- api-platform/skillsettheir own version, first seen Jun 11, 2026
- ffsshhttiikk/opencode-agents-skillstheir own version, first seen Feb 28, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- api-platform/skillset★ 26same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- Pradnyeshp/Claude-Skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository183 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- app-intentsSkill
- foundation-modelsSkill
- apple-intelligenceSkill
- visual-intelligenceSkill
- ad-attributionSkill
- app-description-writerSkill
- apple-search-adsSkill
- iap-finalizerSkill
- keyword-optimizerSkill
- marketing-strategySkill
- originality-checkSkill
- ratings-mechanicsSkill
- rejection-handlerSkill
- review-response-writerSkill
- screenshot-plannerSkill
- app-storeSkill
- web-presenceSkill
- core-mlSkill
- animation-patternsSkill
- game-feelSkill
- liquid-glassSkill
- sf-symbolsSkill
- designSkill
- typographySkill
- ui-prototypingSkill
- ux-writingSkill
- attributed-stringSkill
- foundationSkill
- accessibility-generatorSkill
- account-deletionSkill
- analytics-setupSkill
- announcement-bannerSkill
- app-clipSkill
- app-extensionsSkill
- app-icon-generatorSkill
- app-store-assetsSkill
- auth-flowSkill
- background-processingSkill
- ci-cd-setupSkill
- cloudkit-syncSkill
- consent-flowSkill
- custom-product-pagesSkill
- data-exportSkill
- debug-menuSkill
- deep-linkingSkill
- error-monitoringSkill
- feature-flagsSkill
- featuring-nominationSkill
- feedback-formSkill
- force-updateSkill
- http-cacheSkill
- image-loadingSkill
- in-app-eventsSkill
- lapsed-userSkill
- live-activity-generatorSkill
- localization-setupSkill
- logging-setupSkill
- milestone-celebrationSkill
- networking-layerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use this skill when the user:
- Distinctive: line 32
Search for existing networking code:
- Very specific: line 38
If networking-layer generator was used, detect the APIEndpoint protocol and generate data sources that conform to it.
- Distinctive: line 41
Search for existing pagination:
- Distinctive: line 47
If found, ask user whether to replace or extend.
- Distinctive: line 51
Ask user via AskUserQuestion:
- Distinctive: line 63
Search with pagination (debounced, resets on query change)
- Very specific: line 74
Read pagination-patterns.md for architecture guidance.
- Very specific: line 75
Read templates.md for production Swift code.
- Very specific: line 93
If Sources/ exists → Sources/Pagination/
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pagination Generator
Generate production pagination infrastructure supporting offset-based and cursor-based APIs, with infinite scroll SwiftUI views, state machine management, and optional search integration.
When This Skill Activates
Use this skill when the user:
- Asks to "add pagination" or "paginate a list"
- Wants "infinite scroll" or "load more" functionality
- Mentions "cursor-based pagination" or "offset pagination"
- Asks about "paginated API" or "loading pages of data"
- Wants "search with pagination"
Pre-Generation Checks
1. Project Context Detection
- Check Swift version (requires Swift 5.9+)
- Check deployment target (iOS 17+ / macOS 14+ for @Observable)
- Search for existing pagination implementations
- Identify source file locations
2. Networking Layer Detection
Search for existing networking code:
Glob: **/*API*.swift, **/*Client*.swift, **/*Endpoint*.swift
Grep: "APIClient" or "APIEndpoint"If networking-layer generator was used, detect the APIEndpoint protocol and generate data sources that conform to it.
3. Conflict Detection
Search for existing pagination:
Glob: **/*Pagina*.swift, **/*LoadMore*.swift
Grep: "PaginationState" or "loadNextPage" or "hasMorePages"If found, ask user whether to replace or extend.
Configuration Questions
Ask user via AskUserQuestion:
- Pagination style?
- Offset-based (page number + page size) — most common for REST APIs
- Cursor-based (opaque cursor token) — better for real-time data, social feeds
- Loading trigger?
- Infinite scroll (auto-load when near bottom) — recommended
- Manual "Load More" button
- Both (infinite scroll with manual fallback on error)
- Additional features? (multi-select)
- Search with pagination (debounced, resets on query change)
- Pull-to-refresh
- Empty/error/loading state views
- Data source pattern?
- Generic (works with any Codable model)
- Protocol-based (define per-endpoint data sources)
Generation Process
Step 1: Read Templates
Read pagination-patterns.md for architecture guidance.
Read templates.md for production Swift code.
Step 2: Create Core Files
Generate these files:
PaginatedResponse.swift— Generic response models for offset and cursorPaginationState.swift— State machine (idle, loading, loaded, error, exhausted)PaginatedDataSource.swift— Protocol endpoints conform toPaginationManager.swift— @Observable manager with state transitions
Step 3: Create Optional Files
Based on configuration:
SearchablePaginationManager.swift— If search selectedViews/PaginatedList.swift— Infinite scroll SwiftUI wrapperViews/LoadMoreButton.swift— Manual load-more buttonViews/PaginationStateView.swift— Empty/loading/error state views
Step 4: Determine File Location
Check project structure:
- If
Sources/exists →Sources/Pagination/ - If
App/exists →App/Pagination/ - Otherwise →
Pagination/
Output Format
After generation, provide:
Files Created
Pagination/
├── PaginatedResponse.swift # Generic response models
├── PaginationState.swift # State machine enum
├── PaginatedDataSource.swift # Data source protocol
├── PaginationManager.swift # @Observable manager
├── SearchablePaginationManager.swift # Optional: search + pagination
└── Views/
├── PaginatedList.swift # Infinite scroll wrapper
├── LoadMoreButton.swift # Manual load-more
└── PaginationStateView.swift # Empty/loading/error statesIntegration Steps
Define a data source:
struct UsersDataSource: PaginatedDataSource {
typealias Item = User
let apiClient: APIClient
func fetch(page: PageRequest) async throws -> PaginatedResponse<User> {
try await apiClient.request(UsersEndpoint(page: page.page, size: page.size))
}
}Use PaginationManager in a view model:
@Observable
final class UsersViewModel {
let pagination: PaginationManager<UsersDataSource>
init(apiClient: APIClient) {
pagination = PaginationManager(
dataSource: UsersDataSource(apiClient: apiClient)
)
}
}With SwiftUI (infinite scroll):
struct UsersListView: View {
@State private var viewModel = UsersViewModel()
var body: some View {
PaginatedList(manager: viewModel.pagination) { user in
UserRow(user: user)
}
.task {
await viewModel.pagination.loadFirstPage()
}
}
}With search:
struct SearchableUsersView: View {
@State private var searchManager = SearchablePaginationManager(
dataSource: UsersDataSource()
)
var body: some View {
PaginatedList(manager: searchManager.pagination) { user in
UserRow(user: user)
}
.searchable(text: $searchManager.query)
}
}Testing
@Test
func loadFirstPagePopulatesItems() async throws {
let mockSource = MockDataSource(items: User.mockList(count: 20))
let manager = PaginationManager(dataSource: mockSource, pageSize: 10)
await manager.loadFirstPage()
#expect(manager.items.count == 10)
#expect(manager.state == .loaded)
#expect(manager.hasMore == true)
}
@Test
func loadAllPagesReachesExhausted() async throws {
let mockSource = MockDataSource(items: User.mockList(count: 15))
let manager = PaginationManager(dataSource: mockSource, pageSize: 10)
await manager.loadFirstPage()
await manager.loadNextPage()
#expect(manager.items.count == 15)
#expect(manager.state == .exhausted)
}References
- pagination-patterns.md — Offset vs cursor comparison, state machine, threshold prefetching
- templates.md — All production Swift templates
- Related:
generators/networking-layer— Base networking layer for data sources - Related:
generators/http-cache— Cache paginated responses
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

