skills/perplexity-search/SKILL.md
Use when searching with escapeWu/perplexity-ai through its OpenAI-compatible HTTP endpoint. Provides config-driven quick/balanced/expert/deep routing over /v1/chat/completions, matching the current perplexity-ai model IDs.
npx skillsauth add escapewu/skills perplexity-searchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill uses the current escapeWu/perplexity-ai server as an HTTP backend, not the official Perplexity API directly. The backend exposes OpenAI-compatible endpoints:
GET /v1/modelsPOST /v1/chat/completionsPOST /v1/files, GET /v1/files/{file_id}, DELETE /v1/files/{file_id}Default base URL is therefore the local/proxy server with /v1 included:
http://127.0.0.1:8000/v1
Prefer the bundled script instead of hand-writing HTTP requests:
python /Users/shancw/.hermes/skills/research/perplexity-search/scripts/perplexity_search.py \
--query "latest verified OpenAI news today" \
--show-plan
Checked against https://github.com/escapeWu/perplexity-ai at commit 2b55705.
Important current facts:
Authorization: Bearer <MCP_TOKEN>./v1/chat/completions.sources from the backend.sources.MODEL_MAPPINGS in perplexity/config.py via perplexity/server/utils.py.Public repos should commit config.example.json only. For local use, copy it to config.json and set the real token:
cp /Users/shancw/.hermes/skills/research/perplexity-search/config.example.json \
/Users/shancw/.hermes/skills/research/perplexity-search/config.json
Default config shape:
{
"model": "perplexity-search",
"auto_model": "perplexity-search",
"fast_model": "perplexity-search",
"expert_model": "perplexity-thinking",
"deep_model": "perplexity-deepsearch",
"default_mode": "auto",
"language": "zh-CN",
"base_url": "http://127.0.0.1:8000/v1",
"api_key": "REPLACE_ME",
"stream": false,
"timeout_seconds": 240,
"max_sources": 5,
"technical_required_sources": ["Reddit", "Hacker News"],
"extra_body": {}
}
Key fields:
base_url: endpoint base URL including /v1; the script posts to ${base_url}/chat/completions.api_key: backend MCP_TOKEN, sent as bearer auth.fast_model: quick lookup model, default perplexity-search.auto_model / model: balanced search model, default perplexity-search.expert_model: single-pass reasoning model, default perplexity-thinking.deep_model: deep research final model, default perplexity-deepsearch.extra_body: optional JSON fields merged into the request body for compatible proxies.Common IDs exposed by escapeWu/perplexity-ai:
| Model ID | Backend mode | Use |
|---|---|---|
| perplexity-search | pro | default web-backed search |
| sonar | pro | Perplexity sonar option |
| gpt-5-4 | pro | GPT-5.4 search mode |
| claude-4-6-sonnet | pro | Claude search mode |
| gemini-3-1-pro | pro | Gemini search mode |
| perplexity-thinking | reasoning | default reasoning |
| gpt-5-4-thinking | reasoning | GPT thinking mode |
| claude-4-6-sonnet-thinking | reasoning | Claude thinking mode |
| gemini-3-1-pro-thinking | reasoning | Gemini thinking mode |
| kimi-k2-thinking | reasoning | Kimi thinking mode |
| perplexity-deepsearch | deep research | slow comprehensive research |
Do not use older official API IDs like sonar-pro or sonar-deep-research as defaults for this skill; those do not match this backend's current OpenAI-compatible model map.
auto 默认模式The script assesses query complexity and routes automatically:
quickbalanceddeepquickSingle HTTP call with fast_model (perplexity-search). Use for current facts, simple news checks, prices, definitions, or short API lookups.
python /Users/shancw/.hermes/skills/research/perplexity-search/scripts/perplexity_search.py \
--mode quick \
--query "BTC price now" \
--show-plan
balancedSingle HTTP call with auto_model (perplexity-search). Use for normal “查一下 + 给结论” tasks where sources matter but exhaustive investigation is unnecessary.
python /Users/shancw/.hermes/skills/research/perplexity-search/scripts/perplexity_search.py \
--mode balanced \
--query "latest verified summary of Anthropic model releases"
expertSingle HTTP call with expert_model (perplexity-thinking). Use when you want stronger reasoning without a scout/gap-fill chain.
python /Users/shancw/.hermes/skills/research/perplexity-search/scripts/perplexity_search.py \
--mode expert \
--query "compare current OpenAI, Anthropic, and Google frontier model offerings"
deepThree-stage route:
fast_model (perplexity-search) to collect facts and gaps.fast_model only when gaps are detected.deep_model (perplexity-deepsearch).python /Users/shancw/.hermes/skills/research/perplexity-search/scripts/perplexity_search.py \
--mode deep \
--query "build a timeline of the latest SEC crypto ETF decisions and compare issuer status" \
--json
For technical questions involving errors, APIs, libraries, versions, frameworks, deployment, databases, or model benchmarks, the script automatically appends a source requirement: cover Reddit and Hacker News when relevant, in addition to official docs, GitHub, and vendor sources. If one of those communities has no useful result, the answer should say so explicitly.
--query: required user query.--mode: auto | quick | balanced | expert | deep.--model: force a specific OpenAI-compatible model ID and skip automatic routing.--base-url: override endpoint base URL, usually ending in /v1.--api-key: override config token.--max-sources: number of source URLs to retain.--language: preferred answer language, default zh-CN.--timeout: HTTP timeout in seconds.--stream: request SSE streaming. With this backend, streaming is character-by-character after full generation.--json: emit structured JSON.--show-plan: show routing metadata before the answer.--show-reasoning: print model reasoning fields if the endpoint returns them.Text mode prints:
概述:...
搜索结果:
...
来源:
1. https://...
JSON mode includes:
querymodelroutebase_urloverviewsearch_resultssourcesstagesraw_responseconfig.json with MCP_TOKEN. Commit config.example.json; keep config.json local.https://api.perplexity.ai unless you intentionally override the model IDs too. The defaults target escapeWu/perplexity-ai.perplexity-deepsearch; use auto unless the user explicitly needs deep investigation./v1/chat/completions, messages, model, bearer auth.development
Use when working with the news fetcher REST API at <news-fetcher-host> for supported-site lookup, domain article discovery, URL fetching, batch fetch/crawl workflows, fetch history queries, and Bearer-authenticated integration examples.
development
create and refresh repository-specific development standards for an existing local codebase. use when the user wants to analyze a local repository, extract coding conventions from real files, generate docs/ai-dev-standards, create code review checklists, or update existing agents.md or claude.md files so future coding agents load the right standards before development. do not use for generic programming advice detached from a repository.
documentation
analyze postgresql or mysql database schemas from ddl files, schema-only dumps, migration sql, or read-only database metadata. use when the user wants table structure summaries, primary keys, foreign keys, indexes, inferred table relationships, er diagrams, dbml, mermaid erd, schema documentation, or database relationship analysis for postgres/mysql schemas.
tools
Replace with description of the skill and when Claude should use it.