SkillsReviewed · secondsky

API Pagination

API Pagination is an assistant skill for developers building paginated APIs, but its examples need input validation and explicit ordering before production use. It provides JavaScript offset/limit and ID-based cursor patterns, a suggested response format, and brief advice on page sizes, indexes and count queries.

Researched 16 Nov 2026

In short.

API Pagination is an assistant skill for developers adding pagination to APIs, but the supplied examples leave input validation and reliable result ordering incomplete. It illustrates offset/limit and an ID-based cursor, recommends keyset pagination without a separate worked example, and suggests response metadata and navigation links. Its performance labels lack supporting measurements, installation and dependency versions are unspecified, and nothing was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Covers the complete captured folder plugins/api-pagination/skills/api-pagination at revision 88378361314f558fb719aec0af9fd898ab36f0b2, consisting of SKILL.md, plus the repository-root LICENSE as the accompanying notice. Other skills, parent plugin configuration and the rest of the repository are outside this scope. Installation, assistant integration, database behavior, concurrent-update behavior and performance remain untested; nothing was executed.

The overview

Identity

API Pagination has the skill name api-pagination and lives in secondsky/claude-skills under plugins/api-pagination/skills/api-pagination. Its description directs an assistant to use it for paginated endpoints, infinite scroll and collection-query optimization.

The captured folder contains one SKILL.md with instructions and illustrative JavaScript. The pinned source is [https://raw.githubusercontent.com/secondsky/claude-skills/88378361314f558fb719aec0af9fd898ab36f0b2/plugins/api-pagination/skills/api-pagination/SKILL.md].

Assessment

This is useful as a compact starting reference for discussing pagination with an assistant. It connects familiar page numbers and continuation cursors to concrete queries and response fields.

The examples need engineering review before adoption. Neither query specifies a sort, the offset route accepts negative parameters, and the cursor route leaves identifier serialization and cursor validation unresolved. The table's O(1) labels for cursor and keyset pagination have no accompanying query plans or benchmarks.

Users

The intended users are developers building collection endpoints, numbered result pages or feeds that load more items as someone scrolls. Beginners can use the snippets to understand the main response fields; experienced developers can use them as a starting point for database-specific implementation decisions.

The worked examples most directly suit developers familiar with JavaScript servers and document-model query methods. Translating them to SQL, another language or another database requires additional work that the skill does not explain.

Capabilities

The offset example derives an offset from page and limit, defaults to 20 items, caps the requested limit at 100, and returns page, limit, total and totalPages. It queries products and counts documents concurrently.

The cursor example uses a fixed page size of 20, requests one extra post to detect another page, and returns a Base64 nextCursor when more results exist. A separate response example adds first, previous, next and last links, but neither route implements that link generation.

The guidance recommends indexing sorting fields, limiting page sizes and avoiding count queries where possible. There is no separate worked keyset example or infinite-scroll client.

Using it

Requirements

The snippets assume an Express-style JavaScript server, Product and Post models exposing Mongoose-style query methods, and Node.js Buffer functionality for cursor conversion. These dependencies are inferred from the code; imports, schemas and package versions are absent.

A working application must supply those dependencies, database access, appropriate indexes and route error handling. Compatible assistant hosts, model requirements and minimum runtime versions are unspecified.

Mechanism

Offset pagination computes (page - 1) × limit, skips that many products and requests the next page. A separate count supplies the total used to calculate totalPages.

Cursor pagination decodes the supplied Base64 value into an _id boundary, filters for posts with a greater _id, and requests 21 results. If an extra result exists, the code removes it and attempts to encode the last retained identifier as the next cursor.

The cursor's greater-than boundary is also a keyset-style technique: it continues after a field value instead of skipping a numbered quantity of rows. This means the table's cursor and keyset categories overlap. Neither example explicitly orders its results.

Setup

The skill supplies no installation command, assistant registration procedure or activation example. Before installing it, confirm that the intended assistant supports this SKILL.md format and follow that host's documented installation method; compatibility is unknown from these files.

Using the snippets in an application requires supplying the server and models, defining result ordering, checking indexes, and adding validation and error handling. The file does not provide a complete application setup.

Example

For a request to /products?page=2&limit=20, the supplied formula gives an offset of 20 and requests up to 20 products. The separate response illustration uses total 150 and totalPages 8. Those numbers are illustrative, not observed results.

For /posts without a cursor, the cursor snippet starts with an empty filter and requests 21 posts. Its extra-result check determines whether to return a continuation token. Correct traversal still requires an explicit ordering consistent with the _id comparison.

Assessment & evidence

Limitations

The offset route does not reject negative page or limit values, and parseInt can accept partially numeric strings. Both routes omit an explicit sort, so the snippets do not establish stable page membership or reliable continuation.

The cursor is only Base64-encoded, with no supplied validation or integrity check. Encoding passes _id directly to Buffer.from without an explicit string conversion; whether that works depends on the model's identifier type and remains unverified.

The source does not establish behavior under concurrent inserts or deletes, consistency between the product query and its separate count, or error responses. Its fixed complexity labels are unsupported by workload details or measurements. Runtime correctness and performance were not assessed through execution.

Reasoning

The skill's practical value comes from making pagination choices concrete: page numbers become skip/limit operations, while continuation becomes an identifier boundary. The extra-result technique also illustrates how to detect another page without counting every matching record.

Confidence is limited to what the snippets show. An upper page-size cap does not establish valid inputs, and a cursor token does not establish correctly ordered results. Those missing guarantees explain why the examples require adaptation before deployment.

Alternatives

Within the skill, offset/limit is suggested for small datasets and simple interfaces, cursor pagination for infinite scroll or real-time feeds, and keyset pagination for large datasets. These are the author's stated fit recommendations, without measured comparisons.

The supplied offset example supports numbered pages and totals; the cursor example supports sequential continuation without a total count. Choose according to the navigation the application needs, then verify the relevant query behavior. No evidence comparing other skills, libraries or tools is supplied.

Evidence

The complete captured skill folder contains SKILL.md, recorded as 2,120 bytes. The accompanying repository-level LICENSE is recorded as 1,082 bytes. Both belong to source revision 88378361314f558fb719aec0af9fd898ab36f0b2.

The original directory address is [https://github.com/secondsky/claude-skills/tree/main/plugins/api-pagination/skills/api-pagination]. The pinned directory address is [https://github.com/secondsky/claude-skills/tree/88378361314f558fb719aec0af9fd898ab36f0b2/plugins/api-pagination/skills/api-pagination]. No tests, dependency manifest, supporting implementation files or benchmark results accompany the captured skill.

Access & freshness

Costs

No price is stated. The MIT license permits use and redistribution, but the supplied files establish no assistant subscription, model usage, hosting or database prices. Total operating cost is unknown.

The offset example performs both a data query and a document count for each request. The source recommends avoiding counts where possible, but supplies no measurements of database work, latency or monetary cost.

Rights

SKILL.md declares MIT, and the repository-level LICENSE grants permission to use, copy, modify, publish, distribute, sublicense and sell the software. Copies or substantial portions must retain the copyright and permission notices.

The notice names Claude Skills Maintainers with copyright year 2025 and disclaims warranties and liability. The captured license is available at [https://raw.githubusercontent.com/secondsky/claude-skills/88378361314f558fb719aec0af9fd898ab36f0b2/LICENSE].

Freshness

The supplied snapshot was captured on 2026-11-16 at 21:24:08.543 UTC and pins the files to revision 88378361314f558fb719aec0af9fd898ab36f0b2. The skill supplies no release number, dependency versions or source modification date.

Whether the repository's main branch has changed since capture is unknown. Compatibility with current assistant hosts, server frameworks and database packages is not established by this snapshot.

Actions

Before adopting the examples, validate positive pagination parameters, define a deterministic sort aligned with cursor comparisons, and verify identifier encoding and decoding. Choose a consistent response format, add error handling, and inspect the indexes required by the resulting queries.

In the intended application, test empty collections, malformed cursors, page-size boundaries, final pages and changes between requests. Check query plans and latency on representative data before relying on the scaling claims. These are recommended checks; no such results are available here.

Evidence for this report

LICENSEnotice · checked 2026-11-16