Agent Skills
› zzatpku/AgentFactory
› google_search
google_search
GitHub通过 Serper API 执行 Google 搜索,返回标题、URL 和简短摘要。用于快速检索网络信息,建议结合 read_url_jina 获取完整内容以补充细节。
Trigger Scenarios
需要查询互联网上的最新信息或事实
寻找特定主题的网页链接和简介
作为前置步骤为读取完整页面做准备
Install
npx skills add zzatpku/AgentFactory --skill google_search -g -y
SKILL.md
Frontmatter
{
"name": "google_search",
"description": "Search the internet via Google (Serper API). Returns only titles, URLs, and short snippets. Use read_url_jina to get full page content."
}
Search Tool
search_serper: High-quality search using Google via Serper API. Returns web page title, url and a short snippet.
Usage
from tools import search_serper
results = search_serper(query, topk=10)
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| query | str | required | The search query string |
| topk | int | 10 | Number of top results to return |
Returns
Returns a list of dictionaries directly:
[
{
"title": "web page title",
"link": "web page url",
"snippet": "brief snippet, NOT the full content...",
},
...
]
Or on error:
[{"error": "error message"}]
Note: The snippet field is a very short excerpt, NOT the full page content. It may miss critical information. Always use read_url_jina to retrieve the full page content for any relevant result.
Example
from tools import search_serper
# Search for information about a topic
results = search_serper("capital of France", topk=3)
# Process results
for doc in results:
if "error" in doc:
print(f"Error: {doc['error']}")
break
print(f"Doc title: {doc['title']}")
print(f"url: {doc['link']}")
print(f"snippet: {doc['snippet']}...")
print("---")
Tips
- Use specific, descriptive queries for better results
- Start with topk around 10 and adjust if needed
- Check the score to gauge relevance
- The
snippetfield is a brief excerpt, NOT the full content - it may miss critical information - Always use
read_url_jinato get the full page content for any relevant result - do NOT rely solely on the snippet from search - Check for errors in the first result
Version History
- df92287 Current 2026-07-25 08:38


