Agent skill · Security

api-filtering-sorting

Builds flexible API filtering and sorting systems with query parameter parsing, validation, and security. Use when implementing search endpoints, building data grids, or creating dynamic query APIs.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-filtering-sorting --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 2 KB
Bundled scripts: none
Path: skills/api/api-filtering-sorting/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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) ```javascript 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; } } const products = await Product.find(filter).sort(sort); res.json({ data: products }); }); function parseValue(value) { if (valu

What's inside
Steps it walks through
  1. Query Parameter Syntax
  2. Implementation (Node.js)
  3. Filter Operators
  4. Security
  5. Best Practices
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-filtering-sorting skill do?

Builds flexible API filtering and sorting systems with query parameter parsing, validation, and security. Use when implementing search endpoints, building data grids, or creating dynamic query APIs.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-filtering-sorting --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going