ab-test-analysis
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes…
Implement efficient pagination strategies for large datasets using offset/limit, cursor-based, and keyset pagination. Use when returning collections, managing large result sets, or optimizing query performance.
$ npx -y skills add aj-geddes/useful-ai-prompts --skill api-pagination --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/api-paginationContext preview
The summary Claude sees to decide when to auto-load this skill.
Implement efficient pagination strategies for large datasets using offset/limit, cursor-based, and keyset pagination. Use when returning collections, managing large result sets, or optimizing query performance.
name: api-pagination description: > Implement efficient pagination strategies for large datasets using offset/limit, cursor-based, and keyset pagination. Use when returning collections, managing large result sets, or optimizing query performance.
Implement scalable pagination strategies for handling large datasets with efficient querying, navigation, and performance optimization.
Minimal working example:
// Node.js offset/limit implementation
app.get('/api/users', async (req, res) => {
const page = parseInt(req.query.page) || 1;
const limit = Math.min(parseInt(req.query.limit) || 20, 100); // Max 100
const offset = (page - 1) * limit;
try {
const [users, total] = await Promise.all([
User.find()
.skip(offset)
.limit(limit)
.select('id email firstName lastName createdAt'),
User.countDocuments()
]);
const totalPages = Math.ceil(total / limit);
res.json({
data: users,
pagination: {
page,
limit,
total,
totalPages,
hasNext: page < totalPages,
// ... (see reference guides for full implementation)Detailed implementations in the `references/` directory:
| Guide | Contents | |---|---| | [Offset/Limit Pagination](references/offsetlimit-pagination.md) | Offset/Limit Pagination | | [Cursor-Based Pagination](references/cursor-based-pagination.md) | Cursor-Based Pagination | | [Keyset Pagination](references/keyset-pagination.md) | Keyset Pagination | | [Search Pagination](references/search-pagination.md) | Search Pagination | | [Pagination Response Formats](references/pagination-response-formats.md) | Pagination Response Formats | | [Python Pagination (SQLAlchemy)](references/python-pagination-sqlalchemy.md) | Python Pagination (SQLAlchemy) |
488 production-ready AI prompts, all following a standardized template with validated quality gates. Transform ChatGPT, Claude, and other AI assistants into expert consultants.
Repo: aj-geddes/useful-ai-prompts
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes…
Implement Role-Based Access Control (RBAC), permissions management, and authorization…
Implement WCAG 2.1/2.2 accessibility standards, screen reader compatibility, keyboard…
Test web applications for WCAG compliance and ensure usability for users with disabilities.…
Plan and execute effective sprints using Agile methodologies. Define sprint goals, estimate…
Implement comprehensive alert management with PagerDuty, escalation policies, and incident…