Add skill definitions (SKILL.md + run.py) for all agent tools

This commit is contained in:
2026-04-07 20:35:56 +00:00
parent 42870c7c1f
commit 4483b585a7
8 changed files with 187 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
---
name: web_search
description: Search the web using SearXNG. Returns titles, URLs, and snippets for the top results. Use this when you need current information or facts you're unsure about.
parameters:
query:
type: string
description: The search query
required: true
num_results:
type: integer
description: Number of results to return (default 5)
required: false
---

32
skills/web_search/run.py Normal file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env python3
import sys
import json
import urllib.request
import urllib.parse
args = json.loads(sys.stdin.read())
query = args.get("query", "")
num_results = args.get("num_results", 5)
searx_url = args.get("_searx_url", "https://searx.mymx.me")
try:
params = urllib.parse.urlencode({"q": query, "format": "json"})
req = urllib.request.Request(
f"{searx_url}/search?{params}",
headers={"User-Agent": "fireclaw-agent"},
)
with urllib.request.urlopen(req, timeout=15) as resp:
data = json.loads(resp.read())
results = data.get("results", [])[:num_results]
if not results:
print("No results found.")
else:
lines = []
for r in results:
title = r.get("title", "")
url = r.get("url", "")
snippet = r.get("content", "")[:150]
lines.append(f"- {title}\n {url}\n {snippet}")
print("\n".join(lines))
except Exception as e:
print(f"[search error: {e}]")