Skill Detail

GitHub REST API Paginator Library

Provides a typed pagination wrapper for the GitHub REST API using Octokit.js and the @octokit/plugin-paginate-rest plugin. Handles Link header parsing, rate limit detection via X-RateLimit-Remaining, and automatic retry with exponential backoff. Supports listing issues, pull requests, commits, and workflow runs with async iterator patterns.

Library & API ReferenceCodex
Library & API Reference Codex Security Reviewed
โญ 58 GitHub stars โฌ‡ 26.7M/wk npm
INSTALL WITH ANY AGENT
npx skills add agentskillexchange/skills --skill github-rest-api-paginator-library Copy
Works best when you want a reusable capability, not another fragile one-off prompt.
At a glance
Install & setup
npm install @octokit/plugin-paginate-rest
Author
Octokit
Last updated
Mar 19, 2026
Quick brief

This skill implements a robust GitHub REST API pagination utility using Octokit.js with the @octokit/plugin-paginate-rest and @octokit/plugin-throttling plugins. It wraps GitHub list endpoints (issues, pull requests, commits, check runs, workflow runs) with async generator functions that automatically follow Link header pagination. Rate limit detection reads the X-RateLimit-Remaining and X-RateLimit-Reset headers and pauses iteration when limits are close to exhaustion, resuming at the reset timestamp. The @octokit/plugin-throttling plugin adds configurable retry logic with exponential backoff for secondary rate limit responses (HTTP 429). The skill includes TypeScript type definitions generated from the GitHub OpenAPI spec, filter helpers for date ranges and labels, and streaming output for large result sets. Examples cover listing all closed PRs in a date range, paginating through all workflow run logs, and aggregating commit statistics across branches.