Runs Perplexity-style grounded searches with citation-backed answers using Claude's WebSearch/WebFetch and keyless scholarly APIs (Europe PMC, Crossref, arXiv). Optionally uses Perplexity Sonar models via OpenRouter.
Answer questions about current information, recent literature, and facts beyond the training cutoff with web-grounded, citation-backed answers — the Perplexity workflow: a sharp query, current sources, and an answer in which every claim points to a source the reader can open. It needs no API key: you search with WebSearch, read with WebFetch, and query keyless scholarly APIs for papers. Perplexity's own Sonar models (one OpenRouter key covers all of them) are an optional backend when the user asks for Perplexity.
Use for: current developments, latest publications, citation-grounded answers, verifying a claim against current sources, or anything past the training cutoff.
Skip for: arithmetic/logic, code execution, or facts well within training data (answer directly).
| Scenario | Use Instead |
|---|---|
Unsure which search backend fits; want automatic routing and results saved to sources/ | alterlab-research-lookup |
| General web, market, or technical research via Parallel, or extracting a known URL | alterlab-parallel-web |
| Per-paper structured experimental data (sample sizes, effect sizes, quality scores) | alterlab-bgpt-search |
| Reproducible biomedical database search by MeSH terms or PMIDs | alterlab-pubmed |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-research-lookup) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
https://www.ebi.ac.uk/europepmc/webservices/rest/search?query=TITLE_ABS:(<terms>)&format=json&resultType=core&pageSize=10 (biomedicine, abstracts, sort=CITED%20desc for influential work; DOI:"<doi>" to fetch one record),
https://api.crossref.org/works?query.bibliographic=<terms>&rows=10 (every discipline, is-referenced-by-count; /works/<DOI> for one record),
https://export.arxiv.org/api/query?search_query=all:<word>+AND+all:<word>&max_results=10 (preprints).
Semantic Scholar (https://api.semanticscholar.org/graph/v1/paper/search?query=<terms>&fields=title,year,venue,externalIds,citationCount) also answers keyless, but its keyless pool is shared and rate-limited (HTTP 429 when busy; back off and retry) — use it as an extra, not the only source.[n] on every factual sentence, exact figures as the source states them (effect sizes with CIs, dates, counts), conflicts between sources flagged with which is stronger (evidence hierarchy: meta-analyses > RCTs > cohort > case reports > expert opinion), and a numbered source list: title, publisher/journal, year, DOI or URL, and the retrieval date. Cite the underlying sources, never "Perplexity" or "a search engine".sources/search_YYYYMMDD_HHMMSS_<topic>.md with the queries, retrieval date, the answer and the source list — the keyless equivalent of --output results.json.If the user asked specifically for Perplexity and there is no key, say so in the first line ("Perplexity needs OPENROUTER_API_KEY, which is not set"), then — unless they only wanted Perplexity — give the keyless answer above, labelled as WebSearch-based, never presented as Perplexity output.
Use it when the user asks for Perplexity or a specific Sonar model and OPENROUTER_API_KEY is set. Without the key the script exits 1 before sending anything and prints the keyless alternative.
# 1. Get a key at https://openrouter.ai/keys and add credits ($5+ recommended)
# 2. Configure (either form works; setup_env.py writes .env with owner-only permissions)
export OPENROUTER_API_KEY='sk-or-v1-your-key-here'
python scripts/setup_env.py --api-key sk-or-v1-your-key-here # writes .env
# 3. Verify. LiteLLM needs no install step: uv resolves it per call, without a virtualenv
uv run --python ">=3.11" --with litellm python scripts/perplexity_search.py --check-setup
--check-setup reads the live environment, not .env. After setup_env.py, load the file with set -a; source .env; set +a (plain source does not export) or use python-dotenv, so the variable is actually in scope. Ask the user to set the key themselves rather than pasting it into the conversation. See references/openrouter_setup.md for full setup, security, and troubleshooting.
uv run --python ">=3.11" --with litellm python scripts/perplexity_search.py "What are the latest developments in CRISPR gene editing?"
uv run --python ">=3.11" --with litellm python scripts/perplexity_search.py "Recent CAR-T therapy clinical trials" --output results.json
uv run --python ">=3.11" --with litellm python scripts/perplexity_search.py "Compare mRNA and viral vector vaccines" --model sonar-pro-search
uv run --python ">=3.11" --with litellm python scripts/perplexity_search.py "Quantum computing for drug discovery" --verbose
Where LiteLLM is already installed, plain python scripts/perplexity_search.py … works the same. The CLI takes the bare model name (e.g. sonar-pro); the script prepends openrouter/perplexity/ automatically.
Select with --model (or set DEFAULT_MODEL):
| Model | Use it for |
|---|---|
sonar-pro (default) | General research, balanced cost/quality |
sonar-pro-search | Most advanced agentic, multi-step search; comprehensive comparisons. Highest cost; OpenRouter-exclusive |
sonar | Simple fact lookups, cost-sensitive bulk queries |
sonar-reasoning-pro | Tasks needing explicit step-by-step reasoning |
sonar-reasoning was retired on OpenRouter (not listed as of 2026-09-23) and the CLI no longer accepts it; a stale DEFAULT_MODEL=sonar-reasoning now fails fast with a clear error. See references/model_comparison.md for detailed trade-offs, pricing, context windows, and sonar-deep-research for programmatic use. On the keyless path, the equivalent of sonar-pro-search is simply more searches: plan sub-questions, search each, and open more sources before comparing.
from scripts.perplexity_search import search_with_perplexity
result = search_with_perplexity(
query="What are the latest CRISPR developments?",
model="openrouter/perplexity/sonar-pro", # full path required when calling directly
max_tokens=4000,
temperature=0.2,
)
if result["success"]:
print(result["answer"])
print(f"Tokens: {result['usage']['total_tokens']}")
else:
print(f"Error: {result['error']}")
Saved JSON (--output) carries answer, model, usage, and citations — a deduplicated list of {url, title} gathered from OpenRouter's url_citation annotations and Perplexity's citations/search_results fields, present when the model returns sources. Process with jq '.answer' or jq '.citations[].url'. Cite the underlying sources, not Perplexity, and open any source you quote: answers are generated summaries and can misattribute a claim.
Pricing is per token (plus a per-request fee on sonar-pro-search); rough per-query order: sonar < sonar-pro < sonar-reasoning-pro < sonar-pro-search. Control spend by matching the model to the query, capping --max-tokens, and setting a spending limit in the OpenRouter dashboard. Monitor usage at https://openrouter.ai/activity. Exact rates: references/model_comparison.md and https://openrouter.ai/perplexity.
OPENROUTER_API_KEY — needed by scripts/perplexity_search.py, not by the skillDEFAULT_MODEL (default sonar-pro), DEFAULT_MAX_TOKENS (default 4000), DEFAULT_TEMPERATURE (default 0.2) — honored as CLI defaults; override per call with the matching flag.Be specific (domain + time frame + desired output). Examples that work well on both paths:
Add source preferences ("peer-reviewed", "clinicaltrials.gov", "FDA-approved") for higher-quality grounding. Full query-design patterns, domain templates, and pitfalls live in references/search_strategies.md.
scripts/perplexity_search.py — optional Perplexity search CLI / importable functionscripts/setup_env.py — key setup and validation for the optional backendreferences/openrouter_setup.md — setup, security, troubleshootingreferences/model_comparison.md — model selection and pricingreferences/search_strategies.md — query design (applies to both paths)assets/.env.example — environment templatePart of the AlterLab Academic Skills suite.
What SKILL.md sets; muted values are Claude Code's defaults
Not loaded · from alterlab-writing-tools
Claude Code won't load this skill
It ships in alterlab-writing-tools at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Generated from the plugin's indexed repository (alterlab-ieu/alterlab-academic-skills) — no native marketplace selected
npx claudepluginhub p/alterlab-ieu-alterlab-writing-tools2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
241 skills in this plugin
/alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(rng=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite./alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite./alterlab-accreditation-aolScaffolds program-level Assurance-of-Learning (AoL) documentation for AACSB (Standard 5 in the 2020 standards and the 2026 Global Standards) and ABET (Criterion 3 Student Outcomes, Criterion 4 Continuous Improvement) accreditation — program learning outcomes / competency goals, curriculum-to-outcome mapping matrices, direct- and indirect-assessment plans, rubric design, and closing-the-loop continuous-improvement narratives — and validates the structure of an outcome-mapping matrix with scripts/aol_matrix.py. Use when the user needs AACSB or ABET assurance-of-learning material, a program-learning-outcomes set, a curriculum/outcome map or coverage matrix, a direct/indirect assessment plan, a closing-the-loop report, or accreditation self-study text. For single-course design or course rubrics prefer alterlab-teaching-design; for post-award grant reports prefer alterlab-grant-reporting. Part of the AlterLab Academic Skills suite./alterlab-adaptyvPrepares and validates Adaptyv Bio Foundry protein-testing submissions with no account — optimizes and pre-screens sequences locally (NetSolP/SoluProt heuristics, SolubleMPNN, ESM), assembles the experiment payload, and validates it offline against the Foundry's own type/method/sequence rules so it is ready and correct before it costs anything. Submitting to the Foundry, browsing the target catalog, tracking status and retrieving results run through the Foundry API with the user's own ADAPTYV_API_KEY (experiments cost money and take weeks). Use when designing proteins for wet-lab validation (binding/affinity, expression, thermostability, fluorescence), preparing or validating a Foundry submission, pre-screening sequences, or tracking an Adaptyv experiment. Triggers on "Adaptyv", "Foundry API", "cloud lab", "biolayer interferometry / BLI", "wet-lab validation". Part of the AlterLab Academic Skills suite./alterlab-aeonRuns time series machine learning with the aeon library — classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search via scikit-learn compatible APIs. Use when working with temporal data, sequential patterns, or time-indexed observations (univariate or multivariate) that need specialized algorithms beyond standard ML approaches. Part of the AlterLab Academic Skills suite./alterlab-ai-use-disclosureHelps faculty and researchers disclose generative-AI use and comply with the rules for manuscripts, grant proposals, peer review, theses and figures. Walks a venue → policy → placement decision tree over policies verified on 2026-09-23 (ICMJE, Springer Nature/Nature, Elsevier, Wiley, Taylor & Francis, Sage, IEEE, PLOS, arXiv; NIH NOT-OD-25-132 and NOT-OD-23-149, NSF, UKRI, ERC, TÜBİTAK; YÖK's 2024 ethics guide; EU AI Act Article 50), drafts English and Turkish statements, and ships scripts/disclosure_builder.py to emit a statement plus warnings where a policy forbids the use. Use when the request mentions an AI or ChatGPT disclosure or declaration, whether and where AI use must be declared, AI in peer review or grant review, AI-generated figures, AI rules for a thesis, or 'yapay zekâ kullanım beyanı'. For course AI policies and APA/MLA citations of ChatGPT prefer alterlab-syllabus-ai-policy; for writing the paper itself prefer alterlab-scientific-writing. Part of the AlterLab Academic Skills suite.Other plugins' skills for the same job