К основному содержанию
скилл CX Codex

grok-cli — скилл для Claude Code: что делает и как установить

Запускает Grok Build как отдельного агента для проверки, ревью или кодинга параллельно с ведущей моделью. Управляет фоновой сессией через ACP-клиент.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add scarletkc/agents --skill grok-cli -a claude-code
Открыть на GitHub

Что делает grok-cli

Скилл запускает Grok Build на той же машине и связывает его с ведущим агентом через внутренний ACP-клиент. При вызове скрипта scripts/grok.py стартует команда grok agent --no-leader stdio. Сессия остаётся открытой, а ведущий агент сразу получает идентификатор задачи и продолжает своё дело. Grok работает как внешний исполнитель. Он не наследует историю диалога из ведущего агента, поэтому все входные данные и критерии проверки нужно передавать явно.

Для работы клиента нужен интерпретатор Python 3.12+ или запуск через uv run --python 3.12. Сторонние библиотеки не требуются, скрипт написан на стандартных модулях. Сам Grok Build должен быть заранее установлен и авторизован в системе. Скилл не умеет обходить логин за пользователя.

Если оба агента правят пересекающиеся файлы, придётся вручную завести отдельный git worktree. Скилл этого автоматически не делает. Через команды status и permission ведущий агент отслеживает ход работы, подтверждает доступ к инструментам и продолжает диалог.

Какие задачи решает

  • делегировать задачу агенту Grok Build
  • запустить параллельный аудит или ревью кода
  • получить альтернативное решение для сложного бага
  • обрабатывать запросы прав доступа через протокол ACP

Примеры запросов агенту

  • Поручи Grok проверить ветку feature/auth в отдельном каталоге и найди потенциальные уязвимости.
  • Запусти Grok Build через grok-cli, чтобы переписать парсер в src/parser.py, и покажи его статус.
  • Отправь дополнительный промпт в текущую сессию Grok с новыми требованиями к тестам.

Как установить grok-cli

1Через Skills CLI (Vercel)

npx skills add scarletkc/agents --skill grok-cli -a claude-code

2Вручную: положить файлы

~/.claude/skills/grok-cli/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/grok-cli/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о grok-cli

Как установить grok-cli в Claude Code?

Выполните команду npx skills add scarletkc/agents --skill grok-cli -a claude-code. Скилл запишет конфигурацию в файл ~/.claude/skills/grok-cli/SKILL.md.

Зачем нужен grok-cli?

Он позволяет поручать изолированные задачи Grok Build прямо из Claude Code или Codex. Основной агент продолжает работу, пока Grok пишет код или проводит аудит в отдельном процессе.

Видит ли Grok историю диалога ведущего агента?

Нет, задача запускается изолированно через ACP. Все цели, пути к файлам и критерии проверки нужно передавать во входном промпте.

Исходный текст

SKILL.md · Apache-2.0
---
name: grok-cli
description: "Delegate bounded tasks to Grok Build from a supervising agent such as Codex. Use when the user asks Grok to investigate, review, implement, or provide another perspective, or when a distinct coding agent would materially help. Includes a background ACP client for progress, follow-up prompts, permissions, and cancellation."
license: Apache-2.0
metadata:
  author: scarletkc
  source: https://github.com/scarletkc/agents
  summary: "Delegate work to Grok Build, keep its session for follow-ups, and inspect results while the supervising agent continues working."
---

# Grok CLI

Use Grok Build as a separate coding agent on the same machine. The bundled
client launches `grok agent --no-leader stdio`, keeps its ACP session open,
and returns a task ID immediately. This is an external task: it does not
appear in Codex's native `spawn_agent` tree or inherit its conversation.

Grok Build must already be installed and configured. Use the project's
Python 3.12+ interpreter to run [scripts/grok.py](scripts/grok.py); the
client uses only the standard library. If the project has no interpreter,
`uv run --python 3.12 <script> ...` also works. Resolve the script relative
to this installed skill, not the repository being investigated.

## Delegate a task

Give Grok the goal, absolute working directory, relevant files and evidence,
scope boundaries, and the check that proves completion. It cannot see the
conversation that led to the assignment. Keep independent work with the
supervising agent while Grok runs.

Use a UTF-8 prompt file for substantial instructions. In these examples,
`<script>` is the absolute path to this skill's `scripts/grok.py`:

```sh
python <script> start --cwd <absolute-project-path> --prompt-file <task-file>
python <script> wait <task_id> --timeout 30
python <script> status <task_id>
python <script> reply <task_id> --prompt-file <follow-up-file>
python <script> cancel <task_id>
python <script> close <task_id>
```

Retain the returned `task_id`. Use `wait` when there is no independent work
left; its timeout returns the current state without cancelling the task.
Use `reply` after the current turn finishes to continue the same Grok
session. A running turn must finish or acknowledge cancellation before a
follow-up is accepted. Close the task once no more follow-ups are needed.

The helper's `--help` is the command reference. For output fields, storage,
timeouts, and troubleshooting, read [references/client.md](references/client.md).

## Configuration and permissions

Inherit Grok's model, authentication, and permission configuration unless
the task requires a specific override. Subscription login, API keys,
and configured providers are Grok's concern; do not change the user's
configuration or choose another authentication route to get past a failure.
The helper uses Grok's advertised noninteractive default authentication
method when available. Interactive authentication is completed separately
through Grok itself.

`start --model`, `--effort`, `--permission-mode`, and `--sandbox` are
per-task overrides. Omit them when no override is needed. Do not use a
permission bypass merely to avoid handling an approval request.

Choose `--effort` for the delegated task. Honor the user's explicit choice;
otherwise weigh complexity, the cost of an incorrect result, and how easily
the result can be checked. Make routine choices without asking the user:

- Simple chat, rewriting, or mechanical work can use a lower effort level.
- Ordinary implementation and analysis generally suit a middle level.
- Difficult debugging and consequential code review may justify a higher level.

These are starting points, not fixed task-to-level rules. Use only levels
known to be supported by the selected model. When support or the appropriate
level is uncertain, omit `--effort` and inherit Grok's configured value.

Match permissions to the authorized work. Preserve read-only restrictions
for read-only assignments; allow the necessary file edits and checks for
an authorized implementation within its scope. Task complexity and reasoning
effort do not expand that authorization.

When `status` is `needs_approval`, inspect `pending_permissions` and answer
the relevant request with:

```sh
python <script> permission <task_id> --request-id <request_id> --option-id <optionId>
```

Select an option Grok actually offered. Approve actions already covered by
the user's assignment; prefer a single-use approval. Decisions beyond that
scope stay with the user. Configured Grok allow rules can execute tools
without producing an ACP approval request. A read-only task prompt or
refusing an ACP request is not an OS sandbox; Codex's sandbox does not
configure Grok's. Do not promise enforced isolation without verifying
Grok's sandbox on the target platform.

## Supervise the result

Avoid simultaneous edits to the same files. Use a separate worktree when
both agents need to edit overlapping code, and pass its absolute path as
`--cwd`; the helper does not create worktrees.

Read `status`, `closed`, `stop_reason`, and `error` together. A returned
task ID means the worker started, not that Grok authenticated or finished.
`completed` means Grok ended its turn, not that its claims were verified.
Inspect the actual diff or cited evidence and run the relevant checks.

If Grok is unavailable or an installation, configuration, authentication,
tool, or process failure blocks the task, explicitly tell the user what
failed and which work remains incomplete. Inspect any partial result before
retrying. Do not silently substitute your own work, another agent, or another
provider for the requested Grok task. Report what Grok contributed and what
the supervising agent verified. Committing, publishing, and other external
actions keep the authorization boundaries of the original task.

© scarletkc · Apache-2.0 · scarletkc/agents

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
setup-matt-pocock-skills Matt Pocock Скилл настраивает репозиторий для инженерных скиллов Matt Pocock: задаёт трекер задач, метки триажа и расположение доменной документации. Запустите его перед первым использованием остальных скиллов. 1 052 851установок ask-matt Matt Pocock Помогает выбрать подходящий скилл или рабочий поток из набора Matt Pocock. Пригодится, когда непонятно, с чего начать задачу: от идеи до разбора бага. 766 587установок to-tickets Matt Pocock Разбивает план, спецификацию или переписку на небольшие сквозные задачи и отмечает, какие из них блокируют остальные. Пригодится, когда нужно согласовать порядок работы до публикации задач в трекере. 711 230установок writing-plans Jesse Vincent Скилл превращает требования к многошаговой задаче в подробный план реализации до начала работы с кодом. Пригодится, когда исполнителю нужно зафиксировать файлы, интерфейсы и проверки. CX Codex 282 859установок caveman-review JuliusBrussee Пишет замечания к коду одной строкой: место, проблема, исправление. Пригодится, когда ревью диффа или PR надо пройти быстро и без воды. CX Codex +1 411 800установок caveman-compress JuliusBrussee Сжимает CLAUDE.md, списки задач и другие текстовые файлы в краткий формат, сохраняя читаемую резервную копию. CX Codex +1 411 500установок

Из того же набора10

ux-writing Скилл задаёт правила для пользовательских строк и документации: вывод CLI, ошибки, справка, README, комментарии и заголовки. Пригодится, когда правишь копирайт или структуру доков. CX Codex +1 ★ 224звёзд репо scoped-change Удерживает правки агента строго в границах задачи. Защищает репозиторий от лишних рефакторингов и забытых мест вызова. CX Codex +1 ★ 224звёзд репо product-writing Скилл помогает писать и проверять интерфейсные тексты и техническую документацию. Пригодится для сообщений об ошибках, инструкций и описания поведения продукта. CX Codex +1 ★ 224звёзд репо marketing-copy Пишет посты о запуске, описания в сторах, заголовки лендингов и анонсы. Следит, чтобы в публичный текст не попали ключи, закрытые ссылки и невыпущенные фичи. CX Codex +1 ★ 224звёзд репо devin-cli Передаёт ограниченные задачи локальному Devin CLI через ACP и возвращает отчёт о ходе работы. Подходит для параллельной реализации, переноса и ревью. CX Codex +1 ★ 224звёзд репо codex-cli Скилл объясняет, когда передавать работу в Codex CLI и как подобрать модель, усилие и права песочницы. Для агента-супервизора, а не для самого Codex. CX Codex +1 ★ 224звёзд репо ask-to-plan Превращает смутную идею в чёткий план с помощью встроенных кнопок агента. Задаёт по одному вопросу за шаг, чтобы согласовать цели и стек до написания кода. CX Codex +1 ★ 224звёзд репо antigravity-cli Скилл передаёт Antigravity CLI отдельные задачи на исследование, проверку или правки и помогает следить за их выполнением. Пригодится, когда результат другого агента можно проверить. CX Codex +1 ★ 224звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой