hahahxx

Web Search Instant

知识管理v1.1.0
作者:hahahxx更新于 2026-05-11共 2 个版本 · 最新版本发布于 2026-02-02web-search-instant@clawhub_hahahxx/web-search-instant
信息检索摘要总结#Web Search#Search The Web

据 AlphaMoat 统计,截至 2026-09,Web Search Instant 累计下载 3,514 次、获 5 个星标,在全部 5,078 个 AI 技能中排名第 3,141 位,在「知识管理」分类(442 个)中排名第 285 位。

累计安装
136
累计下载
3,514
星标
5
全站排名
#3,141
全站前 62% · 「知识管理」前 65%
平台累计安装累计下载星标评论
ClawHub ↗1043,3155-
SkillHub ↗1363,5145—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

这是基于 DuckDuckGo Instant Answer API 的命令行查询工具,可用于快速查找事实、定义、计算和换算,无需 API 密钥。它只提供即时答案,不等同于完整网页搜索;部分查询可能没有结果,内容也可能不完整或过时,近期新闻尤其可能缺失。查询会发送给 DuckDuckGo,因此不要输入秘密、内部文本或敏感个人信息。重要或时效性强的信息应通过返回的搜索链接或其他来源核实。

资料发布于 2026-10-29

可以用来做什么

  • 快速查询定义、事实、计算或单位换算

什么时候用

  • 希望获取即时摘要或相关主题,并接受结果可能有限时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

用 DuckDuckGo Instant Answer 查询一个公开的一般性问题,并指出结果不足时应如何继续核实

月度数据趋势

累计下载3,514
2,2692,9383,6062026-03 · 累计下载 2,3612026-05 · 累计下载 2,7682026-06 · 累计下载 2,7282026-07 · 累计下载 3,1442026-08 · 累计下载 3,2902026-09 · 累计下载 3,51426-0326-09
星标5
4562026-03 · 星标 52026-05 · 星标 52026-06 · 星标 52026-07 · 星标 52026-08 · 星标 52026-09 · 星标 526-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,514—5
2026-083,290+4.6%5
2026-073,144+15.2%5
2026-062,728-1.4%5
2026-052,768—5
2026-032,361—5

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

5.6 KB · ClawHub v1.1.0
---
name: web-search
description: Web search using DuckDuckGo Instant Answer API (no API key required). Use when you need to search the web for information, definitions, calculations, conversions, or quick facts. Also use when user mentions "search", "look up", "find information", "what is", "how to", or "google something". The skill provides instant answers, definitions, abstracts, and related topics without requiring external API credentials.
---

# Web Search

Free web search using DuckDuckGo's Instant Answer API. No API key required.

## Quick Start
展开全部(共 197 行)

```bash
# Basic search
cd /home/hxx/clawd/tools && ./web-search.sh "your query"

# Examples
./web-search.sh "what is artificial intelligence"
./web-search.sh "python programming"
./web-search.sh "define recursion"
./web-search.sh "2+2"
```

## Command-Line Options

### Core Options
- `-h, --help` - Display help message with usage examples
- `--format <format>` - Output format: `text`, `markdown`, `plain` (default: `text`)
  - `text`: Colored terminal output (default)
  - `markdown`: Clean markdown format (no ANSI colors)
  - `plain`: Plain text without colors
- `--no-color` - Disable colored output (same as `--format plain`)
- `--max-related <N>` - Control number of related topics to show (default: 5)
- `--quiet` - Minimal output mode (just results, no headers/footer)

### Output to File
Use shell redirection to save results to file:

```bash
# Save to file
./web-search.sh "query" > output.txt

# With markdown format
./web-search.sh --format markdown "query" > results.md

# With no colors for logs
./web-search.sh --no-color "query" > search.log
```

## What It Returns

The tool provides several result types:

- **Answers** - Direct answers for calculations, conversions, weather, etc.
- **Abstracts** - Wikipedia-style summaries with source and URL
- **Definitions** - Word/term definitions
- **Related Topics** - Additional relevant results (configurable, 5 default)

## Best Practices

1. **Be specific** - More specific queries get better instant answers
2. **Try variations** - If no results, rephrase your query
3. **Use for facts** - Definitions, calculations, quick lookups work best
4. **Check URL** - Always provides DuckDuckGo link for full search
5. **Use appropriate format**:
   - Terminal output: `--format text` (colored, default)
   - Documentation: `--format markdown` > file.md`
   - Logs/piping: `--format plain` or `--no-color`

## Limitations

- No full web search results (only instant answers)
- Some queries return limited results depending on DuckDuckGo's data
- Character encoding issues in some abstracts (known limitation)
- Requires internet access to query DuckDuckGo API
- Not all query types return instant answers (e.g., complex math like `sqrt(144)`)
- Definitions may not always be available for all terms
- Recent news may not appear (DuckDuckGo focuses on evergreen content)

## Usage Examples

### Basic Search
```bash
# Simple query
./web-search.sh "open source AI models"

# Wikipedia-style query
./web-search.sh "what is recursion"
```

### Markdown Format
```bash
# Clean markdown output
./web-search.sh --format markdown "python programming"

# Save to markdown file
./web-search.sh --format markdown "AI research" > research.md
```

### Plain/No Color
```bash
# For logs or piping
./web-search.sh --format plain "search query"

# Disable colors explicitly
./web-search.sh --no-color "search query"
```

### Control Related Topics
```bash
# Show fewer related topics
./web-search.sh --max-related 3 "machine learning"

# Show more related topics
./web-search.sh --max-related 10 "open source"
```

### Quiet Mode
```bash
# Minimal output (just results)
./web-search.sh --quiet "what is 42 + 7"
```

### Combined Options
```bash
# Markdown, no color, saved to file
./web-search.sh --format markdown --no-color "topic" > results.md

# Quiet with custom related count
./web-search.sh --quiet --max-related 2 "definition"
```

## Tested Scenarios

Tested and verified to work:
- ✅ Calculations: `2+2`, `10% of 500`
- ✅ Conversions: `100 miles to km`
- ✅ Wikipedia queries: `what is artificial intelligence`
- ✅ Programming: `what is python`, `how to install docker`
- ✅ People: `who is Elon Musk`
- ✅ Scientific facts: `speed of light`
- ✅ Weather: `weather in Tokyo`
- ✅ Edge cases: empty queries, special characters, no results
- ✅ Output formats: text, markdown, plain
- ✅ Flags: --help, --format, --no-color, --max-related, --quiet

See [test-outputs.md](test-outputs.md) for detailed test results.

## Troubleshooting

### "No direct results found"
Try rephasing your query or using the provided DuckDuckGo URL for full search.

### Network errors
Check internet connection. Tool requires network access.

### Character encoding issues
Some abstracts display garbled characters. This is a known issue with basic parsing (install `jq` for better results).

### "jq not found" warning
The tool works without `jq` using basic text extraction, but installing `jq` improves JSON parsing:
```bash
# Ubuntu/Debian
sudo apt-get install jq

# macOS
brew install jq

# Via package managers
npm install -g jq
```

## Output Format

### Text Format (default)
- **Blue** - Headers and search info
- **Green** - Result markers and content
- **Yellow** - Sources, URLs, and warnings
- **Red** - Errors

Use `--format plain` or `--no-color` to disable colors.

### Markdown Format
Clean markdown with:
- `##` headers for sections
- `**bold**` for emphasis
- `-` bullet lists
- `*italics*` for metadata
- `[links]()` for URLs

### Plain Format
No ANSI codes or markdown formatting - suitable for logs and piping.

## Requirements

- `curl` or `wget` (for HTTP requests)
- Optional: `jq` (for better JSON parsing)

「知识管理」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。