grok

Delegate coding tasks to the xAI Grok Build CLI via headless or interactive terminal sessions.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/episvr/USTB-2026-SummerInternship --skill grok-episvr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: grok
Source: https://github.com/episvr/USTB-2026-SummerInternship/tree/main/hermes-config/optional-skills/autonomous-ai-agents/grok
Command: npx skills add https://github.com/episvr/USTB-2026-SummerInternship --skill grok-episvr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Orchestrating an external autonomous coding agent from a Hermes terminal requires knowing the right invocation modes, auth setup, and approval flags; this Skill encodes those patterns so coding tasks can be delegated to Grok Build without trial and error. ## Core Features & Use Cases - Headless one-shot delegation: Run single coding tasks with grok -p, structured JSON output, and --always-approve for autonomous writes. - Interactive TUI sessions: Drive multi-turn Grok sessions through tmux with capture-pane monitoring for long-running work. - PR review and parallel issue fixing: Review diffs in cloned temp repos and fix multiple issues concurrently using git worktrees. - Use Case: Ask the agent to fix two GitHub issues at once; it creates worktrees, launches background headless Grok sessions in each, monitors progress, then pushes branches and opens PRs. ## Quick Start Use the grok skill to run a headless task that adds a dark mode toggle to the settings page of my project.

Frequently Asked Questions about grok

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Grok Build CLI headless for a one-shot coding task?▼

Run grok with the -p flag followed by your prompt, for example grok --no-auto-update -p 'Add a dark mode toggle'. Add --output-format json for parseable results and --always-approve when it should write files autonomously.

How do I authenticate the Grok CLI?▼

Run grok login once to complete browser OAuth with a SuperGrok or X Premium+ subscription; the token is cached in ~/.grok/auth.json. An XAI_API_KEY environment variable is available as a pay-as-you-go fallback.

Grok vs Codex vs Claude Code for delegating coding tasks?▼

All three follow the same orchestration pattern: prefer headless one-shots and use a PTY with tmux for interactive sessions. Grok additionally runs outside a git repository and auto-reads CLAUDE.md and AGENTS.md project context.

Does the Grok CLI require a git repository to run?▼

No, Grok runs fine outside a git directory, which suits scratch or throwaway tasks. For PR and commit workflows you still want a repo, which you can create with mktemp -d and git init.

Why does my headless Grok run stall waiting for input?▼

Headless runs stall on tool-approval prompts when --always-approve is omitted. Pass --always-approve for autonomous builds, but deliberately omit it for read-only reviews so Grok cannot mutate files.

How do I monitor a long-running interactive Grok session?▼

Launch the TUI inside a tmux session, send tasks with tmux send-keys, and monitor progress with tmux capture-pane -t <session> -p -S -50. Kill the tmux session when finished to clean up.