Agent skill

API Filtering Sorting

by secondsky in secondsky/claude-skills

Builds flexible API filtering and sorting systems with query parameter parsing, validation, and security.

MITAuto-check passed

Install API Filtering Sorting

skills CLI
$ npx skills add secondsky/claude-skills --skill api-filtering-sorting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills api-filtering-sorting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/api-filtering-sorting/skills/api-filtering-sorting .claude/skills/api-filtering-sorting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-filtering-sorting
GitHub stars
227
Used in
1 other repo
Token cost
~587 tokens
SKILL.md length
80 words
Files
1
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

Builds flexible API filtering and sorting systems with query parameter parsing, validation, and security.

  • Implementing search endpoints
  • SKILL.md covers Query Parameter Syntax, Implementation (Node.js), Filter Operators and Security, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Building data grids

What it does

API Filtering Sorting is an agent skill from secondsky/claude-skills. 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.

Its SKILL.md is about 590 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Implementing search endpoints
  • Building data grids
  • Creating dynamic query APIs

Example prompts

  • “Use the api-filtering-sorting skill to build flexible API filtering and sorting systems with query parameter parsing, validation, and security”
  • “/api-filtering-sorting”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Filtering Sorting loads about 587 tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 80 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~587

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 80 words, ~587 tokens.

Download SKILL.mdSave it as .claude/skills/api-filtering-sorting/SKILL.md (or your agent's skills folder).
name
api-filtering-sorting
description
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.
license
MIT

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 (value === 'true') return true;
  if (value === 'false') return false;
  if (!isNaN(value)) return Number(value);
  return value;
}

Filter Operators

OperatorMeaningExample
eqEquals?status=active
neNot equals?status[ne]=deleted
gt/gteGreater than?price[gte]=100
lt/lteLess than?price[lte]=500
inIn array?status[in]=active,pending
likeContains?name[like]=phone

Security

  • Whitelist allowed filter fields
  • Validate input types per field
  • Index frequently-filtered columns
  • Limit query complexity
  • Prevent SQL/NoSQL injection

Best Practices

  • Support common operators
  • Cache filter option lists
  • Monitor query performance
  • Provide sensible defaults

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/api-filtering-sorting/skills/api-filtering-sorting of secondsky/claude-skills.

Open the folder on GitHubat commit 8837836

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in secondsky/claude-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

API Filtering Sorting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Filtering Sorting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Filtering Sorting this skillsecondsky/claude-skills2271 repos~587Automated safety check: PassMIT
Parametersthedaviddias/Front-End-Checklist74k—~638Automated safety check: PassMIT
Agent Sortaffaan-m/ECC274k1 repos~1.5kAutomated safety check: PassMIT
Filterzalando/skipper3.3k—~527Automated safety check: PassMIT
Agent Sortaffaan-m/ECC274k—~973Automated safety check: PassMIT
Agent Sortaffaan-m/ECC274k—~691Automated safety check: PassMIT

Similar skills

  • Parameters

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing URL structure or configuring search engine handling of filtered, sorted, or tracked URLs.

    74k GitHub stars~638 tokensUpdated yesterday
    Sales & SupportAuto-check passed
  • Agent Sort

    affaan-m/ECC

    Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes.

    274k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Filter

    zalando/skipper

    Create or modify code in the filters package and all its sub-folders

    3.3k GitHub stars~527 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Agent Sort

    affaan-m/ECC

    並行リポジトリ対応のレビューパスを使用して、スキル、コマンド、ルール、フック、エクストラを DAILY と LIBRARY のバケットに分類することで、特定のリポジトリ向けのエビデンスに基づいた ECC インストール計画を構築します。プロジェクトが完全なバンドルをロードする代わりに実際に必要なものに ECC をトリミングする必要がある場合に使用します。

    274k GitHub stars~973 tokensUpdated 2 days ago
    Auto-check passed
  • Agent Sort

    affaan-m/ECC

    通过将技能、命令、规则、钩子和额外内容并行进行仓库感知审查,为特定仓库构建基于证据的 ECC 安装计划,将其分为 DAILY 和 LIBRARY 两类。当 ECC 应精简为项目实际所需而非加载完整包时使用。

    274k GitHub stars~691 tokensUpdated 2 days ago
    Auto-check passed
  • Benchmarks Django ORM filters in Saleor by generating bulk data, extracting the SQL and running EXPLAIN ANALYZE to check index usage.

    23k GitHub stars~2.3k tokensUpdated yesterday
    DatabasesAuto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 9 days ago
    Auto-check passed

Questions about API Filtering Sorting

What does API Filtering Sorting do?

Builds flexible API filtering and sorting systems with query parameter parsing, validation, and security. API Filtering Sorting is an agent skill from secondsky/claude-skills. Builds flexible API filtering and sorting systems with query parameter parsing, validation, and security.

When should I use API Filtering Sorting?

API Filtering Sorting fits situations like: implementing search endpoints; building data grids; creating dynamic query APIs.

How do I install API Filtering Sorting in Claude Code?

Run `npx skills add secondsky/claude-skills --skill api-filtering-sorting -a claude-code`. Or copy the skill folder (plugins/api-filtering-sorting/skills/api-filtering-sorting in secondsky/claude-skills) into .claude/skills/api-filtering-sorting in your project. Claude Code loads it when a task matches its description.

How do I install API Filtering Sorting in Codex?

Run `npx skills add secondsky/claude-skills --skill api-filtering-sorting -a codex`. Or copy the skill folder (plugins/api-filtering-sorting/skills/api-filtering-sorting in secondsky/claude-skills) into .agents/skills/api-filtering-sorting in your project. Codex loads it when a task matches its description.

Can I use API Filtering Sorting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill api-filtering-sorting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-filtering-sorting, .gemini/skills/api-filtering-sorting, .github/skills/api-filtering-sorting and .opencode/skills/api-filtering-sorting in your project.

What does API Filtering Sorting need to run?

SKILL.md names no scripts, command-line tools or credentials: API Filtering Sorting is instructions for the agent only. Our summary lists: Node.js.

Does API Filtering Sorting access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Filtering Sorting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Filtering Sorting use?

API Filtering Sorting is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Filtering Sorting use?

About 587 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Filtering Sorting?

Skills that share tags, products or a category with API Filtering Sorting: Parameters (thedaviddias/Front-End-Checklist, 74k stars), Agent Sort (affaan-m/ECC, 274k stars), Filter (zalando/skipper, 3.3k stars) and Agent Sort (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Filtering Sorting?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.