jpskill.com
🛠️ 開発・MCP コミュニティ

perplexity-search

Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model's knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o perplexity-search.zip https://jpskill.com/download/18482.zip && unzip -o perplexity-search.zip && rm perplexity-search.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18482.zip -OutFile "$d\perplexity-search.zip"; Expand-Archive "$d\perplexity-search.zip" -DestinationPath $d -Force; ri "$d\perplexity-search.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して perplexity-search.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → perplexity-search フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
6

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Perplexity Search

概要

LiteLLMとOpenRouterを通じて、Perplexityモデルを使用したAI搭載のウェブ検索を実行します。Perplexityは、ソースの引用を伴うリアルタイムのウェブに基づいた回答を提供するため、最新の情報、最近の科学文献、およびモデルのトレーニングデータカットオフを超える事実を見つけるのに最適です。

このスキルは、OpenRouterを通じてすべてのPerplexityモデルへのアクセスを提供し、単一のAPIキーのみを必要とします(個別のPerplexityアカウントは不要です)。

このスキルを使用するタイミング

このスキルは、以下の場合に使用してください。

  • 最新の情報や最近の動向(2024年以降)を検索する場合
  • 最新の科学出版物や研究を見つける場合
  • ウェブソースに基づいたリアルタイムの回答を得る場合
  • ソースの引用で事実を検証する場合
  • 複数のドメインにわたる文献検索を行う場合
  • モデルの知識カットオフを超える情報にアクセスする場合
  • ドメイン固有の研究(生物医学、技術、臨床)を行う場合
  • 現在のアプローチや技術を比較する場合

以下の場合には使用しないでください:

  • 単純な計算や論理的な問題(直接使用してください)
  • コードの実行を必要とするタスク(標準ツールを使用してください)
  • モデルのトレーニングデータに十分に含まれている質問(検証が必要な場合を除く)

クイックスタート

セットアップ(初回のみ)

  1. OpenRouter APIキーを取得:

    • https://openrouter.ai/keys にアクセス
    • アカウントを作成し、APIキーを生成
    • アカウントにクレジットを追加(最低$5を推奨)
  2. 環境を構成:

    # APIキーを設定
    export OPENROUTER_API_KEY='sk-or-v1-your-key-here'
    
    # またはセットアップスクリプトを使用
    python scripts/setup_env.py --api-key sk-or-v1-your-key-here
  3. 依存関係をインストール:

    uv pip install litellm
  4. セットアップを検証:

    python scripts/perplexity_search.py --check-setup

詳細なセットアップ手順、トラブルシューティング、およびセキュリティのベストプラクティスについては、references/openrouter_setup.md を参照してください。

基本的な使用法

簡単な検索:

python scripts/perplexity_search.py "クリスパー遺伝子編集の最新の動向は何ですか?"

結果を保存:

python scripts/perplexity_search.py "最近のCAR-T療法臨床試験" --output results.json

特定のモデルを使用:

python scripts/perplexity_search.py "mRNAワクチンとウイルスベクターワクチンを比較する" --model sonar-pro-search

詳細な出力:

python scripts/perplexity_search.py "創薬のための量子コンピューティング" --verbose

利用可能なモデル

--model パラメータを使用してモデルにアクセスします。

  • sonar-pro (デフォルト): 一般的な検索、コストと品質の最適なバランス
  • sonar-pro-search: マルチステップ推論を備えた最先端のエージェント検索
  • sonar: 基本モデル、単純なクエリに対して最も費用対効果が高い
  • sonar-reasoning-pro: ステップバイステップ分析による高度な推論
  • sonar-reasoning: 基本的な推論機能

モデル選択ガイド:

  • デフォルトのクエリ → sonar-pro
  • 複雑なマルチステップ分析 → sonar-pro-search
  • 明示的な推論が必要 → sonar-reasoning-pro
  • 単純な事実の検索 → sonar
  • コストに敏感なバルククエリ → sonar

詳細な比較、ユースケース、価格設定、およびパフォーマンス特性については、references/model_comparison.md を参照してください。

効果的なクエリの作成

具体的かつ詳細に

良い例:

  • 「2024年に発表されたB細胞リンパ腫の治療におけるCAR-T細胞療法の最新の臨床試験結果は何ですか?」
  • 「COVID-19に対するmRNAワクチンとウイルスベクターワクチンの有効性と安全性のプロファイルを比較してください」
  • 「2023年から2024年の研究からの特定の精度指標を用いて、AlphaFold3がAlphaFold2よりも改善された点を説明してください」

悪い例:

  • 「癌治療について教えてください」(広すぎる)
  • 「CRISPR」(曖昧すぎる)
  • 「ワクチン」(具体性に欠ける)

時間制約を含める

Perplexityはリアルタイムのウェブデータを検索します。

  • 「Nature Medicineに2024年に発表された、長引くCOVIDに関する論文は何ですか?」
  • 「大規模言語モデルの効率における最新の動向(過去6か月)は何ですか?」
  • 「NeurIPS 2023で発表されたAIの安全性に関する発表は何でしたか?」

ドメインとソースを指定

高品質の結果を得るには、ソースの優先順位を記述します。

  • 「影響力の大きいジャーナルの査読付き出版物によると...」
  • 「FDA承認の治療法に基づくと...」
  • 「clinicaltrials.govのような臨床試験登録簿から...」

複雑なクエリを構造化

複雑な質問を明確なコンポーネントに分割します。

  1. トピック: 主要な主題
  2. スコープ: 関心のある特定の側面
  3. コンテキスト: 時間枠、ドメイン、制約
  4. 出力: 目的の形式または回答の種類

例: 「AlphaFold3は、2023年から2024年の間に発表された研究によると、タンパク質構造予測においてAlphaFold2よりもどのような改善を提供しますか?特定の精度指標とベンチマークを含めてください。」

クエリ設計、ドメイン固有のパターン、および高度なテクニックに関する包括的なガイダンスについては、references/search_strategies.md を参照してください。

一般的なユースケース

科学文献検索

python scripts/perplexity_search.py \
  "最近の研究(2023-2024)では、パーキンソン病における腸内細菌叢の役割についてどのように述べていますか?査読付きの研究に焦点を当て、特定された特定の細菌種を含めてください。" \
  --model sonar-pro

技術ドキュメント

python scripts/perplexity_search.py \
  "Pythonを使用してKafkaからPostgreSQLへのリアルタイムデータストリーミングを実装する方法は?バックプレッシャーの処理と、正確に1回のセマンティクスを保証するための考慮事項を含めてください。" \
  --model sonar-reasoning-pro

比較分析

python scripts/perplexity_search.py \
  "使いやすさ、パフォーマンス、およびエコシステムのサポートの点で、トランスフォーマーモデルを実装するためのPyTorchとTensorFlowを比較してください。最近の研究からのベンチマークを含めてください。" \
  --model sonar-pro-search

臨床研究


python scripts/perplexity_search.py \
  "成人における2型糖尿病の管理における断続的断食の証拠は何ですか?ランダム化比較試験に焦点を当て、HbA1cの変化と体重減少の結果を報告してください。" \
  --model sonar-
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Perplexity Search

Overview

Perform AI-powered web searches using Perplexity models through LiteLLM and OpenRouter. Perplexity provides real-time, web-grounded answers with source citations, making it ideal for finding current information, recent scientific literature, and facts beyond the model's training data cutoff.

This skill provides access to all Perplexity models through OpenRouter, requiring only a single API key (no separate Perplexity account needed).

When to Use This Skill

Use this skill when:

  • Searching for current information or recent developments (2024 and beyond)
  • Finding latest scientific publications and research
  • Getting real-time answers grounded in web sources
  • Verifying facts with source citations
  • Conducting literature searches across multiple domains
  • Accessing information beyond the model's knowledge cutoff
  • Performing domain-specific research (biomedical, technical, clinical)
  • Comparing current approaches or technologies

Do not use for:

  • Simple calculations or logic problems (use directly)
  • Tasks requiring code execution (use standard tools)
  • Questions well within the model's training data (unless verification needed)

Quick Start

Setup (One-time)

  1. Get OpenRouter API key:

  2. Configure environment:

    # Set API key
    export OPENROUTER_API_KEY='sk-or-v1-your-key-here'
    
    # Or use setup script
    python scripts/setup_env.py --api-key sk-or-v1-your-key-here
  3. Install dependencies:

    uv pip install litellm
  4. Verify setup:

    python scripts/perplexity_search.py --check-setup

See references/openrouter_setup.md for detailed setup instructions, troubleshooting, and security best practices.

Basic Usage

Simple search:

python scripts/perplexity_search.py "What are the latest developments in CRISPR gene editing?"

Save results:

python scripts/perplexity_search.py "Recent CAR-T therapy clinical trials" --output results.json

Use specific model:

python scripts/perplexity_search.py "Compare mRNA and viral vector vaccines" --model sonar-pro-search

Verbose output:

python scripts/perplexity_search.py "Quantum computing for drug discovery" --verbose

Available Models

Access models via --model parameter:

  • sonar-pro (default): General-purpose search, best balance of cost and quality
  • sonar-pro-search: Most advanced agentic search with multi-step reasoning
  • sonar: Basic model, most cost-effective for simple queries
  • sonar-reasoning-pro: Advanced reasoning with step-by-step analysis
  • sonar-reasoning: Basic reasoning capabilities

Model selection guide:

  • Default queries → sonar-pro
  • Complex multi-step analysis → sonar-pro-search
  • Explicit reasoning needed → sonar-reasoning-pro
  • Simple fact lookups → sonar
  • Cost-sensitive bulk queries → sonar

See references/model_comparison.md for detailed comparison, use cases, pricing, and performance characteristics.

Crafting Effective Queries

Be Specific and Detailed

Good examples:

  • "What are the latest clinical trial results for CAR-T cell therapy in treating B-cell lymphoma published in 2024?"
  • "Compare the efficacy and safety profiles of mRNA vaccines versus viral vector vaccines for COVID-19"
  • "Explain AlphaFold3 improvements over AlphaFold2 with specific accuracy metrics from 2023-2024 research"

Bad examples:

  • "Tell me about cancer treatment" (too broad)
  • "CRISPR" (too vague)
  • "vaccines" (lacks specificity)

Include Time Constraints

Perplexity searches real-time web data:

  • "What papers were published in Nature Medicine in 2024 about long COVID?"
  • "What are the latest developments (past 6 months) in large language model efficiency?"
  • "What was announced at NeurIPS 2023 regarding AI safety?"

Specify Domain and Sources

For high-quality results, mention source preferences:

  • "According to peer-reviewed publications in high-impact journals..."
  • "Based on FDA-approved treatments..."
  • "From clinical trial registries like clinicaltrials.gov..."

Structure Complex Queries

Break complex questions into clear components:

  1. Topic: Main subject
  2. Scope: Specific aspect of interest
  3. Context: Time frame, domain, constraints
  4. Output: Desired format or type of answer

Example: "What improvements does AlphaFold3 offer over AlphaFold2 for protein structure prediction, according to research published between 2023 and 2024? Include specific accuracy metrics and benchmarks."

See references/search_strategies.md for comprehensive guidance on query design, domain-specific patterns, and advanced techniques.

Common Use Cases

Scientific Literature Search

python scripts/perplexity_search.py \
  "What does recent research (2023-2024) say about the role of gut microbiome in Parkinson's disease? Focus on peer-reviewed studies and include specific bacterial species identified." \
  --model sonar-pro

Technical Documentation

python scripts/perplexity_search.py \
  "How to implement real-time data streaming from Kafka to PostgreSQL using Python? Include considerations for handling backpressure and ensuring exactly-once semantics." \
  --model sonar-reasoning-pro

Comparative Analysis

python scripts/perplexity_search.py \
  "Compare PyTorch versus TensorFlow for implementing transformer models in terms of ease of use, performance, and ecosystem support. Include benchmarks from recent studies." \
  --model sonar-pro-search

Clinical Research

python scripts/perplexity_search.py \
  "What is the evidence for intermittent fasting in managing type 2 diabetes in adults? Focus on randomized controlled trials and report HbA1c changes and weight loss outcomes." \
  --model sonar-pro

Trend Analysis

python scripts/perplexity_search.py \
  "What are the key trends in single-cell RNA sequencing technology over the past 5 years? Highlight improvements in throughput, cost, and resolution, with specific examples." \
  --model sonar-pro

Working with Results

Programmatic Access

Use perplexity_search.py as a module:

from scripts.perplexity_search import search_with_perplexity

result = search_with_perplexity(
    query="What are the latest CRISPR developments?",
    model="openrouter/perplexity/sonar-pro",
    max_tokens=4000,
    temperature=0.2,
    verbose=False
)

if result["success"]:
    print(result["answer"])
    print(f"Tokens used: {result['usage']['total_tokens']}")
else:
    print(f"Error: {result['error']}")

Save and Process Results

# Save to JSON
python scripts/perplexity_search.py "query" --output results.json

# Process with jq
cat results.json | jq '.answer'
cat results.json | jq '.usage'

Batch Processing

Create a script for multiple queries:

#!/bin/bash
queries=(
  "CRISPR developments 2024"
  "mRNA vaccine technology advances"
  "AlphaFold3 accuracy improvements"
)

for query in "${queries[@]}"; do
  echo "Searching: $query"
  python scripts/perplexity_search.py "$query" --output "results_$(echo $query | tr ' ' '_').json"
  sleep 2  # Rate limiting
done

Cost Management

Perplexity models have different pricing tiers:

Approximate costs per query:

  • Sonar: $0.001-0.002 (most cost-effective)
  • Sonar Pro: $0.002-0.005 (recommended default)
  • Sonar Reasoning Pro: $0.005-0.010
  • Sonar Pro Search: $0.020-0.050+ (most comprehensive)

Cost optimization strategies:

  1. Use sonar for simple fact lookups
  2. Default to sonar-pro for most queries
  3. Reserve sonar-pro-search for complex analysis
  4. Set --max-tokens to limit response length
  5. Monitor usage at https://openrouter.ai/activity
  6. Set spending limits in OpenRouter dashboard

Troubleshooting

API Key Not Set

Error: "OpenRouter API key not configured"

Solution:

export OPENROUTER_API_KEY='sk-or-v1-your-key-here'
# Or run setup script
python scripts/setup_env.py --api-key sk-or-v1-your-key-here

LiteLLM Not Installed

Error: "LiteLLM not installed"

Solution:

uv pip install litellm

Rate Limiting

Error: "Rate limit exceeded"

Solutions:

  • Wait a few seconds before retrying
  • Increase rate limit at https://openrouter.ai/keys
  • Add delays between requests in batch processing

Insufficient Credits

Error: "Insufficient credits"

Solution:

See references/openrouter_setup.md for comprehensive troubleshooting guide.

Integration with Other Skills

This skill complements other scientific skills:

Literature Review

Use with literature-review skill:

  1. Use Perplexity to find recent papers and preprints
  2. Supplement PubMed searches with real-time web results
  3. Verify citations and find related work
  4. Discover latest developments post-database indexing

Scientific Writing

Use with scientific-writing skill:

  1. Find recent references for introduction/discussion
  2. Verify current state of the art
  3. Check latest terminology and conventions
  4. Identify recent competing approaches

Hypothesis Generation

Use with hypothesis-generation skill:

  1. Search for latest research findings
  2. Identify current gaps in knowledge
  3. Find recent methodological advances
  4. Discover emerging research directions

Critical Thinking

Use with scientific-critical-thinking skill:

  1. Find evidence for and against hypotheses
  2. Locate methodological critiques
  3. Identify controversies in the field
  4. Verify claims with current evidence

Best Practices

Query Design

  1. Be specific: Include domain, time frame, and constraints
  2. Use terminology: Domain-appropriate keywords and phrases
  3. Specify sources: Mention preferred publication types or journals
  4. Structure questions: Clear components with explicit context
  5. Iterate: Refine based on initial results

Model Selection

  1. Start with sonar-pro: Good default for most queries
  2. Upgrade for complexity: Use sonar-pro-search for multi-step analysis
  3. Downgrade for simplicity: Use sonar for basic facts
  4. Use reasoning models: When step-by-step analysis needed

Cost Optimization

  1. Choose appropriate models: Match model to query complexity
  2. Set token limits: Use --max-tokens to control costs
  3. Monitor usage: Check OpenRouter dashboard regularly
  4. Batch efficiently: Combine related simple queries when possible
  5. Cache results: Save and reuse results for repeated queries

Security

  1. Protect API keys: Never commit to version control
  2. Use environment variables: Keep keys separate from code
  3. Set spending limits: Configure in OpenRouter dashboard
  4. Monitor usage: Watch for unexpected activity
  5. Rotate keys: Change keys periodically

Resources

Bundled Resources

Scripts:

  • scripts/perplexity_search.py: Main search script with CLI interface
  • scripts/setup_env.py: Environment setup and validation helper

References:

  • references/search_strategies.md: Comprehensive query design guide
  • references/model_comparison.md: Detailed model comparison and selection guide
  • references/openrouter_setup.md: Complete setup, troubleshooting, and security guide

Assets:

  • assets/.env.example: Example environment file template

External Resources

OpenRouter:

LiteLLM:

Perplexity:

Dependencies

Required

# LiteLLM for API access
uv pip install litellm

Optional

# For .env file support
uv pip install python-dotenv

# For JSON processing (usually pre-installed)
uv pip install jq

Environment Variables

Required:

  • OPENROUTER_API_KEY: Your OpenRouter API key

Optional:

  • DEFAULT_MODEL: Default model to use (default: sonar-pro)
  • DEFAULT_MAX_TOKENS: Default max tokens (default: 4000)
  • DEFAULT_TEMPERATURE: Default temperature (default: 0.2)

Summary

This skill provides:

  1. Real-time web search: Access current information beyond training data cutoff
  2. Multiple models: From cost-effective Sonar to advanced Sonar Pro Search
  3. Simple setup: Single OpenRouter API key, no separate Perplexity account
  4. Comprehensive guidance: Detailed references for query design and model selection
  5. Cost-effective: Pay-as-you-go pricing with usage monitoring
  6. Scientific focus: Optimized for research, literature search, and technical queries
  7. Easy integration: Works seamlessly with other scientific skills

Conduct AI-powered web searches to find current information, recent research, and grounded answers with source citations.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。