Agent skill · Backend & API

api-pagination

Implement efficient pagination strategies for large datasets using offset/limit, cursor-based, and keyset pagination. Use when returning collections, managing large result sets, or optimizing query performance.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-pagination-aj-geddes-useful-ai-prompts --agent claude-code

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

Facts
Files in the skill folder: 2
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/api/api-pagination-aj-geddes-useful-ai-prompts/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 ## Overview Implement scalable pagination strategies for handling large datasets with efficient querying, navigation, and performance optimization. ## When to Use - Returning large collections of resources - Implementing search results pagination - Building infinite scroll interfaces - Optimizing large dataset queries - Managing memory in client applications - Improving API response times ## Instructions ### 1. **Offset/Limit Pagination** ```javascript // Node.js offset/limit implementation app.get('/api/users', async (req, res) => { const page = parseInt(req.query.page) || 1; const limit = Math.min(parseInt(req.query.limit) || 20, 100); // Max 100 const offset = (page - 1) * limit; try { const [users, total] = await Promise.all([ User.find() .skip(offset) .limit(limit) .select('id email firstName lastName createdAt'), User.countDocuments() ]); const totalPages = Math.ceil(total / limit); res.json({ data: users, pagination: { page, limit, total, totalPages, hasNext: page < totalPages, hasPrev: page > 1 }, links: { self: `/api/users?page=${page}&limit=${limit}`, first: `/api/users?page=1&limit=${limit}`, last: `/api/users?page=${totalPages}&limit=${limit}`, ...(page

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Instructions
  4. 1. Offset/Limit Pagination
  5. 2. Cursor-Based Pagination
  6. 3. Keyset Pagination
  7. 4. Search Pagination
  8. 5. Pagination Response Formats
  9. 6. Python Pagination (SQLAlchemy)
  10. Best Practices
  11. ✅ DO
  12. ❌ DON'T
  13. Performance Tips
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-pagination skill do?

Implement efficient pagination strategies for large datasets using offset/limit, cursor-based, and keyset pagination. Use when returning collections, managing large result sets, or optimizing query performance.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-pagination-aj-geddes-useful-ai-prompts --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