pagination
Standardizes pagination logic for API development and database queries.
Install
mkdir -p .claude/skills/pagination && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7773" && unzip -o skill.zip -d .claude/skills/pagination && rm skill.zipInstalls to .claude/skills/pagination
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Implement cursor-based and offset pagination for APIs. Covers efficient database queries, stable sorting, and pagination metadata.Key capabilities
- →Implement cursor-based pagination for real-time data
- →Apply offset pagination for simple list endpoints
- →Generate pagination metadata including next and previous cursors
- →Optimize database queries using indexed sort columns
- →Handle stable sorting by including ID in sort criteria
How it works
The skill provides functions to encode and decode cursors based on record timestamps and IDs, allowing the database to fetch subsequent pages efficiently. It uses a query function to filter records based on the provided cursor and returns a result set with pagination metadata.
Inputs & outputs
When to use pagination
- →Implement cursor-based pagination for large datasets
- →Add offset pagination to an API endpoint
- →Optimize database queries for paged results
About pagination
Provides implementation patterns for cursor-based and offset pagination. It handles query optimization, sorting stability, and the generation of pagination metadata for API responses.
Implement cursor-based and offset pagination for APIs. Covers efficient database queries, stable sorting, and pagination metadata.
When not to use it
- →Using offset pagination on large datasets
- →Returning total count on every request
Limitations
- →Offset pagination is inconsistent with concurrent writes
- →Cursor pagination does not support jumping to specific pages
How it compares
Unlike manual pagination which often relies on inefficient offset-based scanning, this approach uses cursor-based navigation to ensure consistent performance with concurrent data updates.
Compared to similar skills
pagination side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pagination (this skill) | 1 | 6mo | No flags | Intermediate |
| moai-domain-backend | 1 | 3mo | Review | Advanced |
| senior-backend | 14 | 7mo | Review | Advanced |
| jsonapi | 1 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by dadbodgeoff
View all by dadbodgeoff →You might also like
moai-domain-backend
modu-ai
Backend development specialist covering API design, database integration, microservices architecture, and modern backend patterns.
senior-backend
davila7
Comprehensive backend development skill for building scalable backend systems using NodeJS, Express, Go, Python, Postgres, GraphQL, REST APIs. Includes API scaffolding, database optimization, security implementation, and performance tuning. Use when designing APIs, optimizing database queries, implementing business logic, handling authentication/authorization, or reviewing backend code.
jsonapi
prowler-cloud
Strict JSON:API v1.1 specification compliance. Trigger: When creating or modifying API endpoints, reviewing API responses, or validating JSON:API compliance.
supabase-python
alinaqi
FastAPI with Supabase and SQLAlchemy/SQLModel
senior-backend
Cor-Incorporated
Guides backend system development with Node.js, Express, Go, Python, PostgreSQL, GraphQL, and REST APIs. Use when the user says: 'design an API', 'optimize database queries', 'implement authentication', 'set up backend', 'create API endpoint', 'database migration', 'fix N+1 query', 'add rate limitin
nanoclaw-backend-ts
binidx
Use when editing NanoClaw backend TypeScript under src. Covers Express routes, conversation flow, database persistence, runtime state, providers, scheduler, and agent execution.