response-design-and-pagination

Design API list responses with cursor-based pagination and expandable resource objects.

28|3|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/oborchers/fractional-cto --skill response-design-and-pagination
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: response-design-and-pagination
Source: https://github.com/oborchers/fractional-cto/tree/main/api-design-principles/skills/response-design-and-pagination
Command: npx skills add https://github.com/oborchers/fractional-cto --skill response-design-and-pagination

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenges of designing consistent, predictable, and efficient API responses, particularly for list endpoints and resource representation, ensuring a better developer experience and API maintainability.

Core Features & Use Cases

  • Consistent Response Envelopes: Standardizes the structure of list responses with data, has_more, and next_cursor fields.
  • Cursor-Based Pagination: Implements efficient and stable pagination that avoids issues with data shifting during concurrent writes.
  • Expandable Objects: Allows clients to request nested resource data via query parameters (?expand[]=field), reducing the need for multiple API calls.
  • Use Case: When building a new API endpoint to list user accounts, use this Skill to ensure it returns data in a consistent format, supports efficient pagination for large datasets, and allows clients to optionally fetch related user profile details in the same request.

Quick Start

Use the response-design-and-pagination skill to structure a JSON response for a list of products, including cursor-based pagination and an option to expand related category data.

Frequently Asked Questions about response-design-and-pagination

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a REST API response structure with cursor-based pagination?

Standardizing a REST API response structure with cursor-based pagination involves using data, has_more, and next_cursor fields to ensure stable retrieval during concurrent writes.

What is the best way to handle expandable resource objects in API design?

Handling expandable resource objects in API design is best achieved by allowing clients to request nested data via expand[] query parameters, reducing the need for multiple API calls.

Why should I use cursor pagination instead of offset pagination for large datasets?

You should use cursor pagination instead of offset pagination for large datasets because it avoids issues with data shifting during concurrent writes, ensuring efficient and stable performance at scale.

How do I implement consistent list envelopes for developer experience?

Implementing consistent list envelopes for developer experience requires standardizing API response structures with predictable data, has_more, and next_cursor fields across various client applications.

When do I need to use expand[] query parameters in a REST API?

You need to use expand[] query parameters in a REST API when clients want to fetch related nested resource details in a single request, minimizing redundant API calls and improving performance.