# Grok Delegate

Delegate a coding task to the Grok Build CLI as a background implementer, then review...

- Repository: https://github.com/amElnagdy/delegate-skills (2546 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add amElnagdy/delegate-skills --skill grok-delegate -g -a claude-code -y`
Codex: `npx skills add amElnagdy/delegate-skills --skill grok-delegate -g -a codex -y`
Cursor: `npx skills add amElnagdy/delegate-skills --skill grok-delegate -g -a cursor -y`
Gemini CLI: `npx skills add amElnagdy/delegate-skills --skill grok-delegate -g -a gemini-cli -y`

## Description

Delegate a coding task to the Grok Build CLI as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to Grok, phrasings like "have Grok do X", "delegate this to Grok", "run it through Grok", "use Grok Build to implement/fix/refactor", or "have grok CLI do this", or to run a queue of coding tasks through Grok while staying the reviewer. Prefer it when the user will review the diff and commit it themselves. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Grok Delegate

For a trusted repository rejected by Git's ownership check, the relay supports
`--trust-git-root <exact-worktree-root>`. This opt-in affects only relay Git checks, without persistent
Git config or Grok permission changes. See [dispatch and poll](references/dispatch-and-poll.md#git-ownership-errors-on-shared-or-remounted-drives).

You are the **orchestrator**. This skill lets you hand a bounded coding task to a separate
**implementer**, the Grok Build CLI (`grok`), then review what it produced and land it yourself. You
write the brief and own the judgment; Grok does the typing under an explicit autonomy profile; you
verify and commit.

Nothing here is specific to one orchestrating agent. The loop needs only the ability to run a shell
command and read a file, so it works the same whether you are Claude Code, Cursor, OpenCode with a
selected model, or any comparable agent. (It is designed for Claude Code and Cursor; treat other
orchestrators as designed-for, not yet proven.)

## When NOT to use this

- The task is small enough to just do inline, delegation overhead is not worth it.
- The `grok` CLI is not installed, not authenticated, or the account lacks Grok Build beta access.
- You want to write the code yourself, or you only need a review without an implementer run.

## Prerequisites (check once)

1. `grok version` succeeds. If not, install on any platform with
   `npm i -g @xai-official/grok` (or use the installer from xAI's official Grok CLI docs) and
   authenticate (`grok login`, or `grok login --device-auth` on headless hosts, or set
   `XAI_API_KEY`).
2. **Confirm which `grok` is on PATH.** `command -v grok` shows the active binary and `grok version`
   its version, the relay records the version it ran into `result.json`, so a stale binary is visible
   after the fact.
3. You are in (or will point `--cd` at) the target git repository.

## The loop

The rest: https://github.com/amElnagdy/delegate-skills/blob/HEAD/skills/grok-delegate/SKILL.md
