perplexity-sdk-patterns
Use idiomatic patterns for the Perplexity SDK, including citation handling and OpenAI-compatible client wrappers.
Install
mkdir -p .claude/skills/perplexity-sdk-patterns && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9215" && unzip -o skill.zip -d .claude/skills/perplexity-sdk-patterns && rm skill.zipInstalls to .claude/skills/perplexity-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 Perplexity Sonar API patterns for TypeScriptKey capabilities
- →Create a typed client for the Perplexity Sonar API
- →Parse full responses including citations, search results, and related questions
- →Implement retry logic with exponential backoff for API calls
- →Format citations as Markdown or footnotes
- →Reuse client instances efficiently using caching
- →Configure search queries with recency and domain filters
How it works
This skill provides patterns for wrapping the OpenAI client to interact with the Perplexity Sonar API, handling Perplexity-specific response elements like citations and search results, and implementing retry logic.
Inputs & outputs
When to use perplexity-sdk-patterns
- →Wrap OpenAI clients for Perplexity
- →Handle citations in search responses
- →Structure search-augmented generation logic
- →Implement standardized chat completion calls
About perplexity-sdk-patterns
Applies production-ready code patterns for Perplexity's Sonar API. Standardizes response handling for citations, search results, and related queries in TypeScript and Python.
Apply production-ready Perplexity SDK patterns for TypeScript and Python. Use when implementing Perplexity integrations, refactoring SDK usage, or establishing team coding standards for Perplexity. Trigger with phrases like "perplexity SDK patterns", "perplexity best practices", "perplexity code patterns", "idiomatic perplexity".
When not to use it
- →When not interacting with the Perplexity Sonar API
- →When not requiring parsing of citations or search results from Perplexity
- →When not needing retry logic for Perplexity API calls
Prerequisites
Limitations
- →The patterns are specific to the Perplexity Sonar API
- →Search domain filter has a maximum of 20 domains
- →Retry logic is applied only for rate limit, timeout, or server errors
How it compares
This skill extends the generic OpenAI client usage to specifically handle Perplexity's unique features like citations and search results, providing structured access to these elements.
Compared to similar skills
perplexity-sdk-patterns side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| perplexity-sdk-patterns (this skill) | 0 | 2mo | Review | Intermediate |
| similarity-search-patterns | 3 | 4mo | No flags | Advanced |
| ai-engineer | 7 | 5mo | No flags | Advanced |
| llm-application-dev | 3 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
similarity-search-patterns
wshobson
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.
ai-engineer
sickn33
Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.
llm-application-dev
skillcreatorai
Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.
genkit-production-expert
jeremylongshore
Build production Firebase Genkit applications including RAG systems, multi-step flows, and tool calling for Node.js/Python/Go. Deploy to Firebase Functions or Cloud Run with AI monitoring. Use when asked to "create genkit flow" or "implement RAG". Trigger with relevant phrases based on skill purpose.
langgraph-chat-google-genai
akhilgupta01
Using ChatGoogleGenerativeAI, a chat model wrapper from langchain for Google Gemini series, for various applications including file processing.
langchain-architecture
Kuingsmile
Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.