Api Pagination Contract Repairs
Repair API pagination contract drift in a repo using Cursor.
Secure checkout via Stripe
Works with the AI tools you already use
See it in action
You say
We switched our customer list API to cursor pagination, but the React table is still sending page numbers and our MSW mocks are breaking. Repair the contract drift in the repo.
Your agent does
1. Pagination Contract Decision
Decision: PAGINATION CONTRACT DRIFT FOUND
The route handler uses nextCursor, but useCustomers.ts and CustomerTable.tsx still track pageNumber.
4. Drift Findings
- Request: UI sends
page(Expected:cursor) - Response: UI expects
totalPages(Actual:hasMore) - Mocks: MSW returns offset metadata (Stale)
5. Patch Plan
- Update
customerClient.tsto use cursor params. - Update
useCustomers.tsto handle cursor state. - Align
openapi.yamland MSW handlers. - Add traversal tests to
customer.test.ts.
What you get
About this skill
The problem
API pagination contracts often drift between the backend and frontend. You migrated from offset to cursor pagination, but your UI still expects page numbers, your OpenAPI docs are stale, and your tests are failing or hiding duplicate row bugs.
What it does
- Scans route handlers, controllers, and schemas to identify the canonical pagination contract.
- Detects drift across GraphQL schemas, TypeScript types, API clients, and frontend hooks.
- Identifies risks like missing next tokens, stale total-count assumptions, and duplicate-row bugs.
- Prepares safe repository patches for mocks, fixtures, UI components, and documentation.
- Generates guard tests for first page, end-of-list, and empty result edge cases.
Frameworks & tools
Works with REST, GraphQL, OpenAPI, Apollo, React Query, SWR, MSW, Zod, and Playwright.
Why this beats prompting it yourself
Manually tracing pagination drift across types, mocks, and UI logic is tedious and error-prone. This skill uses a structured register to ensure every layer of your stack—from the route validator to the Storybook story—stays in sync with the canonical contract.
Use cases
- Fixing infinite scroll bugs where rows are duplicated or skipped.
- Aligning frontend hooks and UI components after an offset-to-cursor migration.
- Updating stale MSW handlers and JSON fixtures to match new API response shapes.
- Generating comprehensive pagination tests that cover traversal and boundary conditions.
Known limitations
Does not call live APIs or query production databases. Operations are limited to repository files and user-supplied context.
How to install
Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- 30-day refund guarantee
- One-time purchase, yours forever
- Secure checkout via Stripe
Creator
109 skills on Agensi
Frequently Asked Questions
Popular in Testing & QA
api-contract-tester
Turn OpenAPI specs into exhaustive, framework-ready test suites covering happy paths, edge cases, and security gaps.

Accessibility Scanner
Automatically detect accessibility issues in websites and applications following WCAG and accessibility standards.

robot-to-playwright-converter
Most 'migrations' rewrite your tests from scratch. This one maps your existing keywords and locators automatically.
Prompt Dataset Builder
Build and curate high-quality prompt datasets for fine-tuning and eval — deduped and labeled.