Skip to content
Back to skills

Pagination

ASecurity

Pagination pattern reference — offset, cursor, keyset, and hybrid strategies for APIs and databases. Use when designing paginated endpoints, choosing pagination strategies, or optimizing large dataset traversal.

  • 12 stars
  • 0 votes
  • 0 copies
  • 11 views
  • Added September 7, 2026
developmentgobashsqldebugginggitapidatabaseperformance

Works with

  • cursor
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add bytesagain/ai-skills --skill pagination --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pagination?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pagination
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bytesagain-pagination/badge)](https://www.skillsdirectory.com/skills/bytesagain-pagination)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "pagination"
version: "1.0.0"
description: "Pagination pattern reference — offset, cursor, keyset, and hybrid strategies for APIs and databases. Use when designing paginated endpoints, choosing pagination strategies, or optimizing large dataset traversal."
author: "BytesAgain"
homepage: "https://bytesagain.com"
source: "https://github.com/bytesagain/ai-skills"
tags: [pagination, api, database, cursor, offset, keyset, performance]
category: "general"
---

# Pagination — Pagination Pattern Reference

Quick-reference skill for pagination strategies, trade-offs, and implementation patterns.

## When to Use

- Designing paginated REST or GraphQL APIs
- Choosing between offset, cursor, and keyset pagination
- Optimizing database queries for large datasets
- Implementing infinite scroll or page-based navigation
- Debugging pagination edge cases (duplicates, missing items)

## Commands

### `intro`

```bash
scripts/script.sh intro
```

Overview of pagination — why it exists, core concepts, and terminology.

### `offset`

```bash
scripts/script.sh offset
```

Offset-based pagination (LIMIT/OFFSET) — how it works, SQL examples, and pitfalls.

### `cursor`

```bash
scripts/script.sh cursor
```

Cursor-based pagination — opaque tokens, GraphQL Relay spec, implementation details.

### `keyset`

```bash
scripts/script.sh keyset
```

Keyset (seek) pagination — using WHERE clauses instead of OFFSET for O(1) performance.

### `compare`

```bash
scripts/script.sh compare
```

Side-by-side comparison of all pagination strategies with trade-off matrix.

### `pitfalls`

```bash
scripts/script.sh pitfalls
```

Common pagination bugs: phantom reads, duplicates on insert, off-by-one errors.

### `api`

```bash
scripts/script.sh api
```

API design patterns for pagination — headers, link relations, envelope formats.

### `sql`

```bash
scripts/script.sh sql
```

SQL cookbook — optimized queries for each pagination strategy with index advice.

### `help`

```bash
scripts/script.sh help
```

### `version`

```bash
scripts/script.sh version
```

## Configuration

| Variable | Description |
|----------|-------------|
| `PAGINATION_DIR` | Data directory (default: ~/.pagination/) |

---

*Powered by BytesAgain | bytesagain.com | hello@bytesagain.com*

Files in this skill

  • SKILL.md2.2 KB
  • scripts/script.sh14.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.