Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

valyu-best-practices

БесплатноБез исполняемых скриптовНе проверен

Complete Valyu API toolkit for AI agents. Use this skill when asked to perform real-time search across web, academic, medical, transportation, financial…

valyuAIот valyuAI★ 25 звёзд на GitHub

Об этом скилле

Valyu Best Practices

This skill provides instructions for using the Valyu API to perform search, content extraction, AI-powered answers, and deep research tasks.

Quick Reference: Choosing the Right API

Use this decision tree to select the appropriate Valyu API:

What do you need?

├─ Find information across multiple sources
│  └─ Use Search API
│
├─ Extract content from specific URLs
│  └─ Use Contents API
│
├─ Get an AI-synthesized answer with citations
│  └─ Use Answer API
│
├─ Generate a comprehensive research report
│  └─ Use DeepResearch API
│
└─ Discover available data sources
   └─ Use Datasources API

⚠️ MANDATORY: Use Official Valyu SDK Libraries

CRITICAL: When writing code that uses the Valyu API, you MUST use the official SDK libraries. NEVER make raw HTTP/fetch calls to the Valyu API endpoints.

JavaScript/TypeScript: valyu-js

npm install valyu-js
# or
pnpm add valyu-js
import { Valyu } from 'valyu-js';

const valyu = new Valyu(process.env.VALYU_API_KEY);

// Now use valyu.search(), valyu.contents(), valyu.answer(), valyu.deepResearch

Python: valyu

pip install valyu
# or
uv add valyu
from valyu import Valyu

valyu = Valyu(api_key=os.environ.get("VALYU_API_KEY"))

# Now use valyu.search(), valyu.contents(), valyu.answer(), valyu.deep_research

Why SDK Over Raw API Calls?

  1. Type safety - Full TypeScript/Python type hints for all parameters and responses
  2. Automatic retries - Built-in retry logic for transient failures
  3. Streaming support - Proper async iterator support for streaming responses
  4. Error handling - Structured error types with helpful messages
  5. Future compatibility - SDK updates handle API changes automatically

❌ NEVER Do This

// DON'T make raw fetch calls
const response = await fetch('https://api.valyu.ai/v1/search', {
  method: 'POST',
  headers: {
    'x-api-key': apiKey,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ query: '...' })
});

✅ Always Do This

// DO use the SDK
import { Valyu } from 'valyu-js';

const valyu = new Valyu(process.env.VALYU_API_KEY);
const response = await valyu.search({ query: '...' });

1. Search API

Purpose: Find information across web, academic, medical, transportation, financial, news, and proprietary sources.

When to Use

  • Finding recent information on any topic
  • Academic research (arXiv, PubMed, bioRxiv, medRxiv)
  • Financial data (SEC filings, earnings reports, stock data)
  • News monitoring and current events
  • Healthcare data (clinical trials, drug labels)
  • Prediction markets (Polymarket, Kalshi)
  • Transportation (UK National Rail, Global Shipping)

Basic Usage

const response = await valyu.search({
  query: "transformer architecture attention mechanism 2024",
  searchType: "all",
  maxNumResults: 10
});

Search Types

Type Use For
all Everything - web, academic, financial, proprietary
web General internet content only
proprietary Licensed academic papers and research
news News articles and current events

Key Parameters

Parameter (TS/JS) Parameter (Python) Purpose Example
query query Search query (under 400 chars) "CRISPR gene editing 2024"
searchType search_type Source scope "all", "web", "proprietary", "news"
maxNumResults max_num_results Number of results (1-20) 10
includedSources included_sources Limit to specific sources ["valyu/valyu-arxiv", "valyu/valyu-pubmed"]
startDate / endDate start_date / end_date Date filtering "2024-01-01"
relevanceThreshold relevance_threshold Minimum relevance (0-1) 0.7

Domain-Specific Search Patterns

Academic Research:

await valyu.search({
  query: "CRISPR therapeutic applications clinical trials",
  searchType: "proprietary",
  includedSources: ["valyu/valyu-arxiv", "valyu/valyu-pubmed", "valyu/valyu-biorxiv"],
  startDate: "2024-01-01"
});

Financial Analysis:

await valyu.search({
  query: "Apple revenue Q4 2024 earnings",
  searchType: "all",
  includedSources: ["valyu/valyu-sec-filings", "valyu/valyu-earnings-US"]
});

News Monitoring:

await valyu.search({
  query: "AI regulation EU",
  searchType: "news",
  startDate: "2024-06-01",
  countryCode: "EU"
});

Search Recipes

For detailed patterns, see:


2. Contents API

Полный SKILL.md на GitHub

Установить valyu-best-practices в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/answer-recipes/answer-with-custom-instructions.mdreferences/answer-recipes/answer-with-streaming.mdreferences/answer-recipes/basic-answer.mdreferences/api-guide.mdreferences/content-recipes/basic-content-extraction-from-web-with-summary.mdreferences/content-recipes/basic-content-extraction-from-web.mdreferences/content-recipes/extract-content-from-research-paper.mdreferences/content-recipes/extract-product-data-from-online-product-info.mdreferences/content-recipes/news-aggregator-from-content-extraction.mdreferences/content-recipes/structured-content-extraction-from-web.mdreferences/datasources.mdreferences/deepresearch-recipes/create-a-fast-research-task-and-await-completion.mdreferences/deepresearch-recipes/create-a-heavy-research-task-and-await-completion.mdreferences/deepresearch-recipes/create-a-standard-research-task-and-await-completion.mdreferences/design-philosophy.mdreferences/integrations/anthropic.mdreferences/integrations/aws-agentcore.mdreferences/integrations/claude-agent-sdk.mdreferences/integrations/claude-code-plugin.mdreferences/integrations/google.mdreferences/integrations/langchain.mdreferences/integrations/llamaindex.mdreferences/integrations/lmstudio.mdreferences/integrations/mcp-desktop.mdreferences/integrations/mcp-server.mdreferences/integrations/n8n.mdreferences/integrations/openai.mdreferences/integrations/vercel-ai-sdk.mdreferences/prompting.mdreferences/recipes.mdreferences/search-recipes/academic-search.mdreferences/search-recipes/basic-search-all.mdreferences/search-recipes/basic-search-proprietary.mdreferences/search-recipes/basic-search-web.mdreferences/search-recipes/finance-search.mdreferences/search-recipes/healthcare-and-bio-search.mdreferences/search-recipes/monitor-for-breaking-news.mdreferences/search-recipes/multi-step-search-workflow.mdreferences/search-recipes/multi-topic-news-monitoring.mdreferences/search-recipes/news-search.md

FAQ

Что делает скилл valyu-best-practices?

Complete Valyu API toolkit for AI agents. Use this skill when asked to perform real-time search across web, academic, medical, transportation, financial sources, content extraction from URLs, AI-powered answers with citations, or comprehensive deep research reports.

Как установить скилл valyu-best-practices?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл valyu-best-practices запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить valyu-best-practices с