web-backend-credit-fallback
БесплатноБез исполняемых скриптовНе проверенGuard paid web-search API credits with auto-flip cron.
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Web backend credit fallback
Use when a paid web-search/extract API (Exa, Firecrawl, Parallel) may run out of credits and search must keep working. Builds a silent cron guard that flips the Hermes web backend to a free provider and back.
Hermes does NOT auto-fall back to another configured vendor when a paid key hits 402. The only built-in rescue is the keyless ring (exa, parallel, firecrawl, keenable in plugins/web/keyless_mcp.py); TinyFish is not in it. So build the guard.
Facts worth knowing first
- Backend selection is per call from
web.backend/web.search_backend/web.extract_backend, sohermes config settakes effect immediately, cron included. Set all three. - Hermes refuses agent writes to
config.yaml; usehermes config set <key> <value>. - TinyFish (plugin
~/.hermes/plugins/tinyfish) is genuinely free: search 30/min + 500/hr, fetch 150/min + 1,000/day, keeps working at $0 wallet. Free tier to use as the fallback. - Exa charges per call (lite $4/1k, auto $7/1k, contents $1/1k pages), so a monitoring probe costs real money — probe at most daily, and use free log scanning for immediacy.
/searchwithtype: lite, numResults: 1is the cheapest auth probe (~$0.004).
Pattern (proven, see ~/.hermes/scripts/exa_guard.py)
- Free detection: tail
~/.hermes/logs/agent.logfrom a stored byte offset, match provider error lines containingexaand(402|401|payment required|insufficient|quota). On log rotation (offset > size) set offset = size and skip the chunk — otherwise old errors cause a false flip. - Billed detection: daily probe gated on a
last_probetimestamp (default 20h). Treat network errors as alive; only HTTP 401/402 may flip. - Flip with
hermes config setfor all three backend keys, then re-read them to verify; persist state (active,changed_at) so it never flip-flops. - Recovery: when on fallback and the probe returns 200, flip back (free credits reset on the 1st).
- Print nothing when nothing changed. Register as
no_agentcron every 30m withdeliver='telegram:<chat_id>'— empty stdout sends nothing.
Test before scheduling
Monkeypatch the module in a temp dir (LOG_DIR, STATE, HERMES -> shell stub recording config set/get) and assert: silent when clean, flips on a 402 log line, flips back on probe 200, does NOT flip on network error, no double flip when already in target state.
Cost discipline
Guarding costs 1 lite probe/day ($0.12/mo). Do not probe every 30 minutes. Split by volume: interactive searches on the paid index, high-frequency cron collectors on the free one.
Установить web-backend-credit-fallback в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл web-backend-credit-fallback?
Guard paid web-search API credits with auto-flip cron.
Как установить скилл web-backend-credit-fallback?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл web-backend-credit-fallback запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic