Agent skill

add-query-filter

Add custom query parameter filters to entity endpoints. Use when extending search/filter capabilities beyond the base pagination. Triggers on "add filter", "query parameter", "search filter", "filter by".

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill add-query-filter-madooei-backend-template --agent claude-code

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

Facts
Files in the skill folder: 2
SKILL.md size: 11 KB
Bundled scripts: none
Path: skills/api/add-query-filter-madooei-backend-template/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

# Add Query Filter Adds custom query parameter filters to entity schemas and repository implementations. ## Quick Reference **Files to modify**: 1. `src/schemas/{entity}.schema.ts` - Add filter to query params schema 2. `src/repositories/mockdb/{entity}.mockdb.repository.ts` - Implement filter logic 3. `src/repositories/mongodb/{entity}.mongodb.repository.ts` - Implement filter logic 4. `tests/schemas/{entity}.schema.test.ts` - Test new filter 5. `tests/repositories/{entity}.*.repository.test.ts` - Test filter behavior ## Prerequisites - Entity schema exists with `{entity}QueryParamsSchema` - Repository implementations exist ## Instructions ### Step 1: Add Filter to Query Params Schema Update `src/schemas/{entity}.schema.ts`: ```typescript import { z } from "zod"; import { queryParamsSchema } from "@/schemas/shared.schema"; // Extend the base query params with entity-specific filters export const {entity}QueryParamsSchema = queryParamsSchema.extend({ // Existing filters... createdBy: z.string().optional(), // Add new filter {filterName}: z.string().optional(), // OR for enum filter status: z.enum(["draft", "published", "archived"]).optional(), // OR for boolean filter (from query s

What's inside
Steps it walks through
  1. Quick Reference
  2. Prerequisites
  3. Instructions
  4. Step 1: Add Filter to Query Params Schema
  5. Step 2: Implement Filter in MockDB Repository
  6. Step 3: Implement Filter in MongoDB Repository
  7. Step 4: Add Schema Tests
  8. Step 5: Add Repository Tests
  9. Common Filter Patterns
  10. String Exact Match
  11. String Array (IN query)
  12. Partial Text Match
  13. Null/Not Null Check
  14. Adding MongoDB Indexes for Filters
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the add-query-filter skill do?

Add custom query parameter filters to entity endpoints. Use when extending search/filter capabilities beyond the base pagination. Triggers on "add filter", "query parameter", "search filter", "filter by".

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill add-query-filter-madooei-backend-template --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