Agent skill
pagination-standard
Frontend-backend pagination standard, defining minimal parameter naming to reduce transmission characters, applicable to all system pagination scenarios.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/design/pagination-standard
SKILL.md
Pagination Parameter Standard
Request Parameters
| Param | Full Name | Type | Default | Description |
|---|---|---|---|---|
o |
offset | number | 0 | Offset, starting from which record |
s |
size | number | 42 | Page size |
Response Parameters
| Param | Full Name | Type | Description |
|---|---|---|---|
d |
data | array | Data list |
t |
total | number | Total record count |
p |
pages | number | Total page count |
Usage Examples
Backend Interface
interface PageQuery {
o?: number // offset, default 0
s?: number // size, default 42
}
interface PageResult<T> {
d: T[] // data list
t: number // total count
p: number // total pages
}
Frontend Query Params
GET /api/users?o=0&s=42
GET /api/users?o=42&s=42 // page 2
Frontend Pagination Calculation
// page number to offset
const offset = (page - 1) * size
// offset to page number
const page = Math.floor(offset / size) + 1
// total pages
const totalPages = Math.ceil(total / size)
Design Philosophy
Single-letter minimal parameter naming reduces network transmission characters. Significantly lowers bandwidth consumption in high-frequency call scenarios.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?