Skip to content
Back to skills

Add Pagination

ASecurity

Adds pagination to a list endpoint in the style your project already uses, with a stable order and updated tests.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
ai-agents

Works with

  • cursor

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill add-pagination --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Pagination?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Pagination
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-add-pagination/badge)](https://www.skillsdirectory.com/skills/workspace-templates-add-pagination)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-pagination
description: Adds pagination to a list endpoint in the style your project already uses, with a stable order and updated tests.
argument-hint: "[list endpoint or query function]"
user-invocable: true
disable-model-invocation: true
---

Add pagination to: $ARGUMENTS

1. Read the endpoint and the query behind it. Search other list endpoints for an existing convention (page and limit, offset, or cursor) and follow it. If there is none, prefer cursor paging for large or changing tables and page numbers for small admin lists, and say which you chose.
2. Add a default and a hard maximum page size, and validate both inputs.
3. Make the order deterministic: add a unique tiebreaker such as id after the sort column.
4. Return the project's envelope with items plus total or next cursor, whichever fits the chosen style. Avoid an expensive COUNT on huge tables unless the convention requires it.
5. Check that an index supports the sort and filter; if not, name the index to add but do not create it.
6. Update tests: first page, middle page, last page, empty result, limit above the maximum, invalid cursor.
7. Run the tests.

Report the new request and response shape, and the index suggestion if any.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.