agentleFS
erencivrilerencivril/claude-code-failover/skills/setup/SKILL.md

setup

Skill1 starsChanged 34 days agoMITView on GitHub

Configure the failover plugin - choose the fallback agent command and turn on Claude Code's built-in recovery settings. Runs only when the user invokes it.

  • Installs packages

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-voice-transcription, add-discord and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • juancruzmunozalbeloSkill

    add-voice-transcription

    Add voice message transcription to NanoClaw using OpenAI's Whisper API. Automatically transcribes WhatsApp voice notes so the agent can read and respond to them.

    Also in 5 projects that use this

  • MicrosoftSkill

    add-discord

    Add Discord bot channel integration via Chat SDK.

    Also in 11 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 11 projects that use this

  • juancruzmunozalbeloSkill

    add-telegram-swarm

    Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".

    Also in 7 projects that use this

  • +8 more from microsoft

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 171 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run command -v jq. If jq is missing, tell the user how to install it (brew install jq, apt install jq) and stop: every script in this …

    line 13
  2. Very specific:

    Ask whether the handoff should start automatically when a turn dies ("auto": true), or only when the user runs /failover:handoff.

    line 31
  3. Very specific:

    Write ~/.claude/failover.json (use $CLAUDE_CONFIG_DIR instead of ~/.claude if it is set):

    line 33
  4. Distinctive:

    Run a dry check and show the user the output:

    line 53

“Common” is measured: kept by at least 6 in 10 of the 171 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Set up failover

Walk the user through the steps below. Ask before writing each file, and merge into existing files instead of replacing them.

1. Check the requirement

Run command -v jq. If jq is missing, tell the user how to install it (brew install jq, apt install jq) and stop: every script in this plugin needs it.

2. Choose the fallback agent

Check which agent CLIs are installed (command -v codex gemini aider opencode claude) and ask the user which one should take over a stopped task. The command must run without prompting, read the task brief from stdin (or from the file named by $FAILOVER_BRIEF_FILE), and be allowed to edit files in the working directory. Starting points, which the user should confirm against --help for their installed version:

AgentCommand
Codex CLIcodex exec --sandbox workspace-write -
Claude Code on another modelclaude -p --model sonnet --permission-mode acceptEdits
Gemini CLIgemini --yolo -p "$(cat)"
Aideraider --yes-always --message-file "$FAILOVER_BRIEF_FILE"
opencodeopencode run "$(cat)"

Any other command works too, including a wrapper script of the user's own.

3. Write the config

Ask whether the handoff should start automatically when a turn dies ("auto": true), or only when the user runs /failover:handoff. Make clear that automatic mode sends the recent conversation to the chosen agent without asking each time, on that agent's account and cost.

Write ~/.claude/failover.json (use $CLAUDE_CONFIG_DIR instead of ~/.claude if it is set):

{
  "command": "<the chosen command>",
  "auto": true,
  "on": ["policy", "rate_limit", "overloaded", "server_error"]
}

4. Offer the built-in recovery settings

These are Claude Code settings, not part of this plugin, and they recover without leaving the session. Offer to merge them into the user's ~/.claude/settings.json, explaining each one, and only add the ones the user agrees to:

  • "switchModelsOnFlag": true - when a safety classifier flags a request, re-run it on the fallback Claude model instead of pausing to ask.
  • "fallbackModel": ["sonnet"] - when the primary model is overloaded or unavailable, serve the turn from another model.
  • "autoContinueAtUsageLimit": true - when a usage limit stops the session, wait for the reset and continue.

5. Confirm

Run a dry check and show the user the output:

echo "Reply with the single word OK. Do not create or modify any files." | "${CLAUDE_PLUGIN_ROOT}/scripts/handoff.sh" --reason setup-check

Tell the user that events are logged to ~/.claude/failover/events.jsonl.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.