Agent skill · Backend & API

API Pagination Debugging

Systematic methodology for debugging pagination issues in API integrations, especially when switching between API versions or endpoints. Auto-activates when pagination stops early, returns duplicate results, or fails to iterate through complete datasets. Covers cursor-based vs page-based pagination, API response structure verification, and efficiency optimization. Trigger keywords: pagination bug, API not paginating, stuck at one page, cursor pagination, nextPageCursor, page-based pagination. (project)

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-pagination-debugging --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 16 KB
Bundled scripts: none
Path: skills/api/api-pagination-debugging/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# API Pagination Debugging > **Purpose**: Systematically diagnose and fix pagination failures that prevent complete data import from APIs ## Core Principles ### 1. Verify API Response Structure Before Assuming Never assume pagination fields based on documentation or other endpoints. Always test actual responses: ```bash curl -s API_ENDPOINT | jq 'keys' ``` Different API versions or endpoints may use different pagination patterns even within the same service. ### 2. Match Pagination Logic to API Design APIs use distinct pagination patterns that require different implementations: - **Cursor-based**: `{nextPageCursor, results}` - use cursor param - **Page-based**: `{page, total_pages, results}` - use page number param - **Offset-based**: `{offset, limit, total}` - use offset/limit params - **Link-based**: `{next, previous, results}` - follow next URL Using the wrong pattern causes pagination to stop after first page. ### 3. Optimize Page Size for Efficiency Most APIs support configurable page sizes (e.g., 50-1000 items per page). Using maximum page_size: - Reduces total API calls (20x fewer calls with 1000 vs 50) - Decreases network overhead - Minimizes rate limit exposure - Speeds up

What's inside
Steps it walks through
  1. Core Principles
  2. 1. Verify API Response Structure Before Assuming
  3. 2. Match Pagination Logic to API Design
  4. 3. Optimize Page Size for Efficiency
  5. 4. Test Pagination Flow Before Implementation
  6. Systematic Debugging Workflow
  7. Step 1: Reproduce the Issue
  8. Step 2: Inspect Actual API Response
  9. Step 3: Compare Expected vs Actual Fields
  10. Step 4: Test Second Page Manually
  11. Step 5: Fix Pagination Logic
  12. Step 6: Verify Fix with Logging
  13. Step 7: Optimize Page Size
  14. ✅ REQUIRED Patterns
Ships with 1 file
  • metadata.json
Commands it runs
curl -s API_ENDPOINT | jq 'keys'
Fetch first page and check structure
curl -s -H "Authorization: Token $TOKEN" \
Expected output reveals actual fields:
NOT ["count", "next", "previous", "results"]
Get page 1
Extract cursor
Get page 2 using cursor
curl -s API_ENDPOINT | jq '.'
curl API | jq 'keys'
More from claude-skill-registry
All skills →
About this skill
What does the API Pagination Debugging skill do?

Systematic methodology for debugging pagination issues in API integrations, especially when switching between API versions or endpoints. Auto-activates when pagination stops early, returns duplicate results, or fails to iterate through complete datasets. Covers cursor-based vs page-based pagination, API response structure verification, and efficiency optimization. Trigger keywords: pagination bug, API not paginating, stuck at one page, cursor pagination, nextPageCursor, page-based pagination. (project)

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-pagination-debugging --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going