home / skills / omer-metin / skills-for-antigravity / algolia-search

algolia-search skill

/skills/algolia-search

This skill helps you implement Algolia search effectively by guiding indexing, React InstantSearch patterns, and relevance tuning.

npx playbooks add skill omer-metin/skills-for-antigravity --skill algolia-search

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.2 KB
---
name: algolia-search
description: Expert patterns for Algolia search implementation, indexing strategies, React InstantSearch, and relevance tuningUse when "adding search to, algolia, instantsearch, search api, search functionality, typeahead, autocomplete search, faceted search, search index, search as you type, algolia, search, instantsearch, indexing, relevance, faceted-search, autocomplete" mentioned. 
---

# Algolia Search

## Identity



## Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.

**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Overview

This skill packages expert patterns for implementing and tuning Algolia search across web apps, with focused guidance for indexing, React InstantSearch integration, and relevance tuning. It centralizes proven strategies, validation checks, and failure modes so teams can ship fast, resilient search experiences. The content aligns implementation steps with diagnostic and validation rules to reduce regressions and relevance issues.

How this skill works

The skill inspects requirements and maps them to authoritative patterns for creation, diagnosis, and review. For new implementations it follows the canonical patterns for indexing and InstantSearch wiring; for issues it identifies sharp edges that cause ranking or performance failures; for reviews it applies strict validations to ensure schema and configuration correctness. Recommendations always reference the pattern, edge-case, and validation guidance to keep fixes consistent and auditable.

When to use it

  • Adding Algolia search or autocomplete/typeahead to a web app
  • Implementing or migrating React InstantSearch components
  • Designing indexing strategies for multi-locale or multi-model data
  • Tuning relevance, ranking, and faceting after poor search results
  • Validating schema, attributes for ranking, and index settings before production

Best practices

  • Follow the canonical indexing patterns: flatten attributes, set clear objectIDs, and keep record sizes predictable
  • Model attributes for ranking and faceting separately; avoid overloading a single attribute with mixed intent
  • Use InstantSearch widgets for client rendering but perform heavy filtering and sanitization server-side
  • Iteratively tune relevance with measurable tests and use replica indices for A/B ranking experiments
  • Validate configurations against strict rules (required attributes, tokenization expectations, and size limits) before deploy

Example use cases

  • Implement typeahead autocomplete with debounce, hierarchical facets, and keyboard navigation using React InstantSearch
  • Design a two-tier indexing strategy: a fast lightweight index for typeahead and a richer index for detailed searches
  • Diagnose sudden drop in relevance by checking attribute weights, stop-words, and recent indexing changes
  • Set up replica indices to test different ranking formulas without impacting production search
  • Validate import jobs to ensure objectIDs uniqueness and attributes conform to tokenization and size constraints

FAQ

How do I choose which attributes become searchable vs facetable?

Make attributes searchable when they contribute to relevance signals; make attributes facetable when used for filtering or counts. Keep these roles distinct to avoid ranking surprises.

When should I use replicas for tuning?

Use replicas to run ranking experiments and A/B tests safely. Create replicas when you need different ranking formulas without altering the primary index.