api-platform-pagination

api-platform-pagination is a skill for Claude Code, Codex from gerard-labs/superpowers-api-platform. It costs 0 tokens per session (693 once invoked), scanned A, original, MIT.

A set of guidance for configuring pagination in API Platform 4.3. Pagination splits a large collection of results into smaller responses instead of returning everything at once.

In plain words
What is it for?
It is for setting page sizes and response keys, using partial pagination for large tables, adding cursor pagination for infinite scroll, and creating custom paginators for non-Doctrine data sources.
Why use it?
It helps avoid expensive row counts, oversized responses, excessive page-size requests, and unsuitable pagination behavior for large or growing datasets.

Skill for Claude CodeCodex

Part of the gerard plugin — 53 skills, 25 commands, 7 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/gerard-labs/superpowers-api-platform/api-platform-pagination
Any agent
npx skills add gerard-labs/superpowers-api-platform --skill api-platform-pagination
Clone the repo
git clone --depth 1 https://github.com/gerard-labs/superpowers-api-platform

Made for: Claude Code, Codex.

Or install gerard, the plugin that ships this one along with the rest of its 53 skills, 25 commands, 7 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-platform-pagination

README.md
[![agentmods](https://agentmods.dev/badge/skills/gerard-labs/superpowers-api-platform/api-platform-pagination.svg)](https://agentmods.dev/skills/gerard-labs/superpowers-api-platform/api-platform-pagination)
Your own site
<a href="https://agentmods.dev/skills/gerard-labs/superpowers-api-platform/api-platform-pagination"><img src="https://agentmods.dev/badge/skills/gerard-labs/superpowers-api-platform/api-platform-pagination.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 693 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00693
Opus 5 $0.00000 $0.00347
Sonnet 5 $0.00000 $0.00139
Haiku 4.5 $0.00000 $0.00069

Measured 4d ago against content hash 9441312c6d39, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-platform-pagination scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/api-platform-pagination/SKILL.md · 45 lines

What it actually says

API Platform 4.3 — Pagination

Use when

  • The collection can grow to millions of rows and COUNT(*) is too expensive.
  • Infinite-scroll / autocomplete needs cursor pagination on a chronologically sortable key.
  • Default 30 items per page is wrong for your domain (raise or lower it explicitly).
  • Custom paginator needed (search engine, external API, computed projections).

Default workflow

  1. Verify the 4.x defaults: pagination_items_per_page: 30, hydra_prefix: false. Adapt tests.
  2. Cap paginationMaximumItemsPerPage (50-100) per operation — anti-DoS.
  3. For large tables: paginationPartial: true (no COUNT, no totalItems).
  4. For infinite scroll: identifier = UUID v7 / ULID + paginationViaCursor + ComparisonFilter on the cursor field.
  5. For non-Doctrine sources: implement a custom PaginatorInterface.

Guardrails

  • hydra_prefix: false is the default — tests must use member / totalItems / view / next (no hydra: prefix).
  • Default page size is 30 in 4.x (changed from 20 in 3.x) — fix tests that hard-code 20.
  • Always cap the max page size to prevent abusers from requesting ?itemsPerPage=10000.
  • Cursor pagination requires a stable sort key — UUID v7 / ULID are ideal; auto-increment IDs work but leak volume.

Progressive disclosure

  • SKILL.md lists posture and rules.
  • reference.md carries the full patterns: 4.x JSON-LD shape, partial pagination, cursor with UUID v7, fetch-join collection / output walkers, custom parameter names, custom paginator, best practices.

Output contract

  • Operations declare paginationItemsPerPage, paginationMaximumItemsPerPage, and where applicable paginationPartial / paginationViaCursor.
  • Tests assert the 4.x JSON-LD shape (no hydra: prefix).
  • Cursor pagination uses an indexed sort key; performance verified on a representative dataset.

References

  • reference.md
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 45 lines · 0 tokens per session scan A 9441312c6d39

Subscribe to this mod's changes

api-platform-pagination is a skill published in the GitHub repository gerard-labs/superpowers-api-platform (2 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 693 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.