senrecep/tsentials/tsentials-pagination
Claude Code and agent skill by senrecep/tsentials
- community
Checking that the SKILL.md file is still in the repository.
Use when paging collections — paginate() for in-memory offset paging (pageNumber/pageSize/search, PaginationResponse with totalPages and hasNextPage), keysetOrdering + keysetPaginate for stable cursor paging, and planKeysetPage/createKeysetPageResponse plus encodeCursor/decodeCursor and CursorProtector for database-backed keyset queries.
Install
npx vskill@latest install senrecep/tsentials/tsentials-paginationSKILL.md
tsentials/pagination
Offset paging and keyset (cursor) paging helpers. Subpath-only: not exported from the root tsentials entry.
Installation
Import
Offset paging (in-memory)
pageNumber is clamped to >= 1 and pageSize to [1, maxPageSize]. Helpers for database queries: normalizePaginationRequest(request, max?), skipCount(request), createPaginationResponse(items, pageNumber, pageSize, totalCount), normalizeCursorRequest(request, maxLimit?).
Keyset paging (in-memory)
Key kinds: 'number' | 'string' | 'date' | 'bigint'. Pass a third argument to ascending/descending as a custom accessor when the path is not a plain property.
Errors (failure codes)
| Code | Cause | |
|---|---|---|
KeysetPagination.InvalidCursor | malformed or tampered cursor | |
KeysetPagination.AfterAndBefore | both after and before set | |
KeysetPagination.CursorDirectionMismatch / CursorKeyMismatch | cursor issued for another direction or ordering | |
KeysetPagination.UnsupportedCursorVersion | unknown cursor format version |
Database-backed keyset
Cursor protection (for example HMAC signing): implement CursorProtector (protect, tryUnprotect) and pass it as { protector } in the keyset options. encodeCursor / decodeCursor are exported for custom flows.
Patterns and pitfalls
- Import from
tsentials/pagination— never from the roottsentialsentry. - Offset helpers never throw on out-of-range input (they clamp); keyset helpers return
Resultfailures for bad cursors. - Cursors are bound to the ordering fingerprint: changing the ordering invalidates existing cursors.
- The last key of a
keysetOrderingmust be unique (typicallyid), otherwise rows can be skipped or repeated. limitis clamped tomaxLimit(default 100,KEYSET_DEFAULTS).- In-memory string keys compare ordinally, unlike a database collation.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.well-known/agent-skills/tsentials-pagination/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/senrecep/tsentials/tsentials-pagination)