Skip to content
Skill

API pagination filtering sorting

Standard query parameter and response metadata conventions for paginated list endpoints

API pagination filtering sorting is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
13
Last commit
License
MIT
Listing updated

Similar skills

About API pagination filtering sorting

This skill gives the agent a consistent set of conventions for list endpoints: how to name and validate pagination, filter, sort and search parameters, and what metadata to return alongside the records. It covers choosing between page-based and limit/offset pagination, computing offsets, and deriving total pages and next-page flags from a total count.

It also describes how to structure the code behind the endpoint. The guidance covers a query builder that returns parameterized SQL for both data and count queries, a repository that runs them together, and a service that assembles the response. Sorting uses a mapping from public field names to column names, and search applies case-insensitive substring matching across several fields. The material further explains why cursor-based pagination avoids skipped or duplicated rows when data changes between requests, and when it is the better choice.

The examples are written in Python with FastAPI, Pydantic and asyncpg-style PostgreSQL placeholders, so the agent should expect to adapt them to other stacks. The skill is plain instructional content with no bundled scripts.

When your agent uses it

HTTP query parameter conventions for pagination, filtering, sorting, and search with standardized response metadata. Use when designing list endpoints or building repositories that turn query params into SQL.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 4 files (51 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the claude-kit plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ajyadav013/claude-kit
/plugin install claude-kit@claude-kit

Or copy only this skill to ~/.claude/skills/api-pagination-filtering-sorting:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/api-pagination-filtering-sorting &&
cp -R "$tmp/providers/codex/claude-kit/skills/api-pagination-filtering-sorting" ~/.claude/skills/api-pagination-filtering-sorting &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/api-pagination-filtering-sorting inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/api-pagination-filtering-sorting to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/api-pagination-filtering-sorting &&
cp -R "$tmp/providers/codex/claude-kit/skills/api-pagination-filtering-sorting" ~/.agents/skills/api-pagination-filtering-sorting &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/api-pagination-filtering-sorting inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/api-pagination-filtering-sorting to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/api-pagination-filtering-sorting &&
cp -R "$tmp/providers/codex/claude-kit/skills/api-pagination-filtering-sorting" ~/.cursor/skills/api-pagination-filtering-sorting &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/api-pagination-filtering-sorting inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ajyadav013/claude-kit.git --path providers/codex/claude-kit/skills/api-pagination-filtering-sorting

Or copy the folder to ~/.gemini/skills/api-pagination-filtering-sorting yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/api-pagination-filtering-sorting:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/api-pagination-filtering-sorting &&
cp -R "$tmp/providers/codex/claude-kit/skills/api-pagination-filtering-sorting" ~/.copilot/skills/api-pagination-filtering-sorting &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/api-pagination-filtering-sorting inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ajyadav013/claude-kit.git

Then copy claude-kit/providers/codex/claude-kit/skills/api-pagination-filtering-sorting into your agent's skills folder as api-pagination-filtering-sorting. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Pagination styles
Guidance on choosing page/page_size or limit/offset and keeping one style per service.
Response metadata
Standard fields for total counts, total pages and next/previous flags returned with records.
Multi-value and hierarchical filters
Patterns for repeated query params, comma-separated values and level-by-level product or location filters.
Sorting with validated fields
Maps public sort names to columns and restricts sort direction to asc or desc.
Parameterized query builder
Separates data and count query construction while binding values as SQL placeholders.
Cursor pagination guidance
Explains keyset pagination with opaque cursors and a stable tiebreaker sort key.

Good for

  • Design a paginated list endpoint with filters and sorting
  • Add a search parameter across several columns of a list API
  • Turn query parameters into a safe parameterized SQL query
  • Standardize pagination metadata across existing REST endpoints
  • Switch a large, frequently changing list to cursor-based pagination

API pagination filtering sorting FAQ

What does API pagination filtering sorting need to run?

It has no scripts or tool requirements. It is a set of instructions and reference code examples that the agent reads when a list endpoint task matches.

When does API pagination filtering sorting trigger?

It applies when designing list endpoints, building repositories that turn query parameters into SQL, adding search or sorting to lists, or standardizing pagination responses.

Which languages and frameworks do the examples use?

The examples are Python with FastAPI and Pydantic, and use PostgreSQL-style numbered placeholders.

Does API pagination filtering sorting change any files on its own?

The skill only provides guidance to the agent. It does not include scripts that modify files.

How do I install API pagination filtering sorting in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/api-pagination-filtering-sorting to use it in all your projects, or to .claude/skills/api-pagination-filtering-sorting in one project. Or install the claude-kit plugin, which includes it: /plugin marketplace add ajyadav013/claude-kit, then /plugin install claude-kit@claude-kit.

Does API pagination filtering sorting run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use API pagination filtering sorting?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to API pagination filtering sorting?

The closest alternatives to API pagination filtering sorting are API design, API design, API design, API design and Python backend.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ajyadav013/claude-kit

  1. Guides an agent through pytest, async fixtures and security-regression tests for FastAPI

    • Open source
    • 13 GitHub stars
    • Developer tools
  2. Lets your agent inspect and debug live browser pages via Chrome DevTools MCP

    • Open source
    • 13 GitHub stars
    • Browser automation
  3. Runs concurrent load and stress tests against API endpoints to find latency and throughput

    • Open source
    • 13 GitHub stars
    • Developer tools
  4. Lets an agent click through a feature in a real browser and check how it behaves

    • Open source
    • 13 GitHub stars
    • Developer tools
  5. Runs quick health checks on backend, frontend and login to catch obvious breakage

    • Open source
    • 13 GitHub stars
    • Developer tools
  6. Guides an agent through red-green-refactor, bug reproduction tests and test pyramid

    • Open source
    • 13 GitHub stars
    • Developer tools