Install
$ agentstack add skill-claude-dev-suite-claude-dev-suite-pagination ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Pagination
Cursor-Based (recommended for large datasets)
app.get('/api/products', async (req, res) => {
const limit = Math.min(parseInt(req.query.limit as string) || 20, 100);
const cursor = req.query.cursor as string | undefined;
const where: any = {};
if (cursor) {
where.id = { gt: cursor };
}
const items = await db.product.findMany({
where,
take: limit + 1, // Fetch one extra to check hasMore
orderBy: { id: 'asc' },
});
const hasMore = items.length > limit;
if (hasMore) items.pop();
res.json({
data: items,
pagination: {
hasMore,
nextCursor: hasMore ? items[items.length - 1].id : null,
},
});
});
Offset-Based (simple, good for small datasets)
app.get('/api/products', async (req, res) => {
const page = Math.max(parseInt(req.query.page as string) || 1, 1);
const limit = Math.min(parseInt(req.query.limit as string) || 20, 100);
const offset = (page - 1) * limit;
const [items, total] = await Promise.all([
db.product.findMany({ skip: offset, take: limit, orderBy: { createdAt: 'desc' } }),
db.product.count(),
]);
res.json({
data: items,
pagination: {
page, limit, total,
totalPages: Math.ceil(total / limit),
hasMore: offset + items.length {
const { sort = 'createdAt', order = 'desc', category, minPrice, maxPrice, search } = req.query;
const where: any = {};
if (category) where.category = category;
if (minPrice || maxPrice) {
where.price = {};
if (minPrice) where.price.gte = parseFloat(minPrice as string);
if (maxPrice) where.price.lte = parseFloat(maxPrice as string);
}
if (search) where.name = { contains: search, mode: 'insensitive' };
const items = await db.product.findMany({
where,
orderBy: { [sort as string]: order },
take: limit,
skip: offset,
});
res.json({ data: items, pagination: { /* ... */ } });
});
Spring Boot (Pageable)
@GetMapping("/products")
public Page list(
@RequestParam(defaultValue = "0") int page,
@RequestParam(defaultValue = "20") int size,
@RequestParam(defaultValue = "createdAt,desc") String[] sort) {
Pageable pageable = PageRequest.of(page, Math.min(size, 100),
Sort.by(Sort.Direction.fromString(sort[1]), sort[0]));
return productRepo.findAll(pageable).map(mapper::toDto);
}
Comparison
| Strategy | Pros | Cons | Best For | |----------|------|------|----------| | Offset | Simple, jump to page | Slow on large tables, skip drift | Admin panels, small datasets | | Cursor | Fast, stable with inserts | Can't jump to page N | Feeds, infinite scroll, large datasets | | Keyset | Fast, no skip drift | Complex multi-column sort | Time-series, ordered data |
Anti-Patterns
| Anti-Pattern | Fix | |--------------|-----| | No max page size | Cap limit (e.g., max 100) | | COUNT(*) on huge tables | Use cursor pagination, skip total count | | Offset on millions of rows | Use cursor or keyset pagination | | Returning all fields | Select only needed fields, support fields param | | No default sorting | Always define default sort for stable results |
Production Checklist
- [ ] Maximum page size enforced (e.g., 100)
- [ ] Default sort order defined
- [ ] Cursor pagination for large/growing datasets
- [ ] Input validation on page/limit/sort params
- [ ] Consistent response envelope (
data,pagination)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: claude-dev-suite
- Source: claude-dev-suite/claude-dev-suite
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.