revops
Design and optimize systems connecting marketing, sales, and customer success into a unified revenue engine.
product-search-scoring
Advanced product search system with keyword scoring, Vietnamese text normalization, multi-field matching, and search result ranking. USE WHEN implementing search functionality, adding keyword scoring to products, optimizing search algorithm, or improving search relevance.
Full skill instructions
Component 1: Text Normalization
Component 2: Keyword Processing
Component 3: Query Building & Sorting
Implement caching to prevent repeated searches:
// Generate cache key from filters
protected function makeCacheKey(array $filters): string
{
return 'product_filter_ids:' . md5(json_encode($filters));
}
// Cache product IDs from filter query
$cacheKey = $this->makeCacheKey($filters);
$cacheTtl = ProductCacheService::SHORT_CACHE_TTL; // e.g., 300 seconds
$allProductIds = Cache::remember($cacheKey, $cacheTtl, function () use ($filters) {
$idQuery = Product::query()->select('products.id');
$this->applyFilters($idQuery, $filters);
$this->applySort($idQuery, $filters['sort']);
return $idQuery->pluck('products.id')->all();
});
Maintain a denormalized search_index column on products:
// In Product model migration or observer
$searchIndex = StringHelper::normalizeForSearch(
implode(' ', [
$product->name,
$product->brand,
$product->type,
$product->tags->pluck('name')->join(' ')
])
);
$product->update(['search_index' => $searchIndex]);
Display found keywords highlighted in results:
public static function highlightSearchTerm(string $text, string $searchTerm): string
{
if (empty($searchTerm)) return e($text);
$searchTerms = self::splitSearchTerms($searchTerm);
$highlighted = $text;
foreach ($searchTerms as $term) {
$pattern = '/(' . preg_quote($term, '/') . ')/i';
$highlighted = preg_replace($pattern,
'<mark class="bg-yellow-200">$1</mark>',
$highlighted
);
}
return $highlighted;
}
User searches "giày nike" → Find products with name containing both terms
User filters by "Tất, vớ" + searches "cotton" → Show cotton socks/stockings
User selects "Nike" brand + sorts by price ascending → Show Nike products cheapest first
User selects type + brand + tags + searches → Combine all filters with AND/OR logic
For production, consider these enhancements:
For comprehensive implementation guide: read .claude/skills/workflows/product-search-scoring/CLAUDE.md
Implementation Steps: read .claude/skills/workflows/product-search-scoring/references/implementation-steps.md
Design and optimize systems connecting marketing, sales, and customer success into a unified revenue engine.
Strategic planning and optimization for email capture offers and gated content.
Directory submissions: the foundation layer of distribution that passes backlinks and discovery surface area into your marketing pages.
Sequence and choreograph multi-step animations with precise timing control and nested timelines.
Structured framework for planning product launches, feature announcements, and go-to-market strategies.
Upload files to Google Drive with automatic MIME type detection and metadata.
Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.
firecrawl lead gen
firecrawl lead research
firecrawl demo walkthrough
Team leadership persona with standup coordination, meeting prep, task delegation, and team communication.
Identify large Google Drive files consuming storage quota.
Revolutionize Video Creation with AI-Generated Avatars and Voices
Social media on autopilot
Design custom logos instantly with AI.
Text-heavy marketing and design images
Boost Your SEO with Content and SEO Silos
Revolutionize Your Marketing with AI-Powered MarketingBlocks!
10X faster & free AI content creation for 100+ use cases
Tribescaler | Make Your Tweets Go Viral