一键导入
search-web-via-searxng
Override Claude Code's built-in WebSearch tool to route web searches through a self-hosted SearXNG instance via curl instead
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Override Claude Code's built-in WebSearch tool to route web searches through a self-hosted SearXNG instance via curl instead
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Interact with the Fizzy kanban tool via its REST API. Use this skill whenever the user wants to read or modify anything in Fizzy — listing boards, finding or creating cards, moving cards between columns, closing cards, adding comments, checking activity, managing tags, or any other Fizzy operation. Trigger on requests like "show me my Fizzy boards", "create a card for X", "what's in the backlog?", "move card
Interact with a self-hosted Gitea instance via its REST API. Use this skill whenever the user wants to do anything with Gitea — creating or updating pull requests, checking PR status, listing branches, reading commit history, merging PRs, adding PR comments, or reading/writing wiki pages. Trigger on requests like "update the PR description", "what PRs are open?", "merge the PR", "what branches exist?", "add a comment to the PR", "what's the latest commit on main?", "add a wiki page for X", "what does the wiki say about Y", "update the wiki", or any time the user mentions a PR number, a repo wiki, or asks about repo state on Gitea.
Interact with a self-hosted Grist instance via its REST API. Use this skill whenever the user wants to read or modify data in Grist — listing orgs/workspaces/docs, finding tables and columns, querying or filtering records, adding/updating/deleting rows, running read-only SQL against a doc, or managing table schema. Trigger on requests like "what's in my Grist doc", "add a row to the Inventory table", "update the status column for record 12", "run a query against my budget doc", "what tables are in this workspace", or any mention of Grist docs, tables, or records.
Add a new LXC guest to the homelab across both terraform and ansible repos
Create, increment (bump), and read counters using the Bumpkit API at bumpkit.tphummel.workers.dev. Use when you need a persistent named counter that can be incremented and queried by ID.
Use fd, rg, fzf, and bat as modern replacements for find, grep, interactive selection, and cat. Prefer these tools for faster, friendlier, and more ergonomic file searching, content searching, fuzzy filtering, and file viewing.
| name | search-web-via-searxng |
| description | Override Claude Code's built-in WebSearch tool to route web searches through a self-hosted SearXNG instance via curl instead |
| argument-hint | ["searxng-url"] |
You are configuring Claude Code to stop using its built-in WebSearch tool and
instead search the web by curling a self-hosted SearXNG instance: $ARGUMENTS
(e.g. https://searxng.example.com). If no URL was given, ask the user for
their SearXNG instance URL before doing anything else.
There is no native setting to redirect WebSearch itself — it's an
Anthropic-managed tool with no config hook. The approach is: deny the built-in
tool via permissions, and teach Claude to curl SearXNG directly as a
replacement. This is much lighter than standing up an MCP server for it.
SearXNG's JSON output format is disabled by default (format=json returns a
plain 403 Forbidden, not a JSON error body — don't mistake this for an auth
problem).
curl -s -o /dev/null -w "%{http_code}\n" "$ARGUMENTS/search?q=test&format=json"
200 → JSON is already enabled, skip to Step 3.403 → JSON format needs to be enabled server-side first (Step 2).Find the instance's settings.yml (for this homelab, check the Ansible repo
first: rg -l searxng ~/Code/*/ansible* 2>/dev/null, then look for a
copy: content: block that writes /opt/searxng/settings.yml). Add a
search.formats list including json alongside html:
search:
formats:
- html
- json
If the instance is deployed via ansible-pull + systemd timers (the pattern
used in this homelab — see the gitea or new-homelab-guest skills for
repo conventions):
ssh <guest-hostname> 'systemctl start ansible-pull.service'
ssh <guest-hostname> 'until ! systemctl is-active --quiet ansible-pull.service; do sleep 3; done; systemctl show ansible-pull.service -p Result,ExecMainStatus'
Result=success / ExecMainStatus=0 means it applied cleanly. If it
restarts the container, the service may be briefly unavailable.Re-run the Step 1 curl to confirm 200 before moving on.
Add to ~/.claude/settings.json (create it if it doesn't exist — note the
Write tool requires reading a file before overwriting it, so Read first
even if you expect it to be missing):
{
"permissions": {
"deny": ["WebSearch"],
"allow": ["Bash(curl:*<searxng-host>*)"]
}
}
Merge with any existing permissions rather than clobbering them. Use the instance's actual host in the allow pattern so curl calls to it don't prompt every time.
Append to ~/.claude/CLAUDE.md:
To search the web, use curl against my SearXNG instance instead of WebSearch (which is disabled):
curl -s "$ARGUMENTS/search?q=<query>&format=json" | jq '.results[] | {title, url, content}'
URL-encode the query. Use this whenever you'd otherwise reach for WebSearch.
curl -s "$ARGUMENTS/search?q=claude+code&format=json" | jq '.results[] | {title, url, content}'
Confirm it returns real, well-formed results (not an empty results array —
if empty, check unresponsive_engines in the raw JSON for upstream engine
failures, which is a SearXNG-side issue unrelated to this setup).
WebSearch is denied, if SearXNG is down, Claude has no
web search at all.WebSearch may override a local deny
rule — check claude config precedence if the deny doesn't seem to take.CLAUDE.md instructions alone are not enough; the deny rule is what
actually removes WebSearch as an option so Claude doesn't just use both.