Api Filtering Sorting
Flexible API filtering and sorting with whitelisted fields, typed operators, and multi-field sort parameters.
- CCM score
- 52 of 100
- skills.sh installs
- 440
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers query parameter parsing for filters and sorts, from bracketed operators like
price[gte]to comma-separatedsort=-price,nameordering - Includes a Node.js implementation with
allowedFiltersandallowedSortswhitelists plus aparseValuehelper that coerces booleans and numbers - Provides a table of 6 operators (eq, ne, gt/gte, lt/lte, in, like) with example query strings for each
- Designed for search endpoints, data grids, and dynamic query APIs, with security guidance on input validation, indexing, and injection prevention
Install
$ npx -y skills add secondsky/claude-skills --skill api-filtering-sorting -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
API Filtering & Sorting
Build flexible filtering and sorting systems that handle complex queries efficiently.
Query Parameter Syntax
GET /products?category=electronics&price[gte]=100&price[lte]=500&sort=-price,name
Implementation (Node.js)
const allowedFilters = ['category', 'status', 'price', 'createdAt'];
const allowedSorts = ['name', 'price', 'createdAt'];
app.get('/products', async (req, res) => {
const filter = {};
const sort = {};
// Parse filters
for (const [key, value] of Object.entries(req.query)) {
if (key === 'sort') continue;
const match = key.match(/^(\w+)\[(\w+)\]$/);
if (match) {
const [, field, operator] = match;
if (!allowedFilters.includes(field)) continue;
filter[field] = { [`$${operator}`]: parseValue(value) };
} else if (allowedFilters.includes(key)) {
filter[key] = value;
}
}
// Parse sort
if (req.query.sort) {
for (const field of req.query.sort.split(',')) {
const direction = field.startsWith('-') ? -1 : 1;
const name = field.replace(/^-/, '');
if (allowedSorts.includes(name)) sort[name] = direction;
}
}
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Backend & APIs, Databases
- First seen
- Jun 3, 2026
Questions
What is api-filtering-sorting?
api-filtering-sorting is an agent skill listed on Claude Marketplaces in the Backend & APIs category. The listing describes api-filtering-sorting like this: Builds flexible API filtering and sorting systems with query parameter parsing, validation, and security.
How do I install api-filtering-sorting?
Run npx -y skills add secondsky/claude-skills --skill api-filtering-sorting -y in a project to install api-filtering-sorting. After that, the agent can use api-filtering-sorting in that project.
Which category is api-filtering-sorting in?
api-filtering-sorting is in the Backend & APIs category on Claude Marketplaces. Other listings in that category next to api-filtering-sorting include entra-app-registration, neon and firebase-basics.
Where is the source code of api-filtering-sorting?
The source code of api-filtering-sorting is on GitHub at https://github.com/secondsky/claude-skills. The secondsky account on GitHub publishes api-filtering-sorting.
More from secondsky/claude-skills
All 116- Bun Drizzle Integration440
- Defense In Depth Validation439
- Session Management438
- Bun Runtime437
- Nuxt Production434
- Ultracite434
- Bun Docker433
- Bun Tanstack Start433
- Api Gateway Configuration430
- Nuxt Ui V4430
- Oauth Implementation430
- Bun Test Mocking429
- Health Check Endpoints429
- Bun Test Coverage426
- Mobile Offline Support425
- Nuxt Server425
- Api Changelog Versioning424
- Bun Cloudflare Workers424
- Bun Workers424
- Dependency Upgrade424
- Idempotency Handling424
- Bun Http Server423
- Bun Bundler422
- Turborepo422
Similar to Api Filtering Sorting
More Backend & APIsprisma-client-apiprisma/skills447.8K installsComplete Prisma Client query reference covering CRUD methods, filters, relations, and transactions.
tanstack-tablesecondsky/claude-skills524 installsHeadless TanStack Table v8 patterns for server-side pagination, filtering, and sorting with Cloudflare Workers and D1.
api-response-optimizationsecondsky/claude-skills442 installsPractical API response optimization covering sparse fieldsets, HTTP caching headers, and response compression for faster, lighter endpoints.
airtable-filtersairtable/skills221 installsStructured filter builder for Airtable MCP tools that matches records by field type, choice IDs, collaborators, and dates.
syncfusion-blazor-query-buildersyncfusion/blazor-ui-components-skills390 installsBlazor query builder with nested AND/OR groups, rule management, and drag-drop for dynamic filtering interfaces.
api-paginationaj-geddes/useful-ai-prompts496 installsPagination strategies for large API collections: offset/limit, cursor-based, and keyset with sorting and page-size guardrails.