Agent Skills
› rcarmo/piclaw
› web-search
web-search
GitHub提供网页搜索及页面内容抓取功能,支持SearXNG和DuckDuckGo,可将搜索结果或网页转换为Markdown格式。
Trigger Scenarios
需要获取最新网络信息
需要检索特定主题的网页内容
Install
npx skills add rcarmo/piclaw --skill web-search -g -y
SKILL.md
Frontmatter
{
"name": "web-search",
"description": "Search the web via SearXNG (or DuckDuckGo fallback) and optionally fetch result pages as raw Markdown content.",
"distribution": "public"
}
Web Search
Use this when you need search results and fetched page content.
If you only need short summaries, use web-search-summary.
Search engine selection
- If
PICLAW_SEARX_URLis set or--searx-urlis passed, the script uses SearXNG. - Otherwise, it falls back to DuckDuckGo HTML search (no API key required).
Examples
Search only:
bun /workspace/.pi/skills/web-search/web-search.ts --query "your query"
Fetch top results and convert them to Markdown:
bun /workspace/.pi/skills/web-search/web-search.ts --query "your query" --fetch true --fetch-limit 2
Output shape
The script prints JSON like:
{
"query": "...",
"searxUrl": "http://.../search",
"limit": 5,
"fetch": true,
"results": [
{
"title": "...",
"url": "https://...",
"content": "snippet or fetched markdown"
}
]
}
- Without
--fetch,results[].contentis the search-result snippet when available. - With
--fetch, fetched items replacecontentwith converted Markdown.
Failure behaviour
- If the search request fails, the script exits non-zero.
- If page fetch fails for an individual result, the search still succeeds and that item gets
content: "Failed to fetch: ...".
Options
--query/--q— required search query--limit— number of search results to return (default5)--fetch— fetch and convert result pages (true/1)--fetch-limit— how many results to fetch and convert (default2)--searx-url— override the SearXNG endpoint (env:PICLAW_SEARX_URL; falls back to DuckDuckGo if unset)--timeout— fetch timeout in milliseconds (default15000)
Notes
- HTML conversion uses
turndown+linkedom. - The converter prefers
<article>,<main>, or[role='main']when present.
Version History
- 5fa0ce5 Current 2026-07-25 10:26


