← Back to all skills

productivity / Work & communicate

web-search

Search the internet with Google or DuckDuckGo, inspect results, and extract selected pages as readable Markdown.

Markdown workflowYou or your agent

Put it to work.

Ask your agent to use web-search, or let it load the skill when your task matches the description.

Use the web-search skill [query or URL]

Invocation syntax varies by agent. Use the skill name in your prompt, or your agent’s supported slash command.

About this skill

Give coding agents free local web search through the browser already installed on your machine.

The skill keeps a headless browser available as a local daemon, uses real search engines, and lets agents visit selected results. Pages are rendered with JavaScript, reduced to readable content, and returned as clean Markdown for efficient agent context. Using a real, persistent browser also reduces bot-detection failures compared with ordinary HTTP requests.

flowchart LR
  query[Query or URL] --> cli[web-search.js]
  cli --> daemon[Browser daemon]
  daemon --> search[Google or DuckDuckGo]
  search --> results[Result set ID]
  results --> fetch[Fetch selected pages]
  fetch --> markdown[Readable Markdown]

Install

bash
npx skills@latest add smeltery/skills --skill web-search

The agent installs dependencies with Bun when needed. Node.js 20.19 or newer and a Chromium-family browser are required.

What it provides

  • Search through Google with a DuckDuckGo fallback
  • Visit individual search results or arbitrary URLs
  • Render JavaScript-heavy pages before extraction
  • Return readable Markdown instead of raw HTML
  • Reuse a warm local browser daemon across requests
  • Reduce failures on sites that reject basic HTTP fetchers

CLI

bash
./web-search.js "query"
./web-search.js "query" -n 10
./web-search.js --from <result-set-id> --fetch 1,3,5
./web-search.js --url https://example.com
./web-search.js --url https://example.com --full

Configuration

Variable Purpose Default
WEB_SEARCH_BROWSER_BIN Override the browser executable Auto-detected
WEB_SEARCH_USER_AGENT Override the browser user agent Browser-derived
WEB_SEARCH_DAEMON_PORT Local daemon port 9377
WEB_SEARCH_CDP_PORT Chrome DevTools port 9225
WEB_SEARCH_DEBUG_DUMP Save debugging artifacts after failures Disabled

The CLI supports Linux, macOS, and Windows and detects Chrome, Brave, Edge, or Chromium in common installation locations.

License

MIT

Read the full SKILL.md

Web Search

Use the bundled CLI to search through a local browser, visit results, and extract pages as clean Markdown for agent context. The persistent browser daemon reduces bot-detection failures and avoids repeated browser startup costs.

The entry point is {baseDir}/web-search.js, where {baseDir} is the absolute directory containing this SKILL.md. Always invoke that absolute path. Never run ./web-search.js from the caller's project directory.

Setup

If dependencies are missing, run bun install in the skill directory.

The CLI auto-detects Chromium-family browsers. Override detection with WEB_SEARCH_BROWSER_BIN or --browser-bin <path>.

Search and fetch

bash
{baseDir}/web-search.js "query"
{baseDir}/web-search.js "query" -n 10
{baseDir}/web-search.js --from <result-set-id> --fetch 1,3,5
{baseDir}/web-search.js --url https://example.com
{baseDir}/web-search.js --url https://example.com --full

Each search prints a result-set ID. Always pass that ID with --from when fetching numbered results; result sets expire after ten minutes. Use --full only when the complete page text is needed.

Browser daemon

Direct calls use a local daemon by default for a warm browser session.

bash
{baseDir}/web-search.js --daemon status
{baseDir}/web-search.js --daemon start
{baseDir}/web-search.js --daemon stop
{baseDir}/web-search.js --daemon restart
{baseDir}/web-search.js --no-daemon --url https://example.com

Troubleshooting

Treat one blocked page as a normal site-specific failure. Retry once, use another result, or try the direct URL before changing browser state.

For repeated timeouts, daemon errors, or blocks across multiple attempts:

  1. Check {baseDir}/web-search.js --daemon status.
  2. Run {baseDir}/web-search.js --daemon restart and retry.
  3. If blocks persist, inspect health.profileDir in the status output. Stop the daemon, delete only that hidden skill profile directory, then start the daemon again. This resets stale cookies and browser storage without touching the user's normal browser profile.

Never clear the profile after a single block. Profile reset is a last resort for persistent failures.

Reporting

Use the URLs actually searched or fetched as sources. Cite those URLs when answering from web material.

The Smeltery library

Find your next step.

Good places to start

smeltery / skills

A little direction goes a long way

What’s next?