exa-sdk-patterns
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". '
npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill exa-sdk-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 repo
- Overview
- Prerequisites
- Instructions
- Step 1: Client Singleton
- Step 2: Typed Search Wrapper
- Step 3: Error Handling Wrapper
- Step 4: Retry with Exponential Backoff
- Step 5: Response Validation with Zod
- Error Handling
- Examples
- Factory Pattern (Multi-tenant)
- Combined: Safe + Retry + Typed
- Resources
- Next Steps
What does the exa-sdk-patterns skill do?
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". '
How do I install it?
Run `npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill exa-sdk-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From jeremylongshore/claude-code-plugins-plus-skills, a repository with 2,630 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.