Agent skill · software engineering · aj-geddes
api-filtering-sorting
Implement advanced filtering and sorting capabilities for APIs with query parsing, field validation, and optimization. Use when building search features, complex queries, or flexible data retrieval endpoints.
Why this skill is useful
Provides advanced filtering and sorting patterns for APIs that the AI wouldn't reliably generate on its own.
What it needs
About 1k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.
What this skill does
API Filtering & Sorting Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Build flexible filtering and sorting systems that handle complex queries efficiently with proper validation, security, and performance optimization. When to Use Building search and filter interfaces Implementing advanced query capabilities Creating flexible data retrieval endpoints Optimizing query performance Validating user input for queries Supporting complex filtering logic Quick Start Minimal working example: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- Query Parameter Filtering Query Parameter Filtering Advanced Filter Parser Advanced Filter Parser Filter Builder Pattern Filter Builder Pattern Python Filtering (SQLAlchemy) Python Filtering (SQLAlchemy) Elasticsearch Filtering Elasticsearch Filtering Query Validation Query Validation Best Practices ✅ DO Whitelist allowed filter fields Validate all input parameters Index fields used for filtering Support common operators Provide faceted navigation Cache filter options Limit filter complexity Document filter syntax Use database-native operators Optimize queries with indexes ❌ DON'T Allow arbitrary field filtering Support unlimited operators Ignore SQL injection risks Create complex filter logic Expose internal field names Filter on unindexed fields Allow deeply nested filters Skip input validation Combine all filters with OR Ignore performance impact
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aj-geddes/api-filtering-sorting