# Grok rescue

> Grok rescue is an open-source agent skill for developer tools. Hands a long coding task or root-cause investigation to xAI Grok via a companion script. It is available on Claude Code and Codex.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex
- **Website:** https://github.com/LovelaceLoom/grok-plugin-cc/tree/main/plugins/grok/skills/grok-rescue
- **Repository:** https://github.com/lovelaceloom/grok-plugin-cc
- **GitHub stars:** 5
- **License:** Apache-2.0
- **Skill name:** grok-rescue
- **Collection:** https://github.com/LovelaceLoom/grok-plugin-cc
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill forwards a substantial, open-ended coding job to xAI Grok through a companion script's task subcommand. The agent runs one shell command that starts Grok in its agentic mode, which can read files, optionally write them, search the web and reason over several turns, then returns the streamed output unchanged. Write mode is off by default and only turned on when the user explicitly asks for code changes and the GROK_PLUGIN_ALLOW_WRITE environment variable is set as a safety gate.

The skill also covers session handling and timeouts. It can resume a prior session by id or continue the latest one for the current directory, and it accepts model and effort flags only when the user names them. Rescue runs have no default time limit, and a timeout is reported back to the user rather than retried with a longer window. In Claude Code the work can run in a background subagent, while Codex CLI runs it in the foreground.

The skill expects the Grok companion plugin to be installed and authenticated with a grok login or an XAI_API_KEY. It is meant to act as a pure forwarder: the agent passes Grok's output along without inspecting files, polling status or adding its own follow-up work.

## When your agent uses it

> Delegate a long-form coding task, root-cause investigation, multi-file refactor, or open-ended fix to xAI Grok via the companion's `task` subcommand. Use when the work is too large or specialized to handle inline and benefits from Grok's distinct training (live web search, code-focused models, 512K context).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/LovelaceLoom/grok-plugin-cc/tree/HEAD/plugins/grok/skills/grok-rescue)
- [License: Apache-2.0](https://github.com/LovelaceLoom/grok-plugin-cc/tree/HEAD/plugins/grok/skills/grok-rescue)

## Features

- **Delegated long-form tasks:** Hands multi-file refactors, audits and open-ended fixes to Grok in one command.
- **Root-cause investigation:** Sends regressions and failing tests to Grok for diagnosis and a proposed fix.
- **Opt-in write mode:** File edits happen only when the user asks for changes and the environment gate is set.
- **Session resume:** Resumes a specific session by id or continues the latest one for the working directory.
- **Timeout control:** Accepts duration limits, with rescue runs unbounded by default.
- **Verbatim output forwarding:** Returns Grok's stdout unchanged, without summarizing or polling.

## Good for

- Investigate why a test started failing and propose a fix
- Refactor a module that spans several files
- Audit a codebase directory for security issues
- Get a second implementation pass from a different model family
- Continue an earlier Grok session on the same project

## Install

### Claude Code

This skill ships in the `grok` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add LovelaceLoom/grok-plugin-cc
/plugin install grok@grok-plugin-cc
```

Or copy only this skill to `~/.claude/skills/grok-rescue`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LovelaceLoom/grok-plugin-cc.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/grok-rescue &&
cp -R "$tmp/plugins/grok/skills/grok-rescue" ~/.claude/skills/grok-rescue &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/grok-rescue` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/grok-rescue` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LovelaceLoom/grok-plugin-cc.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/grok-rescue &&
cp -R "$tmp/plugins/grok/skills/grok-rescue" ~/.agents/skills/grok-rescue &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/grok-rescue` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/grok-rescue` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LovelaceLoom/grok-plugin-cc.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/grok-rescue &&
cp -R "$tmp/plugins/grok/skills/grok-rescue" ~/.cursor/skills/grok-rescue &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/grok-rescue` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/LovelaceLoom/grok-plugin-cc.git --path plugins/grok/skills/grok-rescue
```

Or copy the folder to `~/.gemini/skills/grok-rescue` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/grok-rescue`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LovelaceLoom/grok-plugin-cc.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/grok-rescue &&
cp -R "$tmp/plugins/grok/skills/grok-rescue" ~/.copilot/skills/grok-rescue &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/grok-rescue` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/LovelaceLoom/grok-plugin-cc.git
```

Then copy `grok-plugin-cc/plugins/grok/skills/grok-rescue` into your agent's skills folder as `grok-rescue`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Grok rescue trigger?

When a task is large or specialized enough to handle inline, such as multi-file work or root-cause investigation, or when the user asks to delegate to Grok.

### Can Grok rescue edit my files by default?

No. Read-only is the default. Write mode needs the user to request code changes and the GROK_PLUGIN_ALLOW_WRITE=1 environment variable to be set.

### What does Grok rescue need installed?

The Grok companion script from the grok-plugin-cc plugin, plus authentication through grok login or the XAI_API_KEY variable.

### Does Grok rescue work with every AI client?

The content describes Claude Code and Codex CLI use. Background mode is Claude Code only.

### How do I install Grok rescue in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/grok-rescue to use it in all your projects, or to .claude/skills/grok-rescue in one project. Or install the grok plugin, which includes it: /plugin marketplace add LovelaceLoom/grok-plugin-cc, then /plugin install grok@grok-plugin-cc.

### Does Grok rescue run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Grok rescue?

Claude Code and Codex. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Grok rescue?

The closest alternatives to Grok rescue are Grok CLI runtime, Grok result handling, Grok prompting, Grok fan out and Grok bot.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Grok CLI runtime](https://ai-powered.com/skills/grok-cli-runtime): Grok CLI runtime is an open-source agent skill for developer tools.
- [Grok result handling](https://ai-powered.com/skills/grok-result-handling): Grok result handling is an open-source agent skill for developer tools.
- [Grok prompting](https://ai-powered.com/skills/grok-prompting): Grok prompting is an open-source agent skill for ai models and llm tooling.
- [Grok fan out](https://ai-powered.com/skills/grok-fan-out): Grok fan out is an open-source agent skill for developer tools.
- [Grok bot](https://ai-powered.com/skills/grok-bot-adamanz): Grok bot is an open-source agent skill for developer tools.
- [Debug](https://ai-powered.com/skills/debug-tjmonsi): Debug is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging-fmarzochi): Agent introspection debugging is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging): Agent introspection debugging is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/grok-rescue
