exa-sdk-patterns
Establishes production coding standards for Exa API integrations using TypeScript.
Install
mkdir -p .claude/skills/exa-sdk-patterns && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3369" && unzip -o skill.zip -d .claude/skills/exa-sdk-patterns && rm skill.zipInstalls to .claude/skills/exa-sdk-patterns
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Apply production-ready exa-js SDK patterns with type safety, singletons,Key capabilities
- →Implement a client singleton for the Exa SDK
- →Create typed wrappers for Exa search methods
- →Add error handling to Exa API calls
- →Implement retry logic with exponential backoff for transient errors
- →Validate Exa API responses using Zod
- →Apply a factory pattern for multi-tenant Exa clients
How it works
The skill provides patterns for creating a single Exa client instance, wrapping API calls with type definitions and error handling, and implementing retry mechanisms for reliable.
Inputs & outputs
When to use exa-sdk-patterns
- →Refactor existing SDK usage
- →Implement typed API wrappers
- →Establish team coding standards
About this skill
Exa SDK Adapter Patterns
Overview
Isolate exa-js or exa-py behind an application-owned adapter that preserves current request semantics and safe evidence. Treat credentials, queries, retrieved content, generated output, spend, and destructive state as separately governed boundaries.
Prerequisites
- The target repository, environment, Exa team, product surface, and accountable owner.
- The workload's data classification, latency and freshness promise, cost ceiling, and retention policy.
- Current first-party documentation plus credentials only for a narrowly approved live check.
Current Contract
The JavaScript and Python SDKs expose Search, Contents, Answer, Agent, and Monitor surfaces with language-specific naming. The adapter should normalize application inputs and errors without inventing defaults, and it should preserve requestId, statuses, grounding, and costDollars needed for operations.
Authentication
For normal REST work, inject EXA_API_KEY from an approved server-side secret manager and send it only as Authorization: Bearer to the configured first-party Exa API host. Team Management service keys, hosted MCP OAuth or enterprise managed authorization, and payment-protocol calls are separate trust models. Never print, commit, place in a URL, or expose a credential to an untrusted client.
Instructions
- Pin the selected SDK and inspect its current first-party specification.
- Define the smallest application-owned interface for the required product surface.
- Map names and optional fields explicitly at the adapter boundary.
- Return content-free operational metadata separately from retrieved content.
- Normalize documented errors without erasing status, tag, or request ID.
- Add fixture-backed contract tests before changing the pinned SDK.
Tool Discipline
Use Read, Glob, and Grep to inspect repository code, configuration, fixtures, and evidence. Use Write and Edit only for approved implementation or documentation changes. Do not call Exa, run paid research, create or alter a Monitor, Webset, Agent run, Batch, team, member, API key, budget, webhook, or deployment merely because this skill was invoked.
Approval Boundaries
Require an accountable owner before live queries involving sensitive intent, production credentials, spend or rate-limit changes, forced live crawling, generated summaries, external delivery, deployment, member or key changes, schedule creation, or destructive cancellation, stopping, deletion, or revocation. Read-only repository inspection and synthetic offline validation do not authorize live vendor actions.
Failure Modes
- Do not expose the vendor client throughout business logic.
- Do not assume Python snake_case and TypeScript camelCase are interchangeable.
- Do not silently fall back between Search, Answer, Agent, or Contents products.
Output
Return the operation scope, environment, team and product surface, authorization class, contract and policy decisions, deterministic validation results, content-free identifiers, status and cost counts, risks, cleanup or rollback state, and a concise pass or fail receipt. Exclude credentials, raw queries, prompts, presigned URLs, retrieved content, generated output, and customer-derived data unless separately approved.
Example
- A search adapter accepts an owned SearchRequest and returns owned results plus request ID and cost, keeping SDK types at one module boundary.
- Finish with request or resource IDs, assertion counts, cost and terminal state, rollback or deletion status, and the decision owner; never reproduce secrets or retrieved content.
Validation
Rerun the smallest relevant deterministic test, compare actual behavior with the requested outcome and current first-party contract, verify sensitive fields are absent from evidence, and confirm deadlines, terminal state, downstream retention, and rollback before reporting success.
References
Review the dated first-party evidence map before relying on any endpoint, parameter, search type, price, limit, beta, compliance, identity, retry, or lifecycle claim.
When not to use it
- →When `exa-js` is not installed
- →When `EXA_API_KEY` is not configured
Prerequisites
Limitations
- →Only retries on rate limits (429) and server errors (5xx)
- →Requires TypeScript for compile-time checks and type safety
- →Requires `EXA_API_KEY` to be set as an environment variable
How it compares
This skill establishes production-ready coding standards for Exa SDK usage, offering more than basic API integration by including type safety, error handling, and retry logic.
Compared to similar skills
exa-sdk-patterns side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| exa-sdk-patterns (this skill) | 1 | 2mo | Review | Intermediate |
| copilot-sdk | 7 | 5mo | Review | Intermediate |
| create-bubble | 2 | 8mo | Review | Intermediate |
| generating-api-sdks | 1 | 2mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
copilot-sdk
github
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
create-bubble
bubblelabai
Create a new Bubble integration for Bubble Lab following all established patterns and best practices from CREATE_BUBBLE_README.md
generating-api-sdks
jeremylongshore
Generate client SDKs in multiple languages from OpenAPI specifications. Use when generating client libraries for API consumption. Trigger with phrases like "generate SDK", "create client library", or "build API SDK".
openapi-to-typescript
davila7
Converts OpenAPI 3.0 JSON/YAML to TypeScript interfaces and type guards. This skill should be used when the user asks to generate types from OpenAPI, convert schema to TS, create API interfaces, or generate TypeScript types from an API specification.
graphql-schema
ChrisWiles
GraphQL queries, mutations, and code generation patterns. Use when creating GraphQL operations, working with Apollo Client, or generating types.
replit-sdk-patterns
jeremylongshore
Apply production-ready Replit SDK patterns for TypeScript and Python. Use when implementing Replit integrations, refactoring SDK usage, or establishing team coding standards for Replit. Trigger with phrases like "replit SDK patterns", "replit best practices", "replit code patterns", "idiomatic replit".