Add searxng skill with portable configuration

This commit is contained in:
Stefano Fiorini
2026-03-08 20:34:29 -05:00
parent 0324ef0810
commit ae90cda182
11 changed files with 828 additions and 0 deletions

46
skills/searxng/SKILL.md Normal file
View File

@@ -0,0 +1,46 @@
---
name: searxng
description: Search the web through a local or self-hosted SearXNG instance. Use when you want privacy-respecting web, image, video, or news search without external search API keys, via scripts/searxng.py.
---
# SearXNG Search
Use `scripts/searxng.py` to run searches against a SearXNG instance.
## Requirements
Required runtime:
- `python3`
- Python packages: `httpx`, `rich`
Configuration lookup order:
1. `SEARXNG_URL` environment variable
2. workspace `.clawdbot/credentials/searxng/config.json` found by walking upward from the script location
3. `~/.clawdbot/credentials/searxng/config.json`
4. fallback: `http://localhost:8080`
Config file shape if used:
```json
{
"url": "https://search.example.com"
}
```
## Usage
Examples:
```bash
python3 scripts/searxng.py search "OpenClaw" -n 5
python3 scripts/searxng.py search "latest AI news" --category news -n 10
python3 scripts/searxng.py search "cute cats" --category images --format json
python3 scripts/searxng.py search "rust tutorial" --language en --time-range month
```
## Notes
- Uses the SearXNG JSON API endpoint at `<SEARXNG_URL>/search`.
- HTTPS certificate verification is disabled in the current script for compatibility with local/self-signed instances.
- If connection fails, the script prints the URL it attempted.
- `--format json` is best for programmatic use; table output is best for humans.