Api Pagination

🌐Community
by secondsky · vlatest · Repository

Provides API guidance and assistance for agent workflows.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add secondsky-api-pagination npx -- -y @trustedskills/secondsky-api-pagination
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "secondsky-api-pagination": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/secondsky-api-pagination"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill provides guidance and assistance for implementing scalable pagination strategies when working with large datasets via APIs. It outlines different pagination approaches (Offset/Limit, Cursor, Keyset) and their suitability based on dataset size and UI requirements. The skill includes code examples demonstrating how to implement these strategies in Node.js applications using Express.

When to use it

  • When retrieving data from an API that returns large datasets.
  • To optimize performance when displaying data in a user interface with features like infinite scrolling.
  • When needing to provide users with navigation links (first, previous, next, last pages) for browsing through results.
  • For implementing real-time updates where new data is continuously added.

Key capabilities

  • Pagination Strategy Guidance: Provides information on Offset/Limit, Cursor, and Keyset pagination techniques.
  • Code Examples: Includes Node.js code snippets demonstrating the implementation of Offset Pagination and Cursor Pagination.
  • Performance Considerations: Highlights the performance characteristics (O(n) vs O(1)) of different pagination methods.
  • Response Format Example: Shows an example JSON response format including data, pagination metadata (page, limit, total, totalPages), and links for navigation.

Example prompts

  • "How can I implement cursor-based pagination in my API?"
  • "What's the best way to paginate a large dataset using Node.js?"
  • "Show me an example of offset pagination with limits."

Tips & gotchas

  • Always set reasonable maximum limits for page sizes (e.g., 100) to prevent performance issues and server overload.
  • Cursor pagination is recommended for very large datasets where efficiency is critical.
  • Indexing sorting fields in your database can significantly improve query performance when using any pagination method.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
secondsky
Installs
40

🌐 Community

Passed automated security scans.