pagination

Generate offset- and cursor-based pagination infrastructure for REST and GraphQL data sources.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/mazicimert/RunDom --skill pagination-mazicimert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pagination
Source: https://github.com/mazicimert/RunDom/tree/main/.claude/skills/generators/pagination
Command: npx skills add https://github.com/mazicimert/RunDom --skill pagination-mazicimert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates a reusable pagination infrastructure with support for offset-based and cursor-based patterns, enabling infinite scroll, load-more, and optional search integration.

Core Features & Use Cases

  • Supports offset-based and cursor-based pagination to accommodate REST and GraphQL APIs.
  • Provides infinite scroll and manual load-more options with a configurable prefetch threshold.
  • Includes optional search integration and a pluggable data-source protocol for easy reuse across endpoints.
  • Built around a state-machine-driven PaginationManager for robust loading, error handling, and exhaustion state.

Quick Start

Describe your pagination style (offset or cursor) and whether you want infinite scroll or manual load more, then run the generator to scaffold the pagination infrastructure.

Frequently Asked Questions about 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 a Swift API?

Cursor-based pagination is managed by a state-driven PaginationManager that tracks loading, error, and exhaustion states, using a configurable prefetch threshold to fetch pages before the user reaches the end of the list.

What's the best way to handle API pagination for both REST and GraphQL data sources?

API pagination for REST and GraphQL data sources is handled through a pluggable, protocol-based data source that supports both offset-based and cursor-based patterns, allowing easy reuse across multiple endpoints.

How does a state machine help manage pagination loading and error states?

A state machine controls pagination by explicitly managing loading, error, and exhaustion states within the PaginationManager, ensuring robust error handling and preventing duplicate data fetches during infinite scroll interactions.

Can I add search functionality to an infinite scroll list without breaking pagination?

Search functionality integrates with infinite scroll lists by utilizing the pluggable data source protocol, allowing queries to reset and flow through the same state-driven PaginationManager without breaking existing pagination infrastructure.

When should I use offset-based pagination instead of cursor-based pagination?

Offset-based pagination is suited for static lists where direct page navigation is needed, while cursor-based pagination is preferred for dynamic infinite scroll data sources where data frequently shifts or gets inserted.