Search the web for information with structured results, source ranking, and result caching.
Usage
import { WebSearchSkill } from '@openclaw/web-search';
const search = new WebSearchSkill({ enableCache: true });
// Basic search
const results = await search.search('TypeScript best practices');
// Search with options
const results = await search.search('machine learning tutorial', {
numResults: 10,
safeSearch: true
});
// Get cached results
const cached = await search.getCachedResults('query');
// Clear old cache
await search.clearCache(7); // Clear entries older than 7 days
CLI
# Search the web
npx web-search search "query"
# Search with options
npx web-search search "query" --num 10 --safe
# View cache
npx web-search cache
# Clear cache
npx web-search clear-cache --days 7
# Health check
npx web-search health
Configuration
Optional environment variables:
SERPER_API_KEY - Use Serper.dev API for better results (optional, falls back to scraping)
Features
Web search with structured results (title, URL, snippet, source)
Source ranking by relevance
Result caching in SQLite
Safe search filtering
Configurable number of results
1---2name: web-search3description: Web Search Skill4---56# Web Search Skill78Search the web for information with structured results, source ranking, and result caching.910## Usage1112```typescript13import { WebSearchSkill } from '@openclaw/web-search';1415const search = new WebSearchSkill({ enableCache: true });1617// Basic search18const results = await search.search('TypeScript best practices');1920// Search with options21const results = await search.search('machine learning tutorial', {22 numResults: 10,23 safeSearch: true24});2526// Get cached results27const cached = await search.getCachedResults('query');2829// Clear old cache30await search.clearCache(7); // Clear entries older than 7 days31```3233## CLI3435```bash36# Search the web37npx web-search search "query"3839# Search with options40npx web-search search "query" --num 10 --safe4142# View cache43npx web-search cache4445# Clear cache46npx web-search clear-cache --days 74748# Health check49npx web-search health50```5152## Configuration5354Optional environment variables:55- `SERPER_API_KEY` - Use Serper.dev API for better results (optional, falls back to scraping)5657## Features5859- Web search with structured results (title, URL, snippet, source)60- Source ranking by relevance61- Result caching in SQLite62- Safe search filtering63- Configurable number of results
Run npx skillmds@latest add ticruz38/web-search in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Web Search Skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ticruz38 (@ticruz38) published this skill. Their other Agent Skills are listed on their SkillMD profile.