From gemini
Delegate a task to Gemini (foreground or background) and track it as a job.
How this command is triggered — by the user, by Claude, or both
Slash command
/gemini:rescue [--background] [--model <name>] [--write] <prompt>This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
You are running the `/gemini:rescue` command. Your job is to package the user's request into a self-contained prompt and hand it to the `gemini-companion` CLI to delegate to Gemini. ## Step 1: Build a self-contained prompt Gemini has no conversation history. Construct a prompt with these sections: Read referenced files yourself first so the context is embedded. ## Step 2: Decide foreground vs background - **Foreground (default)**: user wants the answer right now. The companion blocks until Gemini responds and streams the output back. - **Background**: user passed `--background`, OR t...
You are running the /gemini:rescue command. Your job is to package the user's request into a self-contained prompt and hand it to the gemini-companion CLI to delegate to Gemini.
Gemini has no conversation history. Construct a prompt with these sections:
## Background
[Summarize what was just discussed in the parent conversation, if relevant.]
## Request
[The user's actual task.]
## Context
[If the user referenced files, paste their contents here. If they asked about recent changes, include `git diff` output. Keep it tight.]
Read referenced files yourself first so the context is embedded.
--background, OR the task is long-running. Returns immediately with a job id; user later runs /gemini:result <id>.Foreground:
node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" task "<self-contained prompt>"
Background:
node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" task --background "<self-contained prompt>"
Optional --model <name>: defaults to gemini CLI's routing (auto-gemini-3 → currently gemini-3.1-pro-preview). Pass --model gemini-2.5-flash for cheaper/faster, or any other Gemini model the user has access to.
If the prompt is long, write it to a temp file and pass it via $(cat /tmp/file) substitution to avoid argv length limits.
Foreground — wrap Gemini's stdout under a clear header:
## Gemini Response
[verbatim stdout from the companion]
Background — show the job id and follow-up commands:
Gemini is working on this in the background.
Job id: <id>
Check status: /gemini:status <id>
Get result: /gemini:result <id>
Cancel: /gemini:cancel <id>
gemini CLI not found → tell the user to run /gemini:setup for install guidance.unauthenticated → tell the user to run /gemini:setup./gemini:result <id> to inspect what Gemini actually emitted.npx claudepluginhub yhzion/claude-plugin-models --plugin gemini/rescueDelegates code investigation, explicit fixes, or follow-up rescue to Codex subagent. Handles --background|--wait, --resume|--fresh, --model, --effort flags plus task text.
/rescueDiagnoses production incidents: checks site health, analyzes recent commits, detects error patterns, generates rollback commands, produces post-mortem template.
/rescueDelegates a task to Codex AI via background codex exec using arguments, based on OpenAI or OpenRouter provider. Presents unfiltered response and awaits user action.
/rescueDelegate investigation, an explicit fix request, or follow-up rescue work to the Gemini rescue subagent
/rescueDelegate investigation, an explicit fix request, or follow-up rescue work to the Copilot rescue subagent
/rescueDelegates investigation, fix, or follow-up work to the Pi rescue subagent, running it in background or foreground with optional execution flags.