search-filtering
Search & Filtering
This skill covers search and filter patterns — search UX, filter types, sort options, and empty states for filtered results.
Use-When
This skill activates when:
- Agent builds search interfaces
- Agent creates filterable lists or tables
- Agent designs sort functionality
- Agent handles empty search/filter results
Core Rules
- ALWAYS show results count or "no results" message
- ALWAYS allow clearing filters
- ALWAYS maintain filter state during session
- PREFER instant search for small datasets
- PREFER URL params for shareable filtered views
Common Agent Mistakes
- No feedback for empty results
- Filters that can't be cleared
- No indication of active filters
- Search that only triggers on submit (when instant is better)
Examples
✅ Correct
<SearchInput
value={query}
onChange={setQuery}
placeholder="Search items..."
/>
<div className="flex gap-2">
<FilterChip active={filter === 'all'} onClick={() => setFilter('all')}>
All
</FilterChip>
<FilterChip active={filter === 'active'} onClick={() => setFilter('active')}>
Active
</FilterChip>
</div>
{results.length === 0 && (
<EmptyState message="No results found" />
)}
❌ Wrong
<input placeholder="Search" />
{/* No feedback when empty */}
References
More from moderndegree/agent-skills
design-systems
Design tokens, spacing scales, color systems, and typography for building consistent UIs. Use when creating design systems, theming, or establishing UI foundations.
8motion-animation
Motion design principles, when to animate, transitions, and accessibility. Use when adding animations, micro-interactions, or ensuring accessibility for motion.
6dialogs-modals
Modal and dialog patterns, confirmations, destructive actions, and focus management. Use when building modals, dialogs, or confirmation dialogs.
6form-design
Form UX patterns, field types, multi-step wizards, and layout. Use when building forms, registration flows, or any data collection interfaces.
5a11y-best-practices
Comprehensive accessibility patterns for building, testing, and fixing accessible interfaces. Use when building UI components, forms, pages, or auditing code for accessibility issues.
5notifications-feedback
Toast notifications, alerts, feedback messages, and their timing. Use when adding user feedback, success messages, or alerts.
5