add-pagination · git:20261115.237aa7d · 2026-11-15 · sha256 fff5ad2718926e84

add-pagination git:20261115.237aa7dA

Immutable. This exact content never changes and is served at /api/v1/blob/fff5ad2718926e84.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_za4jku2oaa52gb6f/fff5ad2718926e842082699324ca71b06b75551b60545dd17618268eb6796e86.json

Then /plugin install add-pagination@markdownregistry-za4jku2oaa52gb6f in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: add-pagination
description: Adds pagination to a list endpoint in the style your project already uses, with a stable order and updated tests.
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.