Implementing Search Filter logo

Implementing Search Filter

Community
ancoleman
implementing-search-filter

Implements search and filter interfaces for both frontend (React/TypeScript) and backend (Python) with debouncing, query management, and database integration. Use when adding search functionality, building filter UIs, implementing faceted search, or optimizing search performance.

Overview

Publisherancoleman
Repositoryai-design-components
Skill nameimplementing-search-filter
Stars
523
Forks
73
Bundled files
20
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 20 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ancoleman on GitHub. Read the source before you install it.

Installation

Install the Implementing Search Filter AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ancoleman/ai-design-components.git /tmp/ai-design-components
mkdir -p .claude/skills
cp -r /tmp/ai-design-components/skills/implementing-search-filter .claude/skills/implementing-search-filter
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Implementing Search Filter in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Implementing Search Filter on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Implementing Search Filter is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Search & Filter Implementation

Implement search and filter interfaces with comprehensive frontend components and backend query optimization.

Purpose

This skill provides production-ready patterns for implementing search and filtering functionality across the full stack. It covers React/TypeScript components for the frontend (search inputs, filter UIs, autocomplete) and Python patterns for the backend (SQLAlchemy queries, Elasticsearch integration, API design). The skill emphasizes performance optimization, accessibility, and user experience.

When to Use

  • Building product search with category and price filters
  • Implementing autocomplete/typeahead search
  • Creating faceted search interfaces with dynamic counts
  • Adding search to data tables or lists
  • Building advanced boolean search for power users
  • Implementing backend search with SQLAlchemy or Django ORM
  • Integrating Elasticsearch for full-text search
  • Optimizing search performance with debouncing and caching
  • Creating accessible search experiences

Core Components

Frontend Search Patterns

Search Input with Debouncing

  • Implement 300ms debounce for performance
  • Show loading states during search
  • Clear button (X) for resetting
  • Keyboard shortcuts (Cmd/Ctrl+K)
  • See references/search-input-patterns.md

Autocomplete/Typeahead

  • Suggestion dropdown with keyboard navigation
  • Highlight matched text in suggestions
  • Recent searches and popular items
  • Prevent request flooding with debouncing
  • See references/autocomplete-patterns.md

Filter UI Components

  • Checkbox filters for multi-select
  • Range sliders for numerical values
  • Dropdown filters for single selection
  • Filter chips showing active selections
  • See references/filter-ui-patterns.md

Backend Query Patterns

Database Query Building

  • Dynamic query construction with SQLAlchemy
  • Django ORM filter chaining
  • Index optimization for search columns
  • Full-text search in PostgreSQL
  • See references/database-querying.md

Elasticsearch Integration

  • Document indexing strategies
  • Query DSL for complex searches
  • Faceted aggregations
  • Relevance scoring and boosting
  • See references/elasticsearch-integration.md

API Design

  • RESTful search endpoints
  • Query parameter validation
  • Pagination with cursor/offset
  • Response caching strategies
  • See references/api-design.md

Implementation Workflows

Client-Side Search (<1000 items)

  1. Load data into memory
  2. Implement filter functions in JavaScript
  3. Apply debounced search on text input
  4. Update results instantly
  5. Maintain filter state in React

Server-Side Search (>1000 items)

  1. Design search API endpoint
  2. Validate and sanitize query parameters
  3. Build database query dynamically
  4. Apply pagination
  5. Return results with metadata
  6. Cache frequent queries

Hybrid Approach

  1. Use client-side filtering for immediate feedback
  2. Fetch server results in background
  3. Merge and deduplicate results
  4. Update UI progressively
  5. Cache recent searches locally

Performance Optimization

Frontend Optimization

Debouncing Implementation

  • Use debounce from lodash or custom implementation
  • Cancel pending requests on new input
  • Show skeleton loaders during fetch
  • Script: scripts/debounce_calculator.js

Query Parameter Management

  • Sync filters with URL for shareable searches
  • Use React Router or Next.js for URL state
  • Compress complex queries
  • See references/query-parameter-management.md

Backend Optimization

Query Optimization

  • Create appropriate database indexes
  • Use query analyzers to identify bottlenecks
  • Implement query result caching
  • Script: scripts/generate_filter_query.py

Validation & Security

  • Sanitize all search inputs
  • Prevent SQL injection
  • Rate limit search endpoints
  • Script: scripts/validate_search_params.py

Accessibility Requirements

ARIA Patterns

  • Use role="search" for search regions
  • Implement aria-live for result updates
  • Provide clear labels for filters
  • Support keyboard-only navigation

Keyboard Support

  • Tab through all interactive elements
  • Arrow keys for autocomplete navigation
  • Escape to close dropdowns
  • Enter to select/submit

Technology Stack

Frontend Libraries

Primary: Downshift (Autocomplete)

  • Accessible autocomplete primitives
  • Headless/unstyled for flexibility
  • WAI-ARIA compliant
  • Install: npm install downshift

Alternative: React Select

  • Full-featured select/filter component
  • Built-in async search
  • Multi-select support

Backend Technologies

Python/SQLAlchemy

  • Dynamic query building
  • Relationship loading optimization
  • Query result pagination

Python/Django

  • Django Filter backend
  • Django REST Framework filters
  • Full-text search with PostgreSQL

Elasticsearch (Python)

  • elasticsearch-py client
  • elasticsearch-dsl for query building

Bundled Resources

References

  • references/search-input-patterns.md - Input implementations
  • references/autocomplete-patterns.md - Typeahead patterns
  • references/filter-ui-patterns.md - Filter components
  • references/database-querying.md - SQL query patterns
  • references/elasticsearch-integration.md - Elasticsearch setup
  • references/api-design.md - API endpoint patterns
  • references/performance-optimization.md - Performance tips
  • references/library-comparison.md - Library evaluation

Scripts

  • scripts/generate_filter_query.py - Build SQL/ES queries
  • scripts/validate_search_params.py - Validate inputs
  • scripts/debounce_calculator.js - Calculate debounce timing

Examples

  • examples/product-search.tsx - E-commerce search
  • examples/autocomplete-search.tsx - Autocomplete implementation
  • examples/sqlalchemy_search.py - SQLAlchemy patterns
  • examples/fastapi_search.py - FastAPI search endpoint
  • examples/django_filter_backend.py - Django filters

Assets

  • assets/filter-config-schema.json - Filter configuration
  • assets/search-api-spec.json - OpenAPI specification

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Implementing Search Filter AI skill do?

Implements search and filter interfaces for both frontend (React/TypeScript) and backend (Python) with debouncing, query management, and database integration. Use when adding search functionality, building filter UIs, implementing faceted search, or optimizing search performance.

Why use Implementing Search Filter on TypingMind?

Because you install it once and use it with any model. Implementing Search Filter is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Implementing Search Filter in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ancoleman/ai-design-components/tree/main/skills/implementing-search-filter. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Implementing Search Filter?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Implementing Search Filter?

As many as you like. As long as a model supports skills, you can use Implementing Search Filter with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Implementing Search Filter AI skill free?

Yes. It is published on GitHub by ancoleman under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇