Agent skill

Tavily Web Search

by LichAmnesia in LichAmnesia/lich-skills

Runs headless web searches and single-page extraction through the Tavily API from a Python script, returning cited, summarized results without a browser.

MITAuto-check: notesProductivity & Automation

Install Tavily Web Search

skills CLI
$ npx skills add LichAmnesia/lich-skills --skill tavily-search -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LichAmnesia/lich-skills tavily-search --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LichAmnesia/lich-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tavily-search .claude/skills/tavily-search && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tavily-search
GitHub stars
234
Token cost
~1k tokens
SKILL.md length
359 words
Files
2 (incl. scripts)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Runs headless web searches and single-page extraction through the Tavily API from a Python script, returning cited, summarized results without a browser.

  • Works in 3 steps: Get a free API key:… → Export it → First run will auto-install dependencies…
  • Looking up current news, documentation or pricing on the web
  • SKILL.md covers When to use, When NOT to use, Setup and Search, plus 7 more sections
  • Runs Python scripts from its folder; calls uv, curl and sh; reaches astral.sh; needs TAVILY_API_KEY and TAVILY_KEY

What it does

A script, `scripts/search.py`, run with `uv`, sends a query to Tavily and prints a synthesized answer followed by results, or JSON with `--json`. Flags set the number of results from 1 to 20, a basic or advanced depth, a general or news topic with a day limit, full article bodies as markdown, and domains to include or exclude. A separate `--extract` mode takes one URL and returns the readable page body without navigation, ads or boilerplate.

It suits up-to-date facts, news, docs and pricing, cited sources for research or writing, and the full text of a page, including when other search tools are unavailable or rate-limited. It should not be used when the page is already in context, when the answer is static and in the model's training data, or when a page needs login or clicks, which calls for a browser tool. Setup means exporting a `TAVILY_API_KEY`, with a free tier of 1000 searches per month, keeping it out of version control, and letting `uv` install dependencies on first run.

When your agent uses it

  • Looking up current news, documentation or pricing on the web
  • Collecting cited sources for a research or writing task
  • Pulling the readable text of one article as markdown

Example prompts

  • “Search for the latest news on the Gemini API pricing changes and cite sources.”
  • “Extract the full text of this blog post as markdown and save it as post.json.”
  • “Run an advanced-depth search on vector database benchmarks, limited to the last week of news.”

Requirements

  • A Tavily API key in TAVILY_API_KEY
  • uv to run the script

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Get a free API key: https://app.tavily.com (1000 free searches/month)
  2. Export it
  3. First run will auto-install dependencies via uv

What it can do on your machine

Read from SKILL.md and the folder at commit ebbc355. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • curl
    • sh
    • gitleaks

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • astral.sh

    Also links to:

    • tavily.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TAVILY_API_KEY
    • TAVILY_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tavily Web Search loads about 1k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 359 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePipes a well-known installer script into a shellSKILL.md:37
    command -v uv || curl -LsSf https://astral.sh/uv/install.sh | sh

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from LichAmnesia/lich-skills at commit ebbc355, republished under its MIT licence (© LichAmnesia). 359 words, ~1,028 tokens.

Download SKILL.mdSave it as .claude/skills/tavily-search/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
tavily-search
description
Web search and content extraction via the Tavily API. Use when you need real-time web results, citations, or raw article content without a browser. Requires TAVILY_API_KEY.

Headless web search and content extraction using Tavily. Built for LLM agents — returns clean, summarised results with optional raw article bodies. No browser required.

When to use

  • You need up-to-date web information (news, docs, pricing, facts)
  • You want cited sources with URLs for a research/writing task
  • You need the full readable body of a URL as markdown
  • Brave/Google search is not available or rate-limited

When NOT to use

  • You already have the page in your context
  • The answer is static and likely in the model's training data
  • You need to interact with a page (login, click) — use a browser MCP instead

Setup

  1. Get a free API key: https://app.tavily.com (1000 free searches/month)

  2. Export it:

    bash
    export TAVILY_API_KEY="tvly-YOUR_KEY_HERE"

    Add to ~/.zshrc or ~/.bashrc for persistence. Never commit the key.

  3. First run will auto-install dependencies via uv:

    bash
    command -v uv || curl -LsSf https://astral.sh/uv/install.sh | sh
bash
# Basic search — 5 results, summarised answer
uv run ~/.claude/skills/lich-skills/skills/tavily-search/scripts/search.py "your query"

# More results
uv run .../search.py "your query" --max-results 10

# Include full article bodies (slower, more tokens)
uv run .../search.py "your query" --raw-content

# Deeper search with higher recall
uv run .../search.py "your query" --depth advanced

# News-only, last 7 days
uv run .../search.py "your query" --topic news --days 7

# Output as JSON
uv run .../search.py "your query" --json
Flags
FlagDefaultPurpose
--max-results N5Number of results to return (1–20)
--depth {basic,advanced}basicadvanced = slower, higher quality
--topic {general,news}generalNews mode adds recency filtering
--days N—With --topic news, restrict to last N days
--raw-contentoffInclude full article body as markdown
--include-domains a,b—Restrict to comma-separated domains
--exclude-domains a,b—Exclude comma-separated domains
--jsonoffMachine-readable JSON output

Extract a single URL

bash
uv run .../search.py --extract https://example.com/article

Returns clean markdown of the page body (no nav, ads, or boilerplate).

Show full SKILL.md (144 more words)Show less

Output format (default, human-readable)

ANSWER: <Tavily's synthesised answer, 1–3 sentences>

RESULTS:
[1] <title>
    <url>
    <snippet — 1–2 sentences>

[2] ...

With --raw-content each result gets an indented markdown body below the snippet.

Examples

Research a library:

bash
uv run .../search.py "Gemini 3 Flash Image API pricing" --depth advanced

Get the full article body of a blog post:

bash
uv run .../search.py --extract https://blog.example.com/post --json > post.json

News sweep:

bash
uv run .../search.py "OpenAI Codex release" --topic news --days 3 --max-results 10

Environment

  • Key lookup order: --api-key flag → $TAVILY_API_KEY → $TAVILY_KEY
  • Default model: Tavily's search and extract endpoints (v1)
  • Default timeout: 30s per request

Common failures

ErrorFix
Error: No TAVILY_API_KEYExport the key or pass --api-key
401 UnauthorizedKey is wrong, revoked, or over quota
429 Rate limitWait or upgrade plan
No resultsBroaden query, try --depth advanced, drop domain filters

Red flags

  • Hardcoding the API key anywhere in this repo
  • Passing the key on the command line in shared terminals (shell history leak)
  • Using --raw-content with --max-results 20 on every query (burns tokens)

Verification

  • $TAVILY_API_KEY is set in env, not in files
  • uv run .../search.py "hello world" returns results
  • gitleaks detect --source . clean

© LichAmnesia, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in skills/tavily-search of LichAmnesia/lich-skills.

  • SKILL.md
  • scripts/search.py

Open the folder on GitHubat commit ebbc355

Compare with similar skills

Tavily Web Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tavily Web Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tavily Web Search this skillLichAmnesia/lich-skills234—~1kAutomated safety check: NotesMIT
Tavily Web Searchallenpeng0705/EnvoyMesh3.1k3 repos~2.5kAutomated safety check: NotesNone
Tavily Deep Researchsandbaseai/sandbase-skills202—~699Automated safety check: PassApache-2.0
Argo Search and Verificationtaxueseek/argo186—~1.2kAutomated safety check: PassMIT
Omk ResearchKaimingWan/oh-my-kiro107—~827Automated safety check: PassMIT
Tavily Researchinitializ/forge222—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Tavily Web Search

    allenpeng0705/EnvoyMesh

    Searches the web through the Tavily API with LLM-friendly output: clean structured results, optional AI-written answers, domain filters, news mode, images and raw content.

    3.1k GitHub starsUsed in 3 repos~2.5k tokens
    Productivity & AutomationAuto-check: notes
  • Tavily Deep Research

    sandbaseai/sandbase-skills

    Advanced web search, content extraction, and site mapping through Tavily via SandBase.

    202 GitHub stars~699 tokensUpdated 13 days ago
    Productivity & AutomationAuto-check passed
  • Unified web search, page fetching and evidence checking across hundreds of sources, with result verification, a research-dossier mode and vertical search engines.

    186 GitHub stars~1.2k tokensUpdated 3 days ago
    Research & ScienceAuto-check passed
  • Omk Research

    KaimingWan/oh-my-kiro

    Multi-level research: built-in knowledge → web search → Tavily deep research API.

    107 GitHub stars~827 tokensUpdated 6 mo ago
    Marketing & SEOAuto-check passed
  • Tavily Research

    initializ/forge

    Deep multi-source research using Tavily Research API. An agent skill from initializ/forge.

    222 GitHub stars~1.1k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Multi Source Search

    sandbaseai/sandbase-skills

    Portable multi-source research with cross-source validation and an offline evidence ledger.

    202 GitHub stars~1.6k tokensUpdated 13 days ago
    Research & ScienceAuto-check passed

More from LichAmnesia/lich-skills

All 11 skills in this repo
  • Google Analytics 4 Analysis

    LichAmnesia/lich-skills

    Pulls Google Analytics 4 data through the Data API with TypeScript scripts and turns it into a daily SEO report or prioritized traffic and bounce-rate recommendations.

    234 GitHub stars~2k tokensUpdated 4 mo ago
    Auto-check: notes
  • Nano Banana Image Generator

    LichAmnesia/lich-skills

    Generates or edits PNG images with Google's Nano Banana 2 model through a small script, with a choice of 512, 1K, 2K or 4K output.

    234 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check: notes
  • Spec-Driven Development v2

    LichAmnesia/lich-skills

    Organizes long-running agent work into a Project, Sprint and Task hierarchy with per-task state files, isolated worktrees, review loops and script-checked rules.

    234 GitHub stars~3.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Build Until Pass Loop

    LichAmnesia/lich-skills

    Drives a failing build, typecheck, lint or test command to a passing exit code through small, one-fix-at-a-time rounds, stopping at a hard attempt cap instead of looping forever.

    234 GitHub stars~2.8k tokensUpdated 4 mo ago
    Auto-check passed
  • Hypothesis-Driven Debugging

    LichAmnesia/lich-skills

    Replaces trial-and-error fixing with an observe, hypothesize, experiment and conclude loop kept in DEBUG.md, where no fix is allowed before evidence supports a cause.

    234 GitHub stars~2.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Spec-Driven Development

    LichAmnesia/lich-skills

    Runs a gated Spec, Plan, Build, Test, Review, Ship workflow so non-trivial changes are specified, verified and reviewed before they ship, with a named artifact per phase.

    234 GitHub stars~3.5k tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about Tavily Web Search

What does Tavily Web Search do?

Runs headless web searches and single-page extraction through the Tavily API from a Python script, returning cited, summarized results without a browser. py`, run with `uv`, sends a query to Tavily and prints a synthesized answer followed by results, or JSON with `--json`. Flags set the number of results from 1 to 20, a basic or advanced depth, a general or news topic with a day limit, full article bodies as markdown, and domains to include or exclude.

When should I use Tavily Web Search?

Tavily Web Search fits situations like: looking up current news, documentation or pricing on the web; collecting cited sources for a research or writing task; pulling the readable text of one article as markdown.

How do I install Tavily Web Search in Claude Code?

Run `npx skills add LichAmnesia/lich-skills --skill tavily-search -a claude-code`. Or copy the skill folder (skills/tavily-search in LichAmnesia/lich-skills) into .claude/skills/tavily-search in your project. Claude Code loads it when a task matches its description.

How do I install Tavily Web Search in Codex?

Run `npx skills add LichAmnesia/lich-skills --skill tavily-search -a codex`. Or copy the skill folder (skills/tavily-search in LichAmnesia/lich-skills) into .agents/skills/tavily-search in your project. Codex loads it when a task matches its description.

Can I use Tavily Web Search in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LichAmnesia/lich-skills --skill tavily-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tavily-search, .gemini/skills/tavily-search, .github/skills/tavily-search and .opencode/skills/tavily-search in your project.

What does Tavily Web Search need to run?

Going by SKILL.md and its folder, Tavily Web Search needs Python for the scripts in its folder, the command-line tools its instructions call (uv, curl, sh and gitleaks) and credentials named TAVILY_API_KEY and TAVILY_KEY. Our summary lists: A Tavily API key in TAVILY_API_KEY; uv to run the script.

Does Tavily Web Search access the network?

SKILL.md names 2 domains. In commands or code: astral.sh; the agent is likely to contact it when it follows the instructions. As links in the text: tavily.com. This is read from the text; nothing was executed.

Is Tavily Web Search safe to install?

Our automated static check of SKILL.md found notes only (pipes a well-known installer script into a shell), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Tavily Web Search use?

Tavily Web Search is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tavily Web Search use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tavily Web Search?

Skills that share tags, products or a category with Tavily Web Search: Tavily Web Search (allenpeng0705/EnvoyMesh, 3.1k stars), Tavily Deep Research (sandbaseai/sandbase-skills, 202 stars), Argo Search and Verification (taxueseek/argo, 186 stars) and Omk Research (KaimingWan/oh-my-kiro, 107 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tavily Web Search?

LichAmnesia (a GitHub user) maintains it in LichAmnesia/lich-skills, which has 234 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on June 9, 2026.

Source: LichAmnesia/lich-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.