Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Orchestrate coding work by delegating well-specified implementation tasks to xAI's Grok Build CLI (grok) running headlessly, while the coding assistant plans, writes the task specs, reviews every diff, and owns the result. Use when user says: 'use grok', 'grok build', 'delegate to grok', 'have grok implement', 'have grok execute', 'have grok build', 'send to grok', 'execute this plan with grok'. Executes a Markdown implementation plan task-by-task, or ad-hoc tasks with an inline spec.
.claude/skills/sanjay3290-grok-build/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 80% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -13% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 27% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 16% | 0% |
The coding assistant is the orchestrator: it plans, writes self-contained task specs, dispatches them to Grok Build headlessly, reviews every diff, and owns the final result. Grok is the fast, cheap executor. Full CLI details and verified behaviors: references/cli.md.
| Delegate to Grok | Keep with the orchestrator | |---|---| | Plan tasks with clear acceptance criteria | Ambiguous requirements, architecture decisions | | Boilerplate, scaffolding, CRUD | Deep cross-file debugging | | Mechanical refactors | Security-sensitive code | | Test writing from clear specs | Anything touching production infrastructure | | UI components from mockups/specs | Tasks where writing the spec ≈ doing the work |
When in doubt, keep it with the orchestrator.
grok update --check --json — if updateAvailable is true, run grok update andconfirm with grok --version.
grok models — if it errors or reports logged out, STOP and ask the user to rungrok login.
OUTSIDE the target repo — the harness scratchpad if one is available, else the OS temp dir. Never write it inside the target repo. Grok has zero conversation context: no one-liner prompts, ever.
mkdir -p "${TMPDIR:-/tmp}/grok-specs", then write task.md there.New-Item -ItemType Directory -Force "$env:TEMP\grok-specs",then write task.md there.
post-run diff is exactly Grok's work. Ignore build artifacts (__pycache__, dist/, etc.); if they show in git status, they're usually just un-gitignored, not your concern. Never dispatch on a dirty source tree.
POSIX:
bash grok --prompt-file <task-file> \ --output-format json \ --always-approve \ --max-turns 30 \ --cwd <repo>
Windows (PowerShell) — backtick line-continuation:
powershell grok --prompt-file <task-file> --output-format json --always-approve --max-turns 30 --cwd <repo>
Parse the JSON output and save sessionId. (--always-approve is required for headless runs — --permission-mode acceptEdits silently cancels edits with no interactive approver. See references/cli.md.) For a high-stakes task, add --check so Grok self-verifies before you review; skip it otherwise (it ~doubles latency).
git diff -- <files from the spec> to skip artifact noise):does it do the task, only the task, and match repo conventions?
--always-approve --output-format json. **Max 2 fix-up rounds.** Still failing → revert Grok's changes (git checkout -- .; git clean -fd for new files), do the task yourself, and tell the user Grok couldn't complete it.
markdown# Task: <one-line title> ## Context - Repo: <path> — <one line on what the project is> - Conventions: <test runner, formatter, a good example file to imitate> ## Files - Modify: <path> - Create: <path> ## Task <precise description of the change> ## Constraints - Do not modify any files other than those listed above. - <other constraints> ## Acceptance criteria - `<exact command>` <expected result>
- [ ] → - [x]) as each task lands and passesthe review gate.
otherwise stay sequential.
Only when a plan explicitly marks tasks independent: dispatch each with --worktree=<task-slug>, run concurrently, then review and merge one worktree at a time through the same review gate. Merge conflicts usually eat the savings — prefer sequential.
| Failure | Action | |---|---| | stopReason: "Cancelled", empty text, no diff | Missing --always-approve — retry with it | | CLI error / timeout | Retry once; then do the task yourself and note the fallback | | Auth expired | Stop; ask the user to run grok login | | 2 fix-up rounds exhausted | Revert Grok's diff; the orchestrator finishes the task | | Dirty tree at dispatch | Refuse; commit/stash first |
Default grok-4.5. Add -m grok-composer-2.5-fast only for trivial mechanical tasks.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 4,843 | 20,576 | +325% | 1 | 1 | 0% | 196 | 1,524 | +678% | 0 | 0 | — |
case-02 | fail→fail | 5,327 | 5,089 | -4% | 1 | 1 | 0% | 364 | 1,624 | +346% | 0 | 0 | — |
case-03 | fail→fail | 4,098 | 3,796 | -7% | 1 | 1 | 0% | 261 | 1,544 | +492% | 0 | 0 | — |
case-04 | pass→pass | 15,287 | 12,520 | -18% | 1 | 1 | 0% | 2,596 | 3,232 | +24% | 0 | 0 | — |
case-05 | pass→fail | 17,733 | 3,511 | -80% | 1 | 1 | 0% | 3,583 | 1,642 | -54% | 0 | 0 | — |
case-06 | pass→fail | 16,297 | 3,135 | -81% | 1 | 1 | 0% | 3,768 | 1,636 | -57% | 0 | 0 | — |
case-07 | pass→pass | 8,961 | 1,595 | -82% | 1 | 1 | 0% | 1,556 | 1,578 | +1% | 0 | 0 | — |
case-08 | pass→pass | 8,549 | 1,638 | -81% | 1 | 1 | 0% | 1,481 | 1,631 | +10% | 0 | 0 | — |
case-09 | fail→pass | 5,251 | 2,257 | -57% | 1 | 1 | 0% | 953 | 1,718 | +80% | 0 | 0 | — |
case-10 | fail→pass | 13,701 | 3,596 | -74% | 1 | 1 | 0% | 2,273 | 1,978 | -13% | 0 | 0 | — |
case-11 | fail→pass | 7,733 | 1,820 | -76% | 1 | 1 | 0% | 1,220 | 1,548 | +27% | 0 | 0 | — |
case-12 | pass→pass | 6,958 | 2,782 | -60% | 1 | 1 | 0% | 1,173 | 1,763 | +50% | 0 | 0 | — |
case-13 | fail→pass | 9,310 | 2,041 | -78% | 1 | 1 | 0% | 1,511 | 1,609 | +6% | 0 | 0 | — |
case-14 | pass→pass | 3,120 | 1,690 | -46% | 1 | 1 | 0% | 585 | 1,582 | +170% | 0 | 0 | — |
case-15 | fail→pass | 8,197 | 2,374 | -71% | 1 | 1 | 0% | 1,486 | 1,723 | +16% | 0 | 0 | — |
case-16 | fail→pass | 8,454 | 2,550 | -70% | 1 | 1 | 0% | 1,359 | 1,780 | +31% | 0 | 0 | — |
case-17 | fail→pass | 8,547 | 1,727 | -80% | 1 | 1 | 0% | 1,399 | 1,506 | +8% | 0 | 0 | — |
case-18 | fail→pass | 6,384 | 1,863 | -71% | 1 | 1 | 0% | 985 | 1,565 | +59% | 0 | 0 | — |
case-19 | fail→pass | 10,965 | 3,018 | -72% | 1 | 1 | 0% | 1,881 | 1,903 | +1% | 0 | 0 | — |
case-20 | fail→pass | 8,306 | 4,672 | -44% | 1 | 1 | 0% | 1,452 | 2,146 | +48% | 0 | 0 | — |
case-21 | pass→pass | 11,569 | 5,333 | -54% | 1 | 1 | 0% | 1,924 | 2,205 | +15% | 0 | 0 | — |
case-22 | fail→pass | 5,601 | 1,230 | -78% | 1 | 1 | 0% | 974 | 1,503 | +54% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +41 percentage points is the difference between those two pass rates over the 19 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.