grok

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

1|Updated Jun 19, 2026
One-click install
npx skills add https://github.com/Lento47/arcana-community --skill grok-lento47
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: grok
Source: https://github.com/Lento47/arcana-community/tree/main/skills/autonomous-ai-agents/grok
Command: npx skills add https://github.com/Lento47/arcana-community --skill grok-lento47

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Orchestrating an external autonomous coding agent from an AI terminal requires knowing its CLI flags, auth model, and session semantics. This Skill provides the operational playbook for delegating coding work to xAI's Grok Build CLI without trial-and-error. ## Core Features & Use Cases - Headless one-shot execution: 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. - PR review and parallel issue fixing: Review diffs in throwaway clones and run concurrent fixes across git worktrees. - Use Case: You need two GitHub issues fixed in parallel. The Skill guides you to create git worktrees, launch background headless Grok sessions in each, monitor them, then push branches and open PRs. ## Quick Start Ask the agent to use Grok headless mode to fix a specific bug in your project directory and report what changed.

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 do I 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 works as a pay-as-you-go fallback if subscription login is unavailable.

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

No, Grok runs fine outside a git directory, which makes it suitable for scratch or throwaway tasks. For PR and commit workflows you still want a repo, and you can use mktemp -d with git init for temporary commit tasks.

Why does my headless Grok run stall without completing?▼

Headless runs stall when tool-approval prompts appear and --always-approve was not passed. Add --always-approve for autonomous builds, but omit it deliberately for read-only reviews so Grok cannot mutate files.

Can Grok CLI read my existing CLAUDE.md or AGENTS.md files?▼

Yes, Grok automatically reads CLAUDE.md, the .claude directory including skills and MCP configs, and the AGENTS.md family with zero configuration. Existing project context from Claude Code setups works immediately.