Borrowing it
Nothing to install: this file belongs to dev-lou/PixelPilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dev-lou/PixelPilot/main/vscode/.github/instructions/uiux-fuzzy-search.instructions.mdgit clone --depth 1 https://github.com/dev-lou/PixelPilotWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-fuzzy-search)<a href="https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-fuzzy-search"><img src="https://agentmods.dev/badge/instructions/dev-lou/pixelpilot/uiux-fuzzy-search/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-fuzzy-search"><img src="https://agentmods.dev/badge/instructions/dev-lou/pixelpilot/uiux-fuzzy-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04344 | $0.04344 |
| Opus 5.5 | $0.01738 | $0.01738 |
| Sonnet 5.5 | $0.00869 | $0.00869 |
| Haiku 4.5 | $0.00434 | $0.00434 |
Grade A, and why
PixelPilot uiux-fuzzy-search.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 735 lines — stays where its author put it; the contents beside it link to each section on GitHub.
UI/UX Fuzzy Search
Implement typo-tolerant search with match highlighting and suggestions. Uses Fuse.js for client-side fuzzy matching with token-aware styling.
OVERVIEW
This skill covers:
- Fuse.js/lunr.js setup and configuration
- Debounced input handling
- Match highlighting
- "Did you mean?" suggestions
- Empty state and no results handling
- Token-aware styling
INSTALLATION
# Fuse.js (recommended for most use cases)
npm install fuse.js
# lunr.js (for larger datasets with full-text search)
npm install lunr
FUSE.JS IMPLEMENTATION
Basic Setup
import Fuse from 'fuse.js';
interface SearchItem {
id: string;
title: string;
description: string;
category: string;
tags: string[];
}
const fuseOptions: Fuse.IFuseOptions<SearchItem> = {
// Which keys to search
keys: [
{ name: 'title', weight: 2 }, // Higher weight = more important
{ name: 'description', weight: 1 },
{ name: 'category', weight: 1.5 },
{ name: 'tags', weight: 1 }
],
// Fuzzy matching settings
threshold: 0.4, // 0 = exact match, 1 = match anything
distance: 100, // How far to search for a match
minMatchCharLength: 2, // Minimum characters before searching
// Include match info for highlighting
includeScore: true,
includeMatches: true,
// Performance
ignoreLocation: true, // Search entire string, not just beginning
useExtendedSearch: true, // Enable advanced search patterns
};
// Create the search index
const fuse = new Fuse(items, fuseOptions);
// Search
const results = fuse.search('serch query'); // Typo-tolerant!
Search Component
import { useState, useMemo, useCallback } from 'react';
import Fuse from 'fuse.js';
import { Search, X, Loader2 } from 'lucide-react';
import { useDebounce } from '@/hooks/useDebounce';
interface FuzzySearchProps<T> {
items: T[];
keys: Fuse.FuseOptionKey<T>[];
placeholder?: string;
onSelect?: (item: T) => void;
renderItem?: (item: T, matches: Fuse.FuseResultMatch[]) => React.ReactNode;
emptyMessage?: string;
threshold?: number;
}
export function FuzzySearch<T extends { id: string }>({
items,
keys,
placeholder = 'Search...',
onSelect,
renderItem,
emptyMessage = 'No results found',
threshold = 0.4
}: FuzzySearchProps<T>) {
const [query, setQuery] = useState('');
const [isOpen, setIsOpen] = useState(false);
const [selectedIndex, setSelectedIndex] = useState(0);
const debouncedQuery = useDebounce(query, 200);
// Create Fuse instance
const fuse = useMemo(() => {
return new Fuse(items, {
keys,
threshold,
includeMatches: true,
includeScore: true,
minMatchCharLength: 2,
});
}, [items, keys, threshold]);
// Get search results
const results = useMemo(() => {
if (!debouncedQuery.trim()) return [];
return fuse.search(debouncedQuery).slice(0, 10);
}, [fuse, debouncedQuery]);
// Handle keyboard navigation
const handleKeyDown = useCallback((e: React.KeyboardEvent) => {
switch (e.key) {
case 'ArrowDown':
e.preventDefault();
setSelectedIndex(i => Math.min(i + 1, results.length - 1));
break;
case 'ArrowUp':
e.preventDefault();
setSelectedIndex(i => Math.max(i - 1, 0));
break;
case 'Enter':
e.preventDefault();
if (results[selectedIndex]) {
onSelect?.(results[selectedIndex].item);
setQuery('');
setIsOpen(false);
}
break;
case 'Escape':
setIsOpen(false);
break;
}
}, [results, selectedIndex, onSelect]);
return (
<div className="fuzzy-search" role="combobox" aria-expanded={isOpen}>
<div className="fuzzy-search__input-wrap">
<Search className="fuzzy-search__icon" aria-hidden="true" />
<input
type="text"
className="fuzzy-search__input"
value={query}
onChange={(e) => {
setQuery(e.target.value);
setIsOpen(true);
setSelectedIndex(0);
}}
onFocus={() => setIsOpen(true)}
onBlur={() => setTimeout(() => setIsOpen(false), 200)}
onKeyDown={handleKeyDown}
placeholder={placeholder}
aria-label="Search"
aria-autocomplete="list"
aria-controls="search-results"
/>
{query && (
<button
className="fuzzy-search__clear"
onClick={() => setQuery('')}
aria-label="Clear search"
>
<X size={16} />
</button>
)}
</div>
{isOpen && query.length >= 2 && (
<ul
id="search-results"
className="fuzzy-search__results"
role="listbox"
>
{results.length > 0 ? (
results.map((result, index) => (
<li
key={result.item.id}
className={`fuzzy-search__result ${
index === selectedIndex ? 'fuzzy-search__result--selected' : ''
}`}
role="option"
aria-selected={index === selectedIndex}
onClick={() => {
onSelect?.(result.item);
setQuery('');
setIsOpen(false);
}}
>
{renderItem ? (
renderItem(result.item, result.matches || [])
) : (
<HighlightedText
text={(result.item as any).title || ''}
matches={result.matches?.find(m => m.key === 'title')?.indices || []}
/>
)}
{result.score !== undefined && (
<span className="fuzzy-search__score">
{Math.round((1 - result.score) * 100)}% match
</span>
)}
</li>
))
) : (
<li className="fuzzy-search__empty">
{emptyMessage}
<DidYouMean query={query} items={items} keys={keys} />
</li>
)}
</ul>
)}
</div>
);
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 735 lines · 4,344 tokens per session scan A d1765c72c749
PixelPilot uiux-fuzzy-search.instructions.md is an instructions file published in the GitHub repository dev-lou/PixelPilot (2 stars, last pushed 7mo ago), licensed MIT. It adds 4,344 tokens to every session, about $0.0174 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
PixelPilot uiux-fuzzy-search.instructions.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| PixelPilot uiux-fuzzy-search.instructions.mddev-lou/PixelPilot | Instructions file | 2 | 7mo ago | MIT | A | 4,344 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |