Agent skill

API Pagination

by secondsky in secondsky/claude-skills

Implements efficient API pagination using offset, cursor, and keyset strategies for large datasets.

MITAuto-check passed

Install API Pagination

skills CLI
$ npx skills add secondsky/claude-skills --skill api-pagination -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills api-pagination --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/api-pagination/skills/api-pagination .claude/skills/api-pagination && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-pagination
GitHub stars
227
Used in
1 other repo
Token cost
~530 tokens
SKILL.md length
65 words
Files
1
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

Implements efficient API pagination using offset, cursor, and keyset strategies for large datasets.

  • Building paginated endpoints
  • SKILL.md covers Pagination Strategies, Offset Pagination, Cursor Pagination and Response Format, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Implementing infinite scroll

What it does

API Pagination is an agent skill from secondsky/claude-skills. Implements efficient API pagination using offset, cursor, and keyset strategies for large datasets. Use when building paginated endpoints, implementing infinite scroll, or optimizing database queries for collections.

Its SKILL.md is about 530 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Building paginated endpoints
  • Implementing infinite scroll
  • Optimizing database queries for collections

Example prompts

  • “Use the api-pagination skill to implement efficient API pagination using offset, cursor, and keyset strategies for large datasets”
  • “/api-pagination”

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Pagination loads about 530 tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 65 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~530

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 65 words, ~530 tokens.

Download SKILL.mdSave it as .claude/skills/api-pagination/SKILL.md (or your agent's skills folder).
name
api-pagination
description
Implements efficient API pagination using offset, cursor, and keyset strategies for large datasets. Use when building paginated endpoints, implementing infinite scroll, or optimizing database queries for collections.
license
MIT

API Pagination

Implement scalable pagination strategies for handling large datasets efficiently.

Pagination Strategies

StrategyBest ForPerformance
Offset/LimitSmall datasets, simple UIO(n)
CursorInfinite scroll, real-timeO(1)
KeysetLarge datasetsO(1)

Offset Pagination

javascript
app.get('/products', async (req, res) => {
  const page = parseInt(req.query.page) || 1;
  const limit = Math.min(parseInt(req.query.limit) || 20, 100);
  const offset = (page - 1) * limit;

  const [products, total] = await Promise.all([
    Product.find().skip(offset).limit(limit),
    Product.countDocuments()
  ]);

  res.json({
    data: products,
    pagination: {
      page,
      limit,
      total,
      totalPages: Math.ceil(total / limit)
    }
  });
});

Cursor Pagination

javascript
app.get('/posts', async (req, res) => {
  const limit = 20;
  const cursor = req.query.cursor;

  const query = cursor
    ? { _id: { $gt: Buffer.from(cursor, 'base64').toString() } }
    : {};

  const posts = await Post.find(query).limit(limit + 1);
  const hasMore = posts.length > limit;
  if (hasMore) posts.pop();

  res.json({
    data: posts,
    nextCursor: hasMore ? Buffer.from(posts[posts.length - 1]._id).toString('base64') : null
  });
});

Response Format

json
{
  "data": [...],
  "pagination": {
    "page": 2,
    "limit": 20,
    "total": 150,
    "totalPages": 8
  },
  "links": {
    "first": "/api/products?page=1",
    "prev": "/api/products?page=1",
    "next": "/api/products?page=3",
    "last": "/api/products?page=8"
  }
}

Best Practices

  • Set reasonable max limits (e.g., 100)
  • Use cursor pagination for large datasets
  • Index sorting fields
  • Avoid COUNT queries when possible
  • Never allow unlimited page sizes

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/api-pagination/skills/api-pagination of secondsky/claude-skills.

Open the folder on GitHubat commit 8837836

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in secondsky/claude-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

API Pagination next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Pagination compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Pagination this skillsecondsky/claude-skills2271 repos~530Automated safety check: PassMIT
Implementation Strategyopenai/openai-agents-python30k—~3.7kAutomated safety check: PassMIT
Implementing Ransomware Backup Strategymukul975/Anthropic-Cybersecurity-Skills34k—~3.1kAutomated safety check: NotesApache-2.0
Implementsickn33/agentic-awesome-skills47k5 repos~306Automated safety check: PassMIT
Paginationthedaviddias/Front-End-Checklist74k—~699Automated safety check: PassMIT
Good Strategy Bad Strategywondelai/skills2.4k—~4.8kAutomated safety check: PassMIT

Similar skills

  • Implementation Strategy

    openai/openai-agents-python

    Official

    Choose supported scope and compatibility boundaries for SDK behavior changes; revisit when feedback changes the design.

    30k GitHub stars~3.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Implementing Ransomware Backup Strategy

    mukul975/Anthropic-Cybersecurity-Skills

    Designs a ransomware-resilient backup strategy using the 3-2-1-1-0 methodology (3 copies, 2 media types, 1 offsite, 1 immutable/air-gapped, 0 restore errors), configuring RPO/RTO-aligned schedules…

    34k GitHub stars~3.1k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Implement

    sickn33/agentic-awesome-skills

    Implement a piece of work based on a PRD or set of issues. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 5 repos~306 tokens
    Product & Project ManagementAuto-check passed
  • Pagination

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing paginated content (blog archives, product category pages, search results).

    74k GitHub stars~699 tokensUpdated yesterday
    Auto-check passed
  • Formulate and audit real strategy using Richard Rumelt's "Good Strategy Bad Strategy": an honest diagnosis, a guiding policy, and coherent action instead of goals, vision, and wishful thinking.

    2.4k GitHub stars~4.8k tokensUpdated 27 days ago
    Business, Finance & HRAuto-check passed
  • Implement

    codewhale-hq/Codewhale

    Carry an authorized, defined request or approved plan through scoped edits and proportionate verification.

    41k GitHub stars~190 tokensUpdated today
    Auto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 9 days ago
    Auto-check passed

Questions about API Pagination

What does API Pagination do?

Implements efficient API pagination using offset, cursor, and keyset strategies for large datasets. API Pagination is an agent skill from secondsky/claude-skills. Implements efficient API pagination using offset, cursor, and keyset strategies for large datasets.

When should I use API Pagination?

API Pagination fits situations like: building paginated endpoints; implementing infinite scroll; optimizing database queries for collections.

How do I install API Pagination in Claude Code?

Run `npx skills add secondsky/claude-skills --skill api-pagination -a claude-code`. Or copy the skill folder (plugins/api-pagination/skills/api-pagination in secondsky/claude-skills) into .claude/skills/api-pagination in your project. Claude Code loads it when a task matches its description.

How do I install API Pagination in Codex?

Run `npx skills add secondsky/claude-skills --skill api-pagination -a codex`. Or copy the skill folder (plugins/api-pagination/skills/api-pagination in secondsky/claude-skills) into .agents/skills/api-pagination in your project. Codex loads it when a task matches its description.

Can I use API Pagination in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill api-pagination -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-pagination, .gemini/skills/api-pagination, .github/skills/api-pagination and .opencode/skills/api-pagination in your project.

What does API Pagination need to run?

SKILL.md names no scripts, command-line tools or credentials: API Pagination is instructions for the agent only.

Does API Pagination access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Pagination safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Pagination use?

API Pagination is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Pagination use?

About 530 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Pagination?

Skills that share tags, products or a category with API Pagination: Implementation Strategy (openai/openai-agents-python, 30k stars), Implementing Ransomware Backup Strategy (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Implement (sickn33/agentic-awesome-skills, 47k stars) and Pagination (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Pagination?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.