ddg-search

ddg-search is a skill for Claude Code, Codex from id5463/mcp-server-research. It costs 46 tokens per session (1,240 once invoked), scanned A, original, MIT.

A search tool that uses DuckDuckGo through the Python ddgs package. It can search the web for text, news, images, and videos.

In plain words
What is it for?
Use it for general web searches, recent news searches, and searches for image or video results, provided Python and ddgs are installed.
Why use it?
It gives a coding agent a way to find current information without relying on a manually opened search page.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it for general web searches, recent news searches, and searches for image or video results, provided Python and ddgs are installed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/id5463/mcp-server-research/ddg-search
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add id5463/mcp-server-research --skill ddg-search
Clone the repo
git clone --depth 1 https://github.com/id5463/mcp-server-research

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ddg-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/id5463/mcp-server-research/ddg-search/github.svg)](https://agentmods.dev/skills/id5463/mcp-server-research/ddg-search)
Your own site
<a href="https://agentmods.dev/skills/id5463/mcp-server-research/ddg-search"><img src="https://agentmods.dev/badge/skills/id5463/mcp-server-research/ddg-search/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ddg-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/id5463/mcp-server-research/ddg-search"><img src="https://agentmods.dev/badge/skills/id5463/mcp-server-research/ddg-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,240 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01240
Opus 5 $0.00023 $0.00620
Sonnet 5 $0.00009 $0.00248
Haiku 4.5 $0.00005 $0.00124

Measured 9d ago against content hash f4114bfc0f68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ddg-search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/ddgs_search.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/research/ddg-search/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DuckDuckGo 搜索技能

通过 ddgs Python 包执行 DuckDuckGo 搜索(文本、新闻、图片、视频)。

前置条件

  • Python 3.8+ 已安装
  • ddgs 包已安装:
    pip install ddgs
    
    或用系统 Python 安装:
    "C:/Users/a/AppData/Local/Programs/Python/Python313/python.exe" -m pip install ddgs
    

验证安装

python -c "from ddgs import DDGS; print('ddgs OK')"

如果失败,检查 Python 路径:

where python
python --version

使用方法

方法 A:使用辅助脚本(推荐)

python "C:\Users\a\.agents\skills\research\ddg-search\scripts\ddgs_search.py" text "你的搜索关键词" --max 10
python "C:\Users\a\.agents\skills\research\ddg-search\scripts\ddgs_search.py" news "最新新闻" --max 5 --timelimit w
python "C:\Users\a\.agents\skills\research\ddg-search\scripts\ddgs_search.py" images "猫咪" --max 5

方法 B:Python 内联脚本

写一个 .py 临时脚本文件执行(不要用 -c 参数,会被审批系统拦截):

# 写入临时文件 search_temp.py
from ddgs import DDGS

queries = ["关键词1", "关键词2"]

for q in queries:
    print(f"\n搜索: {q}")
    with DDGS() as ddgs:
        for r in ddgs.text(q, max_results=5):
            print(f"[{r['title']}]")
            print(f"    URL: {r['href']}")
            print(f"    {r.get('body', '')[:200]}")
python search_temp.py

方法 C:命令行 ddgs CLI(如果已安装)

# 文本搜索
ddgs text -k "搜索关键词" -m 5

# 新闻搜索(-t w = 本周, -t m = 本月)
ddgs news -k "关键词" -m 5 -t w

# JSON 输出
ddgs text -k "关键词" -m 5 -o json

搜索类型

类型 方法 适用场景
text ddgs.text() 通用网页搜索
news ddgs.news() 最新新闻和动态
images ddgs.images() 图片搜索
videos ddgs.videos() 视频搜索

参数说明

参数 说明 默认值
max_results 返回结果数量 10
region 区域 (wt-wt = 全球, cn-zh = 中国) wt-wt
timelimit 时间限制 (d=天, w=周, m=月, y=年) 无限制
safesearch 安全搜索 (on, moderate, off) moderate

常见问题与处理

问题 1:搜索结果为空

  • 尝试换同义词或更简洁的关键词
  • 检查网络连接和代理设置
  • 减少 max_results 数量

问题 2:SSL/连接错误

  • 可能在 Winodws Git Bash 中有代理问题
  • 尝试在纯 PowerShell 中执行
  • 检查 VPN/代理是否开启

Read the full file on GitHub · 140 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 140 lines · 46 tokens per session scan A f4114bfc0f68

Subscribe to this mod's changes

ddg-search is a skill published in the GitHub repository id5463/mcp-server-research (0 stars, last pushed 2mo ago), licensed MIT. It adds 46 tokens to every session and 1,240 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens