grok

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

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill grok-vivekgoquest
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: grok
Source: https://github.com/vivekgoquest/hermes-agent-stable/tree/main/optional-skills/autonomous-ai-agents/grok
Command: npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill grok-vivekgoquest

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Orchestrating an external autonomous coding agent from Hermes requires knowing the right invocation modes, auth setup, and flags; this Skill encodes the operational patterns for delegating coding work to xAI's Grok Build CLI 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 orchestration: Drive multi-turn Grok sessions through tmux with capture-pane monitoring, mirroring the claude-code and codex patterns. - PR review and parallel issue fixing: Review diffs in throwaway clones and run concurrent fixes across git worktrees with background process monitoring. - Use Case: You need two GitHub issues fixed in parallel. Create two git worktrees, launch a background headless Grok run in each with --always-approve, then push the branches and open PRs once the process tool reports completion. ## Quick Start Ask the agent to use Grok headless mode to add a dark mode toggle to the settings page of the project in the current working directory.

Frequently Asked Questions about grok

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

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

Run grok with the -p flag followed by your prompt, plus --no-auto-update to skip update checks. Add --always-approve if Grok should write files autonomously, and --output-format json when you need to parse the result programmatically.

How to authenticate the Grok Build CLI?▼

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

Grok CLI vs Codex vs Claude Code for delegated coding?▼

All three follow the same orchestration pattern: prefer headless one-shot flags for single tasks and a PTY with tmux for interactive sessions. Grok additionally runs without a git repo and auto-reads CLAUDE.md, .claude/ directories, and AGENTS.md files.

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, so initialize one with git init in a temporary directory when needed.

Why does a headless Grok run stall without finishing?▼

Headless runs stall when tool-approval prompts appear because --always-approve was omitted. Add that flag for autonomous builds, but deliberately leave it off for read-only reviews so Grok cannot mutate files.

How do I resume a previous Grok CLI session?▼

Sessions are keyed by UUID. Use grok -r <UUID> to resume a specific session, or grok -c to continue the most recent session in the current directory; --session-id only assigns a new UUID and does not resume.