web-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWeb Search
网页搜索
This skill uses — a command-line search tool that returns DuckDuckGo results as plain text or JSON. It's built for LLM agents: plain text output is compact (title, URL, snippet per result) and the flags let you control time, region, site, and count.
duckduckgo-cli本技能使用——一款命令行搜索工具,可将DuckDuckGo的搜索结果以纯文本或JSON格式返回。它专为LLM Agent设计:纯文本输出简洁紧凑(每条结果包含标题、URL和摘要片段),通过参数可控制搜索的时间范围、地区、站点和结果数量。
duckduckgo-cliWhen to reach for this
适用场景
- The user asks about something recent ("latest", "today", "current", a year at or past your knowledge cutoff)
- A claim needs verification
- Documentation, references, or external context is needed
- The user asks to search, look up, find out, research, or check something
- You're answering a factual question and you're not sure your knowledge is current
Once you're already in a conversation, you don't need explicit permission — just search.
- 用户询问近期相关内容(如“最新”“今日”“当前”,或涉及模型知识 cutoff 时间之后的年份)
- 需要验证某个主张
- 需要获取文档、参考资料或外部背景信息
- 用户要求进行搜索、查询、查明、研究或核实某件事
- 你在回答事实类问题,但不确定自身知识是否为最新状态
在对话过程中,无需用户明确许可,直接进行搜索即可。
Command
命令
The CLI is invoked as (a short alias for ).
ddgduckduckgo-clish
ddg rust async tutorial # plain text, default 10 results
ddg -n 5 "best Rust web framework 2026"
ddg --json -n 5 "topic" # JSON envelope, for parsing
echo "tokio runtime overhead" | ddg # query via stdinPlain text is the default and the right choice for most uses — it's compact and you can quote URLs and snippets straight out of it.
该命令行工具可通过别名调用(的简写)。
ddgduckduckgo-clish
ddg rust async tutorial # plain text, default 10 results
ddg -n 5 "best Rust web framework 2026"
ddg --json -n 5 "topic" # JSON envelope, for parsing
echo "tokio runtime overhead" | ddg # query via stdin纯文本是默认输出格式,也是大多数场景的首选——它简洁紧凑,你可以直接引用其中的URL和摘要片段。
Flags worth knowing
实用参数说明
-n <N>-t <d|w|m|y>-w <DOMAIN>-w docs.python.org-r <CODE>us-enkr-kojp-jpde-deddg --list-regions--json--page <N>-n <N>-t <d|w|m|y>-w <DOMAIN>-w docs.python.org-r <CODE>us-enkr-kojp-jpde-deddg --list-regions--json--page <N>Patterns
使用模式
Quick fact lookup
快速事实查询
sh
ddg -n 3 "current ceo of openai"Three results is enough to triangulate a consensus answer.
sh
ddg -n 3 "current ceo of openai"三条结果足以通过交叉验证得出一致答案。
Latest news / recent updates
最新新闻/近期动态
sh
ddg -n 5 -t w "anthropic claude release"The filter is what makes this useful — without it you'll get older articles that rank well.
-t wsh
ddg -n 5 -t w "anthropic claude release"-t wDocumentation
文档查询
sh
ddg -n 5 -w docs.python.org "asyncio gather exception"sh
ddg -n 5 -w docs.python.org "asyncio gather exception"Fact-check a specific claim
事实核查特定主张
sh
ddg -n 5 "the exact phrasing of the claim"Read snippets carefully. If sources disagree, surface that to the user — don't pick one and present it as fact.
sh
ddg -n 5 "the exact phrasing of the claim"仔细阅读摘要片段。如果来源之间存在分歧,需向用户说明这一点——不要随意选择一个来源并将其表述为事实。
Broader research
深度研究
Run several focused queries rather than one giant one. Three queries on different angles beat one .
-n 10-n 30执行多个针对性查询,而非一个宽泛的查询。从不同角度进行三次的查询效果优于一次的查询。
-n 10-n 30Reading the output
结果解读
Each result has a position, title, URL, and a short snippet. The snippet is usually enough to decide whether to fetch the page in full with . When citing to the user, include the URL so they can verify; if you only have a snippet, say "from the search snippet..." rather than implying you read the whole page.
WebFetch每条结果包含序号、标题、URL和简短摘要。通常通过摘要即可判断是否需要使用获取完整页面内容。向用户引用内容时,需附上URL供其验证;如果仅使用了摘要片段,需说明“来自搜索摘要……”,而非暗示你已阅读完整页面。
WebFetchGotchas
注意事项
- Rate limits: in mode the response includes
--json. If it hits 0, back off — don't fire more queries in a tight loop.meta.rate_limit.tokens_remaining - No instant answer is normal — most queries just return the numbered list.
- Region must match language — a Korean query with will return weaker results; use
-r us-en.-r kr-ko - Don't pipe to to truncate — use
headinstead, otherwise a result may get chopped mid-snippet.-n - If the binary isn't installed, install with or
npm i -g duckduckgo-cli.cargo install duckduckgo-cli
- 速率限制:在模式下,响应结果包含
--json字段。当该值为0时,需暂停查询——不要在短时间内连续发起更多请求。meta.rate_limit.tokens_remaining - 无即时答案是正常现象——大多数查询只会返回编号列表形式的结果。
- 地区需与语言匹配——如果用韩语查询却设置,结果质量会很差;应使用
-r us-en。-r kr-ko - 不要通过管道符截断结果——请使用
head参数,否则可能会截断摘要片段的内容。-n - 如果未安装该工具,可通过或
npm i -g duckduckgo-cli命令进行安装。cargo install duckduckgo-cli