Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

implementing-search-filter实施搜索过滤器

Agent Skill

implementing-search-filter 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

635

周安装

27

GitHub Stars

350

下载量

222
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:implementing-search-filter(实施搜索过滤器)
来源仓库:https://github.com/ancoleman/ai-design-components
仓库路径:skills/implementing-search-filter
安装命令:
npx skills add https://github.com/ancoleman/ai-design-components --skill implementing-search-filter
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/ancoleman/ai-design-components --skill implementing-search-filter

简介

实施搜索过滤器技能用于查找、检索和筛选相关信息。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果的任务场景。
  • 核心能力包括信息检索、内容筛选和多维度查询,支持精准匹配用户需求。
  • 安装方式:github;安装命令:npx skills add https://github.com/ancoleman/ai-design-components --skill implementing-search-filter。
  • 使用前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。

SKILL.md

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.74%
按下载量换算59

Gemini CLI

23.45%
按下载量换算52

Cursor

17.75%
按下载量换算39

Antigravity

12.86%
按下载量换算29

OpenCode

6.88%
按下载量换算15

github-copilot

3.15%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills