pagination-endpoint

Paginate REST API collections with cursor-based logic and RFC 8288 Link headers.

Updated Feb 9, 2026
One-click install
npx skills add https://github.com/janisto/echo-playground --skill pagination-endpoint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pagination-endpoint
Source: https://github.com/janisto/echo-playground/tree/main/.github/skills/pagination-endpoint
Command: npx skills add https://github.com/janisto/echo-playground --skill pagination-endpoint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cursor-based pagination with RFC 8288 Link headers to efficiently page through large lists in Echo v5 APIs, avoiding offset-based pitfalls.

Core Features & Use Cases

  • Built-in pagination primitives: pagination.Cursor, pagination.Paginate, and DecodeCursor with Cursor.Encode()
  • Safe, typed input handling and validation for consistent paging behavior
  • RFC 8288 compliant Link header generation to enable seamless next/prev navigation
  • Preserves query parameters across pages and supports default limits and filters
  • Use Case: paginating a /resources endpoint that lists items with optional filters

Quick Start

Configure a new list endpoint to use cursor-based pagination and RFC 8288 Link headers, then verify that a next link appears when more items exist.

Frequently Asked Questions about pagination-endpoint

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

FAQPage Schema
How do I implement cursor-based pagination in an Echo v5 REST API?

Implement cursor-based pagination in an Echo v5 REST API by using pagination primitives to generate RFC 8288 Link headers. This enables deterministic paging across large datasets while preserving query parameters and applying optional filters.

How do I generate RFC 8288 Link headers for API pagination?

Generate RFC 8288 Link headers for API pagination using the project's pagination helper to construct next and prev links. This ensures seamless navigation and preserves query parameters across pages for list endpoints.

Why use cursor-based pagination instead of offset-based paging for large datasets?

Cursor-based pagination avoids offset-based pitfalls like performance degradation on large datasets by using deterministic cursors. It provides stable navigation even when underlying data changes, ensuring consistent paging behavior.

Can I preserve query parameters and filters across paginated API responses?

Yes, you can preserve query parameters and filters across paginated API responses. The cursor-based logic maintains these parameters in the RFC 8288 Link headers, ensuring consistent filtering throughout navigation.

Does this pagination approach handle input validation and default limits?

Yes, this pagination approach handles safe, typed input validation and enforces default limits. It validates cursor types and implements safe error handling to ensure consistent paging behavior across list endpoints.

What are the limitations of cursor-based pagination with Link headers?

Cursor-based pagination with Link headers does not support random page access or jumping to arbitrary offsets. It requires deterministic ordering and is designed for sequential forward and backward navigation across large datasets.