readwise-mcp-server: Skill for Claude Code

.claude/skills/api-pagination-debugging/SKILL.md

API Pagination Debugging is a skill for Claude Code from ngpestelos/readwise-mcp-server. It costs 93 tokens per session (3,928 once invoked), scanned A, original, MIT.

A troubleshooting guide for APIs that return data in multiple pages. An API is a way for software to request data from another service, and pagination splits a large result into smaller responses.

In plain words
What is it for?
Use it to debug cursor-, page-, offset-, or link-based pagination, inspect response fields, choose page sizes, and fix incomplete API imports.
Why use it?
It helps find why an import stops early, repeats records, or misses part of a dataset. The guide focuses on matching the code to the API's actual paging format.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is ngpestelos/readwise-mcp-server's own configuration. It tells Claude Code how to work on readwise-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything readwise-mcp-server configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/ngpestelos/src/readwise-mcp-server/server.py.

Reuse

Borrowing it

Nothing to install: this file belongs to ngpestelos/readwise-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ngpestelos/readwise-mcp-server/master/.claude/skills/api-pagination-debugging/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ngpestelos/readwise-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for API Pagination Debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/ngpestelos/readwise-mcp-server/api-pagination-debugging/github.svg)](https://agentmods.dev/skills/ngpestelos/readwise-mcp-server/api-pagination-debugging)
Your own site
<a href="https://agentmods.dev/skills/ngpestelos/readwise-mcp-server/api-pagination-debugging"><img src="https://agentmods.dev/badge/skills/ngpestelos/readwise-mcp-server/api-pagination-debugging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for API Pagination Debugging

Your own site · 80×15
<a href="https://agentmods.dev/skills/ngpestelos/readwise-mcp-server/api-pagination-debugging"><img src="https://agentmods.dev/badge/skills/ngpestelos/readwise-mcp-server/api-pagination-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,928 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.03928
Opus 5.5 $0.00037 $0.01571
Sonnet 5.5 $0.00019 $0.00786
Haiku 4.5 $0.00009 $0.00393

Measured 2mo ago against content hash 586a1376e860, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

API Pagination Debugging scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s API_ENDPOINT | jq 'keys'
.claude/skills/api-pagination-debugging/SKILL.md · 592 lines

How it starts

The opening of the file, as written. The whole thing — 592 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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 bulk imports

4. Test Pagination Flow Before Implementation

Before implementing pagination logic:

  1. Fetch page 1 and inspect response structure
  2. Manually fetch page 2 to confirm field values
  3. Verify cursor/page advancement works correctly
  4. Check termination condition (null cursor, empty results, etc.)

Systematic Debugging Workflow

Step 1: Reproduce the Issue

Symptoms of pagination failure:

  • Import stops after exactly 1 page
  • Returns same results repeatedly
  • Status shows "completed_all_pages" but dataset incomplete
  • Missing data compared to known totals

Example:

Expected: 74,386 highlights
Actual: 463 files (< 1% of total)
Status: "completed_all_pages" after 1 page

Step 2: Inspect Actual API Response

Don't trust assumptions - verify response structure:

Read the full file on GitHub · 592 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 592 lines · 93 tokens per session scan A 586a1376e860

Subscribe to this mod's changes

API Pagination Debugging is a skill published in the GitHub repository ngpestelos/readwise-mcp-server (0 stars, last pushed 1mo ago), licensed MIT. It adds 93 tokens to every session and 3,928 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

API Pagination Debugging compared with skills from other repositories

API Pagination Debugging next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
API Pagination Debuggingngpestelos/readwise-mcp-serverSkill01mo agoMITA93Claude Code
api-integration-architectsickn33/agentic-awesome-skillsSkill49kyesterdayMITA33Claude Code
printing-press-amendmvanhorn/cli-printing-pressSkill4.9kyesterdayMITA222Claude Code
convex-performance-auditopenclaw/clawhubSkill9.5kyesterdayMITA38Codex
convex-insightsopenclaw/clawhubSkill9.5kyesterdayMITA45Claude Code, Codex
axiom-networkingCharlesWiltgen/AxiomSkill1.3kyesterdayMITA37Claude Code
platform-apex-anonymous-runforcedotcom/sf-skillsSkill1.1k2d agoApache-2.0A119Claude Code