web-search
Web Search Skill
Search the web. Prefer the built-in WebSearch tool — it uses a real browser engine with high success rate. Fall back to curl only if WebSearch is unavailable.
DuckDuckGo Instant Answer API (No API key needed)
# Basic search — returns instant answers
curl -s "https://api.duckduckgo.com/?q=QUERY&format=json&no_html=1" | jq '.Abstract, .RelatedTopics[:5]'
DuckDuckGo HTML Search (Full results)
# Get search results page and extract links
curl -s "https://html.duckduckgo.com/html/?q=QUERY" | grep -o 'href="https\{0,1\}://[^"]*' | head -10
Google Search via SerpAPI (if API key available)
# Check if SERPAPI_KEY is set
alma config get serpapi.apiKey
# If available:
curl -s "https://serpapi.com/search.json?q=QUERY&api_key=API_KEY" | jq '.organic_results[:5] | .[] | {title, link, snippet}'
Fetching Page Content
After finding URLs from search, use the WebFetch tool to get the actual page content:
WebFetch(url="https://example.com/article")
Or via curl:
curl -sL "https://example.com/article" | head -200
Tips
- URL-encode the query: replace spaces with
+or%20 - Use
jqto parse JSON responses - For complex queries, try multiple search approaches
- Always summarize findings for the user rather than dumping raw results
- If DuckDuckGo doesn't have good results, try fetching specific known sources directly
Examples
"最近的 AI 新闻":
curl -s "https://html.duckduckgo.com/html/?q=latest+AI+news+2026" | grep -o 'href="https\{0,1\}://[^"]*' | grep -v duckduckgo | head -5
"Python 3.13 新特性":
curl -s "https://api.duckduckgo.com/?q=python+3.13+new+features&format=json&no_html=1" | jq '.Abstract'
More from naohainezha/skill
reactions
React to the user's Telegram message with an emoji. Use when the message evokes a genuine emotional response.
28self-reflection
Daily self-reflection and personal growth. Triggered by heartbeat at end of day. Review the day's experiences, extract lessons, update personality, and write a diary entry.
6voice
Send voice messages (TTS) to the user via Telegram. Use when replying to voice messages or when a voice reply feels natural.
3scheduler
Create, manage, and delete scheduled tasks (cron jobs) and configure heartbeat. Use when users ask for reminders, recurring tasks, daily summaries, periodic checks, or anything time-based. Also manages HEARTBEAT.md for periodic awareness checks.
3thread-management
Manage chat threads — create, list, switch, delete, and search conversations. Use when users want to organize their chats.
3memory-management
Search and manage Alma's memory and conversation history. Use when the user asks about past conversations, personal facts, preferences, or anything that requires recalling information ("你知道我...吗", "我们之前聊过...", "你还记得...", "帮我找之前说的..."). Also used to store new memories and search through archived chat threads.
3