ddg-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseddg-search
ddg-search
Use the local skill script for lightweight DuckDuckGo search.
This skill exists to make fallback web search simple and low-noise instead of rebuilding ad hoc search helpers each time.
使用本地skill脚本实现轻量级DuckDuckGo搜索。
本skill的作用是简化备选网页搜索流程、降低冗余,无需每次都临时构建搜索辅助工具。
Quick rules
快速规则
- Prefer your normal primary search tool when it is healthy.
- Use this skill when you need a fallback or a second source.
- Keep searches narrow and intentional.
- Prefer JSON output by default.
- Use only when human-readable terminal output is actually more useful.
--text - Use for quick guidance on when this tool fits.
references/notes.md
- 当常规主搜索工具正常运行时优先使用它。
- 当你需要备选方案或第二搜索源时使用本skill。
- 保持搜索范围精准、目的明确。
- 默认优先使用JSON输出。
- 仅当人类可读的终端输出确实更实用时才使用参数。
--text - 如需快速了解本工具的适用场景,请参考。
references/notes.md
Local setup
本地配置
Prefer the skill-local script and a skill-local virtual environment over any global CLI install.
Treat as generated local state, not part of the skill itself.
If the installer drops skill-local dotfiles, the bootstrap script recreates automatically.
.venv.gitignoreBootstrap the local environment:
bash
<skill-path>/scripts/bootstrap_venv.shAfter bootstrap, use:
bash
<skill-path>/scripts/ddg-searchIf is missing later, just run the bootstrap script again.
.venv优先使用skill本地脚本和skill本地虚拟环境,不要进行全局CLI安装。
将视为生成的本地状态,不属于skill本身的一部分。
如果安装程序生成了skill本地的点文件,启动脚本会自动重建。
.venv.gitignore初始化本地环境:
bash
<skill-path>/scripts/bootstrap_venv.sh初始化完成后,使用如下命令:
bash
<skill-path>/scripts/ddg-search如果后续丢失,只需重新运行初始化脚本即可。
.venvCommands
命令
Show built-in help
查看内置帮助
bash
<skill-path>/scripts/ddg-search helpbash
<skill-path>/scripts/ddg-search helpText search
文本搜索
bash
<skill-path>/scripts/ddg-search search 'openclaw github'bash
<skill-path>/scripts/ddg-search search 'openclaw github'News search
新闻搜索
bash
<skill-path>/scripts/ddg-search search 'bitcoin etf' --type news --timelimit d --max-results 10bash
<skill-path>/scripts/ddg-search search 'bitcoin etf' --type news --timelimit d --max-results 10Image search
图片搜索
bash
<skill-path>/scripts/ddg-search search 'bitcoin logo' --type images --max-results 10bash
<skill-path>/scripts/ddg-search search 'bitcoin logo' --type images --max-results 10Video search
视频搜索
bash
<skill-path>/scripts/ddg-search search 'openai launch' --type videos --timelimit w --max-results 10bash
<skill-path>/scripts/ddg-search search 'openai launch' --type videos --timelimit w --max-results 10Restrict to one site
限制搜索单个站点
bash
<skill-path>/scripts/ddg-search search 'python dataclasses' --site docs.python.orgbash
<skill-path>/scripts/ddg-search search 'python dataclasses' --site docs.python.orgReverse result order
反转结果顺序
bash
<skill-path>/scripts/ddg-search search 'openai launch' --type videos --max-results 10 --reversebash
<skill-path>/scripts/ddg-search search 'openai launch' --type videos --max-results 10 --reverseInstant-answer lookup
即时答案查询
bash
<skill-path>/scripts/ddg-search instant 'weather berlin'bash
<skill-path>/scripts/ddg-search instant 'weather berlin'Resolve a DuckDuckGo bang
解析DuckDuckGo bang指令
bash
<skill-path>/scripts/ddg-search bang w 'OpenAI'bash
<skill-path>/scripts/ddg-search bang w 'OpenAI'Workflow
工作流
- Read if you want quick selection guidance.
references/notes.md - Ensure the skill-local virtual environment is bootstrapped.
- Use for normal search,
searchfor instant-answer lookups, andinstantwhen a DuckDuckGo bang is the cleanest path.bang - Parse JSON output by default.
- Cross-check with another source when the question is important.
- 如果你需要快速的选择指引,可以先阅读。
references/notes.md - 确保skill本地虚拟环境已完成初始化。
- 普通搜索使用命令,即时答案查询使用
search命令,当使用DuckDuckGo bang是最优路径时使用instant命令。bang - 默认解析JSON输出。
- 如果问题很重要,请和其他来源的结果交叉验证。
Expected outputs
预期输出
The tool returns JSON by default. Parse it instead of scraping text.
Use when you want a readable terminal view.
--text- returns query metadata plus
searchresults - returns instant-answer style structured fields
instant - returns the DuckDuckGo URL plus the resolved redirect/final URL
bang
本工具默认返回JSON格式,请直接解析JSON而不是抓取文本。
当你需要可读的终端视图时使用参数。
--text- 返回查询元数据加上
search结果集results - 返回即时答案风格的结构化字段
instant - 返回DuckDuckGo URL加上解析后的重定向/最终URL
bang
Files
文件
- Source repo:
https://github.com/ropl-btc/ddg-search-cli - Launcher:
scripts/ddg-search - Python implementation:
scripts/ddg_search.py - Local bootstrap:
scripts/bootstrap_venv.sh - Notes:
references/notes.md - is generated local state and can be recreated with
.venv/scripts/bootstrap_venv.sh
- 源码仓库:
https://github.com/ropl-btc/ddg-search-cli - 启动器:
scripts/ddg-search - Python实现:
scripts/ddg_search.py - 本地初始化脚本:
scripts/bootstrap_venv.sh - 说明文档:
references/notes.md - 是生成的本地状态,可通过
.venv/重新创建scripts/bootstrap_venv.sh
When to stop and ask
停止操作并询问的场景
Stop and ask before:
- turning this into browser automation
- adding scraping-heavy flows
- adding provider-specific hacks that make the wrapper fragile
- changing default behavior from lightweight fallback search to something much broader
出现以下情况前请先停止操作并询问:
- 将本工具改造成浏览器自动化工具
- 加入重度抓取流程
- 添加特定于提供商的hack逻辑,导致包装器变得脆弱
- 将默认行为从轻量级备选搜索改为更广泛的其他功能