rshankras/claude-code-apple-skills/pagination
Claude Code and agent skill by rshankras/claude-code-apple-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install rshankras/claude-code-apple-skills/paginationSKILL.md
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:
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:
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
Integration Steps
Define a data source:
Use PaginationManager in a view model:
With SwiftUI (infinite scroll):
With search:
Testing
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
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/generators/pagination/SKILL.md
Popularity
- Repository stars
- 770
- Repository forks
- 74
- 7-day trend score
- 33
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rshankras/claude-code-apple-skills/pagination)