- Home
- Skills
- APIs & Backend
- Api Pagination Contract Repairs
More screenshots
Works with the AI Agents you already use
Api Pagination Contract Repairs
Repair API pagination contract drift in a repo using Cursor.
$1
Api Pagination Contract Repairs
Example session with this skill installed
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.
- Read your context and instructions
- Compiled the api pagination contract
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.
Connects securely to your tools. The creator never sees your data.
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.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
Does not call live APIs or production databases. Cannot verify deployed backend behavior or actual customer data. Bound to files available in the repository.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 months ago
- Software
- tsc
Node.js
Permissions
Permissions are limited to the active local workspace and are used to inspect user-supplied or local workspace files; create or modify bounded local fixes, tests, documentation, or review artifacts; run repository-supported local tests, checks, builds, or parsing commands. The skill package does not require bundled credentials, unrestricted external network access, or automatic production changes.