exa-sdk-patterns

Featured

Apply production-ready exa-js SDK patterns with type safety, singletons, and wrappers. Use when implementing Exa integrations, refactoring SDK usage, or establishing team coding standards for Exa. Trigger with phrases like "exa SDK patterns", "exa best practices", "exa code patterns", "idiomatic exa", "exa wrapper".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Exa SDK Patterns ## Overview Production-ready patterns for the `exa-js` SDK. Covers client singletons, typed wrappers, error handling, retry logic, and response validation for real Exa API methods. ## Prerequisites - `exa-js` installed and `EXA_API_KEY` configured - TypeScript project with strict mode - Familiarity with async/await and error handling ## Instructions ### Step 1: Client Singleton ```typescript // src/exa/client.ts import Exa from "exa-js"; let instance: Exa | null = null; export function getExa(): Exa { if (!instance) { const apiKey = process.env.EXA_API_KEY; if (!apiKey) { throw new Error("EXA_API_KEY not set. Get one at https://dashboard.exa.ai"); } instance = new Exa(apiKey); } return instance; } ``` ### Step 2: Typed Search Wrapper ```typescript // src/exa/search.ts import Exa from "exa-js"; import { getExa } from "./client"; interface ExaSearchOptions { type?: "auto" | "neural" | "keyword" | "fast" | "instant" | "deep" | "deep-reasoning"; numResults?: number; includeDomains?: string[]; excludeDomains?: string[]; startPublishedDate?: string; endPublishedDate?: string; category?: "company" | "research paper" | "news" | "tweet" | "personal site" | "financial report" | "people"; includeText?: string[]; excludeText?: string[]; } interface ExaContentsOptions { text?: boolean | { maxCharacters?: number; includeHtmlTags?: boolean }; highlights?: boolean | { maxCharacters?: number; query?: string }; sum...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

exa-reliability-patterns

Implement Exa reliability patterns: query fallback chains, circuit breakers, and graceful degradation. Use when building fault-tolerant Exa integrations, implementing fallback strategies, or adding resilience to production search services. Trigger with phrases like "exa reliability", "exa circuit breaker", "exa fallback", "exa resilience", "exa graceful degradation".

2,266 Updated today
jeremylongshore
AI & Automation Featured

exa-hello-world

Create a minimal working Exa search example with real results. Use when starting a new Exa integration, testing your setup, or learning basic search, searchAndContents, and findSimilar patterns. Trigger with phrases like "exa hello world", "exa example", "exa quick start", "simple exa search", "first exa query".

2,266 Updated today
jeremylongshore
AI & Automation Featured

algolia-sdk-patterns

Apply production-ready algoliasearch v5 patterns: singleton client, typed search, error handling, and batch operations. Use when implementing Algolia integrations, refactoring SDK usage, or establishing team coding standards. Trigger: "algolia SDK patterns", "algolia best practices", "algolia code patterns", "idiomatic algolia".

2,266 Updated today
jeremylongshore
AI & Automation Featured

elevenlabs-sdk-patterns

Apply production-ready ElevenLabs SDK patterns for TypeScript and Python. Use when implementing ElevenLabs integrations, refactoring SDK usage, or establishing team coding standards for audio AI applications. Trigger: "elevenlabs SDK patterns", "elevenlabs best practices", "elevenlabs code patterns", "idiomatic elevenlabs", "elevenlabs typescript".

2,266 Updated today
jeremylongshore
AI & Automation Featured

exa-known-pitfalls

Identify and avoid Exa anti-patterns and common integration mistakes. Use when reviewing Exa code, onboarding new developers, or auditing existing Exa integrations for correctness. Trigger with phrases like "exa mistakes", "exa anti-patterns", "exa pitfalls", "exa what not to do", "exa code review".

2,266 Updated today
jeremylongshore