perplexity-4
FreeRuns bundled scriptsNot checkedUse Perplexity API for web-grounded AI search and research. Use when user needs up-to-date information, multi-step reasoning with web citations, exhaustive…
by sundial-org★ 676 GitHub starsAbout this skill
Perplexity AI Search
Overview
This skill provides access to the Perplexity API for web-grounded AI search and research. It combines the power of large language models with real-time web search, providing accurate, up-to-date answers with source citations.
When to Use Perplexity vs. Built-in Search
Use Perplexity when:
- You need current information (news, prices, events, recent developments)
- The user asks for source citations or references
- Complex multi-step reasoning is required
- The user specifically mentions Perplexity or wants research-style answers
- You need exhaustive analysis across multiple sources
Use built-in web search when:
- Simple factual queries
- Quick information lookup
- The user doesn't need AI-generated synthesis
- Basic URL or content retrieval is sufficient
Model Selection Guide
Choose the right model based on task complexity:
🔍 Search Models (Quick Facts)
Use for simple, factual queries where speed matters.
sonar- Default search model with web access. Best for most queries.sonar-pro- Advanced search with deeper understanding.
🧠 Reasoning Models (Complex Analysis)
Use for complex, multi-step tasks requiring logical thinking.
sonar-reasoning- Complex reasoning with web search.sonar-reasoning-pro- Advanced reasoning with deeper content understanding.
📚 Research Models (Exhaustive Analysis)
Use for comprehensive, in-depth research across multiple sources.
sonar-research- Comprehensive research with in-depth analysis.sonar-research-pro- Advanced research with exhaustive analysis and detailed reports.
Quick Start
Basic Search
# Simple query (uses sonar by default)
scripts/perplexity_search.sh "What is the capital of Germany?"
# With custom model
scripts/perplexity_search.sh "Latest AI developments" -m sonar-pro
# Markdown format with citations
scripts/perplexity_search.sh "Tesla stock analysis" -f markdown
Advanced Research
# Deep research with comprehensive analysis
scripts/perplexity_search.sh "Market analysis for electric vehicles in 2025" \
-m sonar-research-pro -c high -f markdown
# Pro search mode (multi-step reasoning)
scripts/perplexity_search.sh "Compare AI models performance benchmarks" \
-m sonar-reasoning-pro -p pro -f markdown
# With custom system prompt
scripts/perplexity_search.sh "Analyze tech trends" \
-s "You are a technology analyst. Focus on business implications and market trends."
Search Context Size
Control how much web information is retrieved:
- low - Faster, fewer sources. Good for simple queries.
- medium (default) - Balanced. Good for most use cases.
- high - Most comprehensive. Best for research and detailed analysis.
Pro Search Mode
Available for sonar-pro and reasoning models. Controls multi-step tool usage:
- fast (default) - Standard single-step search.
- pro - Automated multi-step reasoning with multiple web searches.
- auto - Automatic classification based on query complexity.
Setup Requirements
API Key Configuration
The skill requires Perplexity API key via environment variable:
export PERPLEXITY_API_KEY="your-key-here"
To set it permanently (add to ~/.bashrc or ~/.zshrc):
echo 'export PERPLEXITY_API_KEY="your-key-here"' >> ~/.bashrc
source ~/.bashrc
Note: Do not store API key in Clawdbot config. The skill only reads from environment variable to avoid config conflicts.
Dependencies
The script uses bash and curl. Both are typically pre-installed on Linux systems.
Usage Patterns
News and Current Events
scripts/perplexity_search.sh "Latest news about AI regulation in Europe" -m sonar
Competitive Analysis
scripts/perplexity_search.sh "Compare iPhone 15 vs Samsung Galaxy S24 features" \
-m sonar-reasoning-pro -c high -f markdown
Market Research
scripts/perplexity_search.sh "Electric vehicle market forecast 2025-2030" \
-m sonar-research-pro -c high -p pro -f markdown
Technical Questions with Current Data
scripts/perplexity_search.sh "Latest Python frameworks for web development 2025" \
-m sonar-reasoning -c medium
Output Formats
- text (default) - Plain text with citation references [1], [2], etc.
- markdown - Markdown formatted response with source links
- json - Raw API response in JSON format
Cost Awareness
Perplexity API is not free. Be mindful of usage costs:
- Simple queries: ~$0.005–$0.015 per query
- Deep research: ~$0.015–$0.03+ per query
- Pro users get $5/month credits in Perplexity Pro subscription
Use reasoning/research models judiciously. Default to sonar for most queries.
List Available Models
scripts/perplexity_search.sh --list-models
Troubleshooting
Error: PERPLEXITY_API_KEY environment variable not set
- Set up API key as described in "Setup Requirements" above
**Er
Install perplexity-4 in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the perplexity-4 skill do?
Use Perplexity API for web-grounded AI search and research. Use when user needs up-to-date information, multi-step reasoning with web citations, exhaustive research with source references, factual queries with current events, or competitive analysis. Default when user mentions Perplexity, needs current information, or requires source citations.
How do I install the perplexity-4 skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the perplexity-4 skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic