perplexity-safeUse Perplexity API for web-grounded AI search. Use when user needs up-to-date information with source citations, factual queries about current events, or research-style answers. Default when user mentions Perplexity or needs current information with references.
Install via ClawdBot CLI:
clawdbot install haru3613/perplexity-safeThis skill provides access to the Perplexity API for web-grounded AI search. It combines large language models with real-time web search, providing accurate, up-to-date answers with source citations.
This is a security-hardened version that fixes command injection vulnerabilities found in the original perplexity-bash skill.
Use Perplexity when:
Use built-in web search when:
| Model | Use Case | Cost |
|-------|----------|------|
| sonar | Default search, most queries | Low |
| sonar-pro | Advanced search, deeper understanding | Medium |
| sonar-reasoning | Complex multi-step reasoning | Medium |
| sonar-reasoning-pro | Advanced reasoning with deep content | High |
# Simple query (uses sonar by default)
scripts/perplexity_search.sh "What is the capital of Germany?"
# With a different model
scripts/perplexity_search.sh -m sonar-pro "Latest AI developments"
# Markdown format with citations
scripts/perplexity_search.sh -f markdown "Tesla stock analysis"
# High context for comprehensive results
scripts/perplexity_search.sh -m sonar-reasoning -c high -f markdown \
"Compare AI models performance benchmarks"
# With custom system prompt
scripts/perplexity_search.sh -s "You are a technology analyst." \
"Analyze current tech trends"
| Flag | Description | Default |
|------|-------------|---------|
| -m, --model | Model to use | sonar |
| -t, --max-tokens | Maximum tokens (1-4096) | 4096 |
| --temperature | Sampling temperature (0.0-1.0) | 0.0 |
| -c, --context | Search context: low/medium/high | medium |
| -s, --system | System prompt | (none) |
| -f, --format | Output: text/markdown/json | text |
| --list-models | List available models | |
Option 1: Config file (recommended)
Create config.json in the skill directory:
{
"apiKey": "pplx-your-key-here"
}
Option 2: Environment variable
export PERPLEXITY_API_KEY="your-key-here"
Priority: Config file > environment variable.
bash (4.0+)curlpython3 (for JSON construction only - no user input is eval'd)This version addresses the following vulnerabilities found in the original:
curl -K, mode 600) and the request body via stdin (--data @-), so neither the API key nor the body appear in process listings (ps aux)Perplexity API is not free. Be mindful of usage:
sonar for most queries to keep costs low.--list-models to see available modelsAI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).
AI-optimized web search via Tavily API. Returns concise, relevant results for AI agents.
This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.
Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
Search indexed Discord community discussions via Answer Overflow. Find solutions to coding problems, library issues, and community Q&A that only exist in Discord conversations.
Multi search engine integration with 17 engines (8 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and WolframAlpha knowledge queries. No API keys required.