grok-build

Delegates implementation tasks to xAI Grok Build CLI with orchestrator review of every diff.

432|47|Updated Dec 22, 2025
Ready to run
npx skills add https://github.com/sanjay3290/ai-skills --skill grok-build-sanjay3290
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: grok-build
Source: https://github.com/sanjay3290/ai-skills/tree/main/skills/grok-build
Command: npx skills add https://github.com/sanjay3290/ai-skills --skill grok-build-sanjay3290

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? It lets a coding assistant offload well-specified implementation work to xAI's Grok Build CLI running headlessly, while keeping planning, task specification, and diff review under the orchestrator's control. ## Core Features & Use Cases - Headless task dispatch: Sends self-contained Markdown task specs to Grok via --prompt-file with JSON output, session capture, and turn limits. - Review gate workflow: Requires a clean git tree before dispatch, reviews every diff, runs acceptance commands, and supports up to two fix-up rounds via --resume. - Plan execution: Executes Markdown implementation plans task-by-task, with optional parallel dispatch using git worktrees for independent tasks. - Use Case: You have a Markdown implementation plan for a new feature. The assistant writes a spec per task, dispatches each to Grok, reviews the diffs, commits passing work, and checks off plan items as they land. ## Quick Start Ask the assistant to execute this implementation plan with grok, delegating each task and reviewing the diffs before committing.

Frequently Asked Questions about grok-build

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

FAQPage Schema
How do I delegate coding tasks to Grok Build CLI headlessly?▼

Write a self-contained Markdown task spec to a temp directory outside the repo, then run grok with --prompt-file, --output-format json, --always-approve, --max-turns, and --cwd. Parse the JSON output to save the sessionId for later fix-ups.

What tasks should I delegate to Grok versus keep with the coding assistant?▼

Delegate plan tasks with clear acceptance criteria, boilerplate, CRUD scaffolding, mechanical refactors, and test writing from specs. Keep ambiguous requirements, architecture decisions, security-sensitive code, and deep cross-file debugging with the orchestrator.

Why does a headless Grok run return stopReason Cancelled with no changes?▼

A Cancelled stopReason with empty text means a tool call hit a permission gate with no interactive approver. The --permission-mode acceptEdits flag fails headlessly, so always use --always-approve, which auto-approves both edits and shell commands.

Does Grok Build CLI work on Windows and macOS?▼

Yes, the Grok CLI works on macOS, Linux, and Windows via PowerShell. The workflow provides both POSIX and PowerShell command variants, using backtick line-continuation on Windows, and authentication uses grok.com subscription OAuth via grok login.

What happens when Grok fails to complete a delegated task?▼

The orchestrator sends specific feedback via grok --resume with the saved sessionId, allowing a maximum of two fix-up rounds. If still failing, it reverts Grok's changes with git checkout and git clean, completes the task itself, and informs the user.

When should I use the --check self-verification flag with Grok?▼

Use --check only for high-stakes tasks where Grok should self-correct before review. It spawns a verifier subagent but roughly doubles wall-clock time and token cost, so the orchestrator's own review gate remains the default authority.