[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AFJ2PXVHW4JFZ4AG2JT2JX":3,"skill-same:01M6AFJ2PXVHW4JFZ4AG2JT2JX":109},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6AFJ2PXVHW4JFZ4AG2JT2JX","perplexity-search",null,"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.","davila7\u002Fclaude-code-templates","davila7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6216945?v=4","01M6ADEWWFPS191NFM0Y1EX1JH","Daniel Avila","01M6ADJHGM78PHQRD3XZTFDVKK",33481,"MIT","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"search","perplexity","perplexity search","model","when","source","for","sonar","advanced","information","scientific","literature","time","models","openrouter","agentic","access","knowledge","api","real-time","Citations","reasoning","web","2026-11-10 10:12:30",false,"---\nname: perplexity-search\ndescription: 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.\n---\n\n# Perplexity Search\n\n## Overview\n\nPerform 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.\n\nThis skill provides access to all Perplexity models through OpenRouter, requiring only a single API key (no separate Perplexity account needed).\n\n## When to Use This Skill\n\nUse this skill when:\n- Searching for current information or recent developments (2024 and beyond)\n- Finding latest scientific publications and research\n- Getting real-time answers grounded in web sources\n- Verifying facts with source citations\n- Conducting literature searches across multiple domains\n- Accessing information beyond the model's knowledge cutoff\n- Performing domain-specific research (biomedical, technical, clinical)\n- Comparing current approaches or technologies\n\n**Do not use** for:\n- Simple calculations or logic problems (use directly)\n- Tasks requiring code execution (use standard tools)\n- Questions well within the model's training data (unless verification needed)\n\n## Quick Start\n\n### Setup (One-time)\n\n1. **Get OpenRouter API key**:\n   - Visit https:\u002F\u002Fopenrouter.ai\u002Fkeys\n   - Create account and generate API key\n   - Add credits to account (minimum $5 recommended)\n\n2. **Configure environment**:\n   ```bash\n   # Set API key\n   export OPENROUTER_API_KEY='sk-or-v1-your-key-here'\n\n   # Or use setup script\n   python scripts\u002Fsetup_env.py --api-key sk-or-v1-your-key-here\n   ```\n\n3. **Install dependencies**:\n   ```bash\n   uv pip install litellm\n   ```\n\n4. **Verify setup**:\n   ```bash\n   python scripts\u002Fperplexity_search.py --check-setup\n   ```\n\nSee `references\u002Fopenrouter_setup.md` for detailed setup instructions, troubleshooting, and security best practices.\n\n### Basic Usage\n\n**Simple search:**\n```bash\npython scripts\u002Fperplexity_search.py \"What are the latest developments in CRISPR gene editing?\"\n```\n\n**Save results:**\n```bash\npython scripts\u002Fperplexity_search.py \"Recent CAR-T therapy clinical trials\" --output results.json\n```\n\n**Use specific model:**\n```bash\npython scripts\u002Fperplexity_search.py \"Compare mRNA and viral vector vaccines\" --model sonar-pro-search\n```\n\n**Verbose output:**\n```bash\npython scripts\u002Fperplexity_search.py \"Quantum computing for drug discovery\" --verbose\n```\n\n## Available Models\n\nAccess models via `--model` parameter:\n\n- **sonar-pro** (default): General-purpose search, best balance of cost and quality\n- **sonar-pro-search**: Most advanced agentic search with multi-step reasoning\n- **sonar**: Basic model, most cost-effective for simple queries\n- **sonar-reasoning-pro**: Advanced reasoning with step-by-step analysis\n- **sonar-reasoning**: Basic reasoning capabilities\n\n**Model selection guide:**\n- Default queries → `sonar-pro`\n- Complex multi-step analysis → `sonar-pro-search`\n- Explicit reasoning needed → `sonar-reasoning-pro`\n- Simple fact lookups → `sonar`\n- Cost-sensitive bulk queries → `sonar`\n\nSee `references\u002Fmodel_comparison.md` for detailed comparison, use cases, pricing, and performance characteristics.\n\n## Crafting Effective Queries\n\n### Be Specific and Detailed\n\n**Good examples:**\n- \"What are the latest clinical trial results for CAR-T cell therapy in treating B-cell lymphoma published in 2024?\"\n- \"Compare the efficacy and safety profiles of mRNA vaccines versus viral vector vaccines for COVID-19\"\n- \"Explain AlphaFold3 improvements over AlphaFold2 with specific accuracy metrics from 2023-2024 research\"\n\n**Bad examples:**\n- \"Tell me about cancer treatment\" (too broad)\n- \"CRISPR\" (too vague)\n- \"vaccines\" (lacks specificity)\n\n### Include Time Constraints\n\nPerplexity searches real-time web data:\n- \"What papers were published in Nature Medicine in 2024 about long COVID?\"\n- \"What are the latest developments (past 6 months) in large language model efficiency?\"\n- \"What was announced at NeurIPS 2023 regarding AI safety?\"\n\n### Specify Domain and Sources\n\nFor high-quality results, mention source preferences:\n- \"According to peer-reviewed publications in high-impact journals...\"\n- \"Based on FDA-approved treatments...\"\n- \"From clinical trial registries like clinicaltrials.gov...\"\n\n### Structure Complex Queries\n\nBreak complex questions into clear components:\n1. **Topic**: Main subject\n2. **Scope**: Specific aspect of interest\n3. **Context**: Time frame, domain, constraints\n4. **Output**: Desired format or type of answer\n\n**Example:**\n\"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.\"\n\nSee `references\u002Fsearch_strategies.md` for comprehensive guidance on query design, domain-specific patterns, and advanced techniques.\n\n## Common Use Cases\n\n### Scientific Literature Search\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"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.\" \\\n  --model sonar-pro\n```\n\n### Technical Documentation\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"How to implement real-time data streaming from Kafka to PostgreSQL using Python? Include considerations for handling backpressure and ensuring exactly-once semantics.\" \\\n  --model sonar-reasoning-pro\n```\n\n### Comparative Analysis\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"Compare PyTorch versus TensorFlow for implementing transformer models in terms of ease of use, performance, and ecosystem support. Include benchmarks from recent studies.\" \\\n  --model sonar-pro-search\n```\n\n### Clinical Research\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"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.\" \\\n  --model sonar-pro\n```\n\n### Trend Analysis\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"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.\" \\\n  --model sonar-pro\n```\n\n## Working with Results\n\n### Programmatic Access\n\nUse `perplexity_search.py` as a module:\n\n```python\nfrom scripts.perplexity_search import search_with_perplexity\n\nresult = search_with_perplexity(\n    query=\"What are the latest CRISPR developments?\",\n    model=\"openrouter\u002Fperplexity\u002Fsonar-pro\",\n    max_tokens=4000,\n    temperature=0.2,\n    verbose=False\n)\n\nif result[\"success\"]:\n    print(result[\"answer\"])\n    print(f\"Tokens used: {result['usage']['total_tokens']}\")\nelse:\n    print(f\"Error: {result['error']}\")\n```\n\n### Save and Process Results\n\n```bash\n# Save to JSON\npython scripts\u002Fperplexity_search.py \"query\" --output results.json\n\n# Process with jq\ncat results.json | jq '.answer'\ncat results.json | jq '.usage'\n```\n\n### Batch Processing\n\nCreate a script for multiple queries:\n\n```bash\n#!\u002Fbin\u002Fbash\nqueries=(\n  \"CRISPR developments 2024\"\n  \"mRNA vaccine technology advances\"\n  \"AlphaFold3 accuracy improvements\"\n)\n\nfor query in \"${queries[@]}\"; do\n  echo \"Searching: $query\"\n  python scripts\u002Fperplexity_search.py \"$query\" --output \"results_$(echo $query | tr ' ' '_').json\"\n  sleep 2  # Rate limiting\ndone\n```\n\n## Cost Management\n\nPerplexity models have different pricing tiers:\n\n**Approximate costs per query:**\n- Sonar: $0.001-0.002 (most cost-effective)\n- Sonar Pro: $0.002-0.005 (recommended default)\n- Sonar Reasoning Pro: $0.005-0.010\n- Sonar Pro Search: $0.020-0.050+ (most comprehensive)\n\n**Cost optimization strategies:**\n1. Use `sonar` for simple fact lookups\n2. Default to `sonar-pro` for most queries\n3. Reserve `sonar-pro-search` for complex analysis\n4. Set `--max-tokens` to limit response length\n5. Monitor usage at https:\u002F\u002Fopenrouter.ai\u002Factivity\n6. Set spending limits in OpenRouter dashboard\n\n## Troubleshooting\n\n### API Key Not Set\n\n**Error**: \"OpenRouter API key not configured\"\n\n**Solution**:\n```bash\nexport OPENROUTER_API_KEY='sk-or-v1-your-key-here'\n# Or run setup script\npython scripts\u002Fsetup_env.py --api-key sk-or-v1-your-key-here\n```\n\n### LiteLLM Not Installed\n\n**Error**: \"LiteLLM not installed\"\n\n**Solution**:\n```bash\nuv pip install litellm\n```\n\n### Rate Limiting\n\n**Error**: \"Rate limit exceeded\"\n\n**Solutions**:\n- Wait a few seconds before retrying\n- Increase rate limit at https:\u002F\u002Fopenrouter.ai\u002Fkeys\n- Add delays between requests in batch processing\n\n### Insufficient Credits\n\n**Error**: \"Insufficient credits\"\n\n**Solution**:\n- Add credits at https:\u002F\u002Fopenrouter.ai\u002Faccount\n- Enable auto-recharge to prevent interruptions\n\nSee `references\u002Fopenrouter_setup.md` for comprehensive troubleshooting guide.\n\n## Integration with Other Skills\n\nThis skill complements other scientific skills:\n\n### Literature Review\n\nUse with `literature-review` skill:\n1. Use Perplexity to find recent papers and preprints\n2. Supplement PubMed searches with real-time web results\n3. Verify citations and find related work\n4. Discover latest developments post-database indexing\n\n### Scientific Writing\n\nUse with `scientific-writing` skill:\n1. Find recent references for introduction\u002Fdiscussion\n2. Verify current state of the art\n3. Check latest terminology and conventions\n4. Identify recent competing approaches\n\n### Hypothesis Generation\n\nUse with `hypothesis-generation` skill:\n1. Search for latest research findings\n2. Identify current gaps in knowledge\n3. Find recent methodological advances\n4. Discover emerging research directions\n\n### Critical Thinking\n\nUse with `scientific-critical-thinking` skill:\n1. Find evidence for and against hypotheses\n2. Locate methodological critiques\n3. Identify controversies in the field\n4. Verify claims with current evidence\n\n## Best Practices\n\n### Query Design\n\n1. **Be specific**: Include domain, time frame, and constraints\n2. **Use terminology**: Domain-appropriate keywords and phrases\n3. **Specify sources**: Mention preferred publication types or journals\n4. **Structure questions**: Clear components with explicit context\n5. **Iterate**: Refine based on initial results\n\n### Model Selection\n\n1. **Start with sonar-pro**: Good default for most queries\n2. **Upgrade for complexity**: Use sonar-pro-search for multi-step analysis\n3. **Downgrade for simplicity**: Use sonar for basic facts\n4. **Use reasoning models**: When step-by-step analysis needed\n\n### Cost Optimization\n\n1. **Choose appropriate models**: Match model to query complexity\n2. **Set token limits**: Use `--max-tokens` to control costs\n3. **Monitor usage**: Check OpenRouter dashboard regularly\n4. **Batch efficiently**: Combine related simple queries when possible\n5. **Cache results**: Save and reuse results for repeated queries\n\n### Security\n\n1. **Protect API keys**: Never commit to version control\n2. **Use environment variables**: Keep keys separate from code\n3. **Set spending limits**: Configure in OpenRouter dashboard\n4. **Monitor usage**: Watch for unexpected activity\n5. **Rotate keys**: Change keys periodically\n\n## Resources\n\n### Bundled Resources\n\n**Scripts:**\n- `scripts\u002Fperplexity_search.py`: Main search script with CLI interface\n- `scripts\u002Fsetup_env.py`: Environment setup and validation helper\n\n**References:**\n- `references\u002Fsearch_strategies.md`: Comprehensive query design guide\n- `references\u002Fmodel_comparison.md`: Detailed model comparison and selection guide\n- `references\u002Fopenrouter_setup.md`: Complete setup, troubleshooting, and security guide\n\n**Assets:**\n- `assets\u002F.env.example`: Example environment file template\n\n### External Resources\n\n**OpenRouter:**\n- Dashboard: https:\u002F\u002Fopenrouter.ai\u002Faccount\n- API Keys: https:\u002F\u002Fopenrouter.ai\u002Fkeys\n- Perplexity Models: https:\u002F\u002Fopenrouter.ai\u002Fperplexity\n- Usage Monitoring: https:\u002F\u002Fopenrouter.ai\u002Factivity\n- Documentation: https:\u002F\u002Fopenrouter.ai\u002Fdocs\n\n**LiteLLM:**\n- Documentation: https:\u002F\u002Fdocs.litellm.ai\u002F\n- OpenRouter Provider: https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fproviders\u002Fopenrouter\n- GitHub: https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm\n\n**Perplexity:**\n- Official Docs: https:\u002F\u002Fdocs.perplexity.ai\u002F\n\n## Dependencies\n\n### Required\n\n```bash\n# LiteLLM for API access\nuv pip install litellm\n```\n\n### Optional\n\n```bash\n# For .env file support\nuv pip install python-dotenv\n\n# For JSON processing (usually pre-installed)\nuv pip install jq\n```\n\n### Environment Variables\n\nRequired:\n- `OPENROUTER_API_KEY`: Your OpenRouter API key\n\nOptional:\n- `DEFAULT_MODEL`: Default model to use (default: sonar-pro)\n- `DEFAULT_MAX_TOKENS`: Default max tokens (default: 4000)\n- `DEFAULT_TEMPERATURE`: Default temperature (default: 0.2)\n\n## Summary\n\nThis skill provides:\n\n1. **Real-time web search**: Access current information beyond training data cutoff\n2. **Multiple models**: From cost-effective Sonar to advanced Sonar Pro Search\n3. **Simple setup**: Single OpenRouter API key, no separate Perplexity account\n4. **Comprehensive guidance**: Detailed references for query design and model selection\n5. **Cost-effective**: Pay-as-you-go pricing with usage monitoring\n6. **Scientific focus**: Optimized for research, literature search, and technical queries\n7. **Easy integration**: Works seamlessly with other scientific skills\n\nConduct AI-powered web searches to find current information, recent research, and grounded answers with source citations.\n","# Perplexity Search\n\n## Overview\n\nPerform 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.\n\nThis skill provides access to all Perplexity models through OpenRouter, requiring only a single API key (no separate Perplexity account needed).\n\n## When to Use This Skill\n\nUse this skill when:\n- Searching for current information or recent developments (2024 and beyond)\n- Finding latest scientific publications and research\n- Getting real-time answers grounded in web sources\n- Verifying facts with source citations\n- Conducting literature searches across multiple domains\n- Accessing information beyond the model's knowledge cutoff\n- Performing domain-specific research (biomedical, technical, clinical)\n- Comparing current approaches or technologies\n\n**Do not use** for:\n- Simple calculations or logic problems (use directly)\n- Tasks requiring code execution (use standard tools)\n- Questions well within the model's training data (unless verification needed)\n\n## Quick Start\n\n### Setup (One-time)\n\n1. **Get OpenRouter API key**:\n   - Visit https:\u002F\u002Fopenrouter.ai\u002Fkeys\n   - Create account and generate API key\n   - Add credits to account (minimum $5 recommended)\n\n2. **Configure environment**:\n   ```bash\n   # Set API key\n   export OPENROUTER_API_KEY='sk-or-v1-your-key-here'\n\n   # Or use setup script\n   python scripts\u002Fsetup_env.py --api-key sk-or-v1-your-key-here\n   ```\n\n3. **Install dependencies**:\n   ```bash\n   uv pip install litellm\n   ```\n\n4. **Verify setup**:\n   ```bash\n   python scripts\u002Fperplexity_search.py --check-setup\n   ```\n\nSee `references\u002Fopenrouter_setup.md` for detailed setup instructions, troubleshooting, and security best practices.\n\n### Basic Usage\n\n**Simple search:**\n```bash\npython scripts\u002Fperplexity_search.py \"What are the latest developments in CRISPR gene editing?\"\n```\n\n**Save results:**\n```bash\npython scripts\u002Fperplexity_search.py \"Recent CAR-T therapy clinical trials\" --output results.json\n```\n\n**Use specific model:**\n```bash\npython scripts\u002Fperplexity_search.py \"Compare mRNA and viral vector vaccines\" --model sonar-pro-search\n```\n\n**Verbose output:**\n```bash\npython scripts\u002Fperplexity_search.py \"Quantum computing for drug discovery\" --verbose\n```\n\n## Available Models\n\nAccess models via `--model` parameter:\n\n- **sonar-pro** (default): General-purpose search, best balance of cost and quality\n- **sonar-pro-search**: Most advanced agentic search with multi-step reasoning\n- **sonar**: Basic model, most cost-effective for simple queries\n- **sonar-reasoning-pro**: Advanced reasoning with step-by-step analysis\n- **sonar-reasoning**: Basic reasoning capabilities\n\n**Model selection guide:**\n- Default queries → `sonar-pro`\n- Complex multi-step analysis → `sonar-pro-search`\n- Explicit reasoning needed → `sonar-reasoning-pro`\n- Simple fact lookups → `sonar`\n- Cost-sensitive bulk queries → `sonar`\n\nSee `references\u002Fmodel_comparison.md` for detailed comparison, use cases, pricing, and performance characteristics.\n\n## Crafting Effective Queries\n\n### Be Specific and Detailed\n\n**Good examples:**\n- \"What are the latest clinical trial results for CAR-T cell therapy in treating B-cell lymphoma published in 2024?\"\n- \"Compare the efficacy and safety profiles of mRNA vaccines versus viral vector vaccines for COVID-19\"\n- \"Explain AlphaFold3 improvements over AlphaFold2 with specific accuracy metrics from 2023-2024 research\"\n\n**Bad examples:**\n- \"Tell me about cancer treatment\" (too broad)\n- \"CRISPR\" (too vague)\n- \"vaccines\" (lacks specificity)\n\n### Include Time Constraints\n\nPerplexity searches real-time web data:\n- \"What papers were published in Nature Medicine in 2024 about long COVID?\"\n- \"What are the latest developments (past 6 months) in large language model efficiency?\"\n- \"What was announced at NeurIPS 2023 regarding AI safety?\"\n\n### Specify Domain and Sources\n\nFor high-quality results, mention source preferences:\n- \"According to peer-reviewed publications in high-impact journals...\"\n- \"Based on FDA-approved treatments...\"\n- \"From clinical trial registries like clinicaltrials.gov...\"\n\n### Structure Complex Queries\n\nBreak complex questions into clear components:\n1. **Topic**: Main subject\n2. **Scope**: Specific aspect of interest\n3. **Context**: Time frame, domain, constraints\n4. **Output**: Desired format or type of answer\n\n**Example:**\n\"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.\"\n\nSee `references\u002Fsearch_strategies.md` for comprehensive guidance on query design, domain-specific patterns, and advanced techniques.\n\n## Common Use Cases\n\n### Scientific Literature Search\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"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.\" \\\n  --model sonar-pro\n```\n\n### Technical Documentation\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"How to implement real-time data streaming from Kafka to PostgreSQL using Python? Include considerations for handling backpressure and ensuring exactly-once semantics.\" \\\n  --model sonar-reasoning-pro\n```\n\n### Comparative Analysis\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"Compare PyTorch versus TensorFlow for implementing transformer models in terms of ease of use, performance, and ecosystem support. Include benchmarks from recent studies.\" \\\n  --model sonar-pro-search\n```\n\n### Clinical Research\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"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.\" \\\n  --model sonar-pro\n```\n\n### Trend Analysis\n\n```bash\npython scripts\u002Fperplexity_search.py \\\n  \"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.\" \\\n  --model sonar-pro\n```\n\n## Working with Results\n\n### Programmatic Access\n\nUse `perplexity_search.py` as a module:\n\n```python\nfrom scripts.perplexity_search import search_with_perplexity\n\nresult = search_with_perplexity(\n    query=\"What are the latest CRISPR developments?\",\n    model=\"openrouter\u002Fperplexity\u002Fsonar-pro\",\n    max_tokens=4000,\n    temperature=0.2,\n    verbose=False\n)\n\nif result[\"success\"]:\n    print(result[\"answer\"])\n    print(f\"Tokens used: {result['usage']['total_tokens']}\")\nelse:\n    print(f\"Error: {result['error']}\")\n```\n\n### Save and Process Results\n\n```bash\n# Save to JSON\npython scripts\u002Fperplexity_search.py \"query\" --output results.json\n\n# Process with jq\ncat results.json | jq '.answer'\ncat results.json | jq '.usage'\n```\n\n### Batch Processing\n\nCreate a script for multiple queries:\n\n```bash\n#!\u002Fbin\u002Fbash\nqueries=(\n  \"CRISPR developments 2024\"\n  \"mRNA vaccine technology advances\"\n  \"AlphaFold3 accuracy improvements\"\n)\n\nfor query in \"${queries[@]}\"; do\n  echo \"Searching: $query\"\n  python scripts\u002Fperplexity_search.py \"$query\" --output \"results_$(echo $query | tr ' ' '_').json\"\n  sleep 2  # Rate limiting\ndone\n```\n\n## Cost Management\n\nPerplexity models have different pricing tiers:\n\n**Approximate costs per query:**\n- Sonar: $0.001-0.002 (most cost-effective)\n- Sonar Pro: $0.002-0.005 (recommended default)\n- Sonar Reasoning Pro: $0.005-0.010\n- Sonar Pro Search: $0.020-0.050+ (most comprehensive)\n\n**Cost optimization strategies:**\n1. Use `sonar` for simple fact lookups\n2. Default to `sonar-pro` for most queries\n3. Reserve `sonar-pro-search` for complex analysis\n4. Set `--max-tokens` to limit response length\n5. Monitor usage at https:\u002F\u002Fopenrouter.ai\u002Factivity\n6. Set spending limits in OpenRouter dashboard\n\n## Troubleshooting\n\n### API Key Not Set\n\n**Error**: \"OpenRouter API key not configured\"\n\n**Solution**:\n```bash\nexport OPENROUTER_API_KEY='sk-or-v1-your-key-here'\n# Or run setup script\npython scripts\u002Fsetup_env.py --api-key sk-or-v1-your-key-here\n```\n\n### LiteLLM Not Installed\n\n**Error**: \"LiteLLM not installed\"\n\n**Solution**:\n```bash\nuv pip install litellm\n```\n\n### Rate Limiting\n\n**Error**: \"Rate limit exceeded\"\n\n**Solutions**:\n- Wait a few seconds before retrying\n- Increase rate limit at https:\u002F\u002Fopenrouter.ai\u002Fkeys\n- Add delays between requests in batch processing\n\n### Insufficient Credits\n\n**Error**: \"Insufficient credits\"\n\n**Solution**:\n- Add credits at https:\u002F\u002Fopenrouter.ai\u002Faccount\n- Enable auto-recharge to prevent interruptions\n\nSee `references\u002Fopenrouter_setup.md` for comprehensive troubleshooting guide.\n\n## Integration with Other Skills\n\nThis skill complements other scientific skills:\n\n### Literature Review\n\nUse with `literature-review` skill:\n1. Use Perplexity to find recent papers and preprints\n2. Supplement PubMed searches with real-time web results\n3. Verify citations and find related work\n4. Discover latest developments post-database indexing\n\n### Scientific Writing\n\nUse with `scientific-writing` skill:\n1. Find recent references for introduction\u002Fdiscussion\n2. Verify current state of the art\n3. Check latest terminology and conventions\n4. Identify recent competing approaches\n\n### Hypothesis Generation\n\nUse with `hypothesis-generation` skill:\n1. Search for latest research findings\n2. Identify current gaps in knowledge\n3. Find recent methodological advances\n4. Discover emerging research directions\n\n### Critical Thinking\n\nUse with `scientific-critical-thinking` skill:\n1. Find evidence for and against hypotheses\n2. Locate methodological critiques\n3. Identify controversies in the field\n4. Verify claims with current evidence\n\n## Best Practices\n\n### Query Design\n\n1. **Be specific**: Include domain, time frame, and constraints\n2. **Use terminology**: Domain-appropriate keywords and phrases\n3. **Specify sources**: Mention preferred publication types or journals\n4. **Structure questions**: Clear components with explicit context\n5. **Iterate**: Refine based on initial results\n\n### Model Selection\n\n1. **Start with sonar-pro**: Good default for most queries\n2. **Upgrade for complexity**: Use sonar-pro-search for multi-step analysis\n3. **Downgrade for simplicity**: Use sonar for basic facts\n4. **Use reasoning models**: When step-by-step analysis needed\n\n### Cost Optimization\n\n1. **Choose appropriate models**: Match model to query complexity\n2. **Set token limits**: Use `--max-tokens` to control costs\n3. **Monitor usage**: Check OpenRouter dashboard regularly\n4. **Batch efficiently**: Combine related simple queries when possible\n5. **Cache results**: Save and reuse results for repeated queries\n\n### Security\n\n1. **Protect API keys**: Never commit to version control\n2. **Use environment variables**: Keep keys separate from code\n3. **Set spending limits**: Configure in OpenRouter dashboard\n4. **Monitor usage**: Watch for unexpected activity\n5. **Rotate keys**: Change keys periodically\n\n## Resources\n\n### Bundled Resources\n\n**Scripts:**\n- `scripts\u002Fperplexity_search.py`: Main search script with CLI interface\n- `scripts\u002Fsetup_env.py`: Environment setup and validation helper\n\n**References:**\n- `references\u002Fsearch_strategies.md`: Comprehensive query design guide\n- `references\u002Fmodel_comparison.md`: Detailed model comparison and selection guide\n- `references\u002Fopenrouter_setup.md`: Complete setup, troubleshooting, and security guide\n\n**Assets:**\n- `assets\u002F.env.example`: Example environment file template\n\n### External Resources\n\n**OpenRouter:**\n- Dashboard: https:\u002F\u002Fopenrouter.ai\u002Faccount\n- API Keys: https:\u002F\u002Fopenrouter.ai\u002Fkeys\n- Perplexity Models: https:\u002F\u002Fopenrouter.ai\u002Fperplexity\n- Usage Monitoring: https:\u002F\u002Fopenrouter.ai\u002Factivity\n- Documentation: https:\u002F\u002Fopenrouter.ai\u002Fdocs\n\n**LiteLLM:**\n- Documentation: https:\u002F\u002Fdocs.litellm.ai\u002F\n- OpenRouter Provider: https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fproviders\u002Fopenrouter\n- GitHub: https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm\n\n**Perplexity:**\n- Official Docs: https:\u002F\u002Fdocs.perplexity.ai\u002F\n\n## Dependencies\n\n### Required\n\n```bash\n# LiteLLM for API access\nuv pip install litellm\n```\n\n### Optional\n\n```bash\n# For .env file support\nuv pip install python-dotenv\n\n# For JSON processing (usually pre-installed)\nuv pip install jq\n```\n\n### Environment Variables\n\nRequired:\n- `OPENROUTER_API_KEY`: Your OpenRouter API key\n\nOptional:\n- `DEFAULT_MODEL`: Default model to use (default: sonar-pro)\n- `DEFAULT_MAX_TOKENS`: Default max tokens (default: 4000)\n- `DEFAULT_TEMPERATURE`: Default temperature (default: 0.2)\n\n## Summary\n\nThis skill provides:\n\n1. **Real-time web search**: Access current information beyond training data cutoff\n2. **Multiple models**: From cost-effective Sonar to advanced Sonar Pro Search\n3. **Simple setup**: Single OpenRouter API key, no separate Perplexity account\n4. **Comprehensive guidance**: Detailed references for query design and model selection\n5. **Cost-effective**: Pay-as-you-go pricing with usage monitoring\n6. **Scientific focus**: Optimized for research, literature search, and technical queries\n7. **Easy integration**: Works seamlessly with other scientific skills\n\nConduct AI-powered web searches to find current information, recent research, and grounded answers with source citations.\n",{"name":5,"description":7},"main","2b749c82b5d11fac39d9a6e021ce3f5b8a541bd1","cli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search",3931,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates","https:\u002F\u002Faitmpl.com","https:\u002F\u002Fgithub.com\u002Fdavila7","https:\u002F\u002Fdanielavila.me","Building AI dev tools with LLMs","2026-11-14 06:14:46",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add davila7\u002Fclaude-code-templates --skill perplexity-search",{"tool":71,"command":72},"bunx","bunx skills add davila7\u002Fclaude-code-templates --skill perplexity-search",{"tool":74,"command":75},"pnpm","pnpm dlx skills add davila7\u002Fclaude-code-templates --skill perplexity-search","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search\u002FSKILL.md",true,[79,85,91,95,99,105],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"assets\u002F.env.example","ASSET","资产文件",506,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search\u002Fassets\u002F.env.example",{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fmodel_comparison.md","REFERENCE","参考文档",10378,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search\u002Freferences\u002Fmodel_comparison.md",{"path":92,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fopenrouter_setup.md",11522,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search\u002Freferences\u002Fopenrouter_setup.md",{"path":96,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fsearch_strategies.md",10021,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search\u002Freferences\u002Fsearch_strategies.md",{"path":100,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":103,"sourceHtmlUrl":104},"scripts\u002Fperplexity_search.py","SCRIPT","脚本",8068,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search\u002Fscripts\u002Fperplexity_search.py",{"path":106,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":107,"sourceHtmlUrl":108},"scripts\u002Fsetup_env.py",4656,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fperplexity-search\u002Fscripts\u002Fsetup_env.py",[110,136,163,195,229,253],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":117,"publishedAt":50},"01M70NHBTQ8BV0A2SCAZXEPHCX","wealthville-pool-scoring","Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter\u002FHold\u002FExit\u002FReduce\u002FAvoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fweb-data\u002Fwealthville-pool-scoring\u002FSKILL.md",[116],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[118,119,120,121,122,33,123,124,125,31,126,127,128,129,130,131,132,133,134,135],"scoring","pool","wealthville pool scoring","liquidity","which","exit","now","use","reduce","with","record","track","verdict","evm","solana","how","public","look",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":143,"publishedAt":50},"01M70MB6VR8ERJ4EM8D5KHBMEV","technical-debt-auditor","Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO\u002FFIXME\u002FHACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like \"where should I focus refactoring\", \"find code smells\", \"audit my codebase\", \"what technical debt do we have\", \"prioritize cleanup work\", or asks about code quality metrics. Also trigger when the user mentions \"code rot\", \"legacy cleanup\", \"refactoring priorities\", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say \"technical debt\" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftechnical-debt-auditor\u002FSKILL.md",[142],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[144,145,146,147,148,149,150,151,152,153,154,31,155,156,157,158,159,160,161,162],"technical debt","debt","technical","technical debt auditor","auditor","coverage","complexity","markers","project","cleanup","unused","code","todo","work","plan","focus","signals","audit","dependency",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":178,"publishedAt":50},"01M70KPYH9QNHCNME5GJQGE22K","readonly-sql-guard","Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production\u002FERP\u002Fanalytics database (a \"query\" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write\u002FDDL\u002Fside-effect\u002Ftransaction-escape risks. Checks what a statement CALLS, not just its shape.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdatabase\u002Freadonly-sql-guard\u002FSKILL.md",[169,172,173],{"categoryNo":170,"categoryName":171,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":174,"categoryName":175,"taxonomyType":176,"taxonomyTypeDesc":177},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[179,180,181,182,183,184,185,33,186,187,188,189,190,191,192,125,43,193,31,194],"readonly","guard","sql guard","sql","readonly sql guard","erp","effect","read-only","db","just","tool","calls","only","MCP","database","query",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":199,"licenseFileUrl":200,"sourceHtmlUrl":201,"categories":202,"keywords":206,"publishedAt":50},"01M6AFY6F7CC2BBZP1QD6VTNVC","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[203],{"categoryNo":204,"categoryName":205,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[207,49,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,33,228],"artifacts builder","web artifacts builder","artifacts","builder","state","routing","state management","component","css","frontend","ui","Tools","file","components","shadcn","react","Tailwind","suite","jsx","html","single-file","ui components",{"skillNo":230,"name":231,"nameZh":6,"description":232,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":199,"licenseFileUrl":233,"sourceHtmlUrl":234,"categories":235,"keywords":240,"publishedAt":50},"01M6AFWF33SFV9Z3SF4PEEE4BF","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[236,239],{"categoryNo":237,"categoryName":238,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":204,"categoryName":205,"taxonomyType":21,"taxonomyTypeDesc":22},[241,242,243,244,245,49,246,216,217,247,248,249,250,33,251,127,252],"webapp testing","testing","webapp","browser","playwright","applications","debugging","toolkit","logs","screenshots","local","behavior",{"skillNo":254,"name":255,"nameZh":6,"description":256,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":199,"licenseFileUrl":257,"sourceHtmlUrl":258,"categories":259,"keywords":267,"publishedAt":50},"01M6AF67Q67JJJ5V51JR2P52KA","discernment-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, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FSKILL.md",[260,263,264],{"categoryNo":261,"categoryName":262,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":265,"categoryName":266,"taxonomyType":176,"taxonomyTypeDesc":177},"01JBSEEDCAT000000000000036","内容创作者",[268,269,270,271,272,48,273,274,209,275,219,155,276,277,278,279,280,191,281,31,282,283,284,285,286,133,287],"discernment nudge","nudge","interpretation","help","run","data","writing","lookup","content","review","conversation","short","up","invoke","you","analysis","claims","argument","assemble","recommendations"]