algolia-sdk-patterns
Installation
SKILL.md
Algolia SDK Patterns
Overview
Production-ready patterns for algoliasearch v5. Key architectural change from v4: all methods live on the client directly — no more client.initIndex(). Index name is passed as a parameter to every call.
Prerequisites
algoliasearchv5+ installed- Completed
algolia-install-authsetup - TypeScript project (patterns work in JS too, you just lose type safety)
Instructions
Pattern 1: Typed Singleton Client
// src/algolia/client.ts
import { algoliasearch, type Algoliasearch } from 'algoliasearch';