Grok Build

Delegates coding tasks to xAI's grok CLI headlessly, reviews every diff before commit

od sanjay3290 · sanjay3290/ai-skills

Funguje s nastavením ★ 7.2/10

Grok Build — Delegates coding tasks to xAI's grok CLI headlessly, reviews every diff before commit

Co umí

Turns the assistant into an orchestrator that writes self-contained task specs, dispatches them to xAI's Grok Build CLI in headless mode, then reads the resulting diff and runs acceptance commands before committing. Includes a spec template, the headless flag set (--prompt-file, --output-format json, --always-approve, --max-turns), a resume-based fix-up loop capped at two rounds, and a failure table. Triggers when the user says "use grok", "delegate to grok", "have grok implement", or "execute this plan with grok".

Testovací report

Cloned the repo and installed skills/grok-build into a throwaway HOME=$(mktemp -d); frontmatter parsed to name+description (489 chars), the one file the body references (references/cli.md) returned HTTP 200 raw, and a grep for curl|sh, base64, secret exfil, injection text and hardcoded /Users or /home paths found nothing (only match was the word "token" in prose about token cost). `which grok` returned "grok not found" and the CLI needs a paid grok.com OAuth login, so I could not execute the preflight, the dispatch, or the resume fix-up — the skill's entire execution path. I did measure the part I could: I built a real git repo (wordcount.py + a passing pytest), then wrote two dispatch artifacts (A-baseline-dispatch.md = the one-liner `grok -p "Add a --json flag..."` I'd send by default; B-skill-dispatch.md = the skill's full spec template with Context/Files/Task/Constraints/Acceptance criteria) and implemented each from its prompt text alone on separate branches. Concrete difference: the baseline branch renamed the dict keys to line_count/word_count/char_count and `python3 -m pytest -q` reported "1 failed ... AssertionError"; the skill branch kept lines/words/chars and pytest reported "1 passed", and `--json` printed exactly `{"lines": 2, "words": 3, "chars": 6}` matching the spec's acceptance line — the delta traces to two things only the template made room for (the "the test imports it directly" constraint and the exact expected-output strings). Caveat that keeps outputMeasured false: I substituted myself for Grok, so this measures spec quality, not Grok's real behavior, and none of cli.md's "verified against grok 0.2.93" claims (acceptEdits cancelling headlessly, sessionId JSON shape, --check ~48s) could be checked.

Testováno: 2026-07-21 · Claude Code 2.x (agent harness)

Instalace

git clone --depth 1 https://github.com/sanjay3290/ai-skills.git /tmp/grok-build-src
mkdir -p ~/.claude/skills
cp -R /tmp/grok-build-src/skills/grok-build ~/.claude/skills/grok-build
# REQUIRED EXTERNAL DEP: xAI's Grok Build CLI (`grok`) is NOT installed by the above.
# Install it per xAI's docs for your OS, then verify: grok --version
# Auth needs a grok.com subscription OAuth login: grok login
# Check auth with: grok models   (skill's preflight STOPs if this errors)
# Works on macOS, Linux, Windows PowerShell. Repo also ships 23 other skills under skills/.
# Skill body is 135 lines + references/cli.md loaded on demand.

Příkazy a ukázkové prompty

  • /grok-buildDelegates coding tasks to xAI's grok CLI headlessly, reviews every diff before commit

Skilly se spouštějí běžnými požadavky — žádné příkazy k zapamatování. Po instalaci ho aktivují prompty jako tyto (anglicky):

  • Have grok implement this plan step by step
  • Delegate this task spec to grok build
  • Execute this markdown plan with grok