Grok cli agent
Run xAI Grok Build CLI headlessly via grok-exec.sh. Use when the user asks for grok, Grok Build, xAI coding agent, spawn_subagent, or grok worktrees. -r is plan mode with write/shell denied; -T asks for native subagent fan-out; -w enables --worktree. No PTY required. Orchestrator owns git.From its SKILL.md
npx -y skills add ImL1s/agent-cli-skills --skill grok-cli-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.9 KB, 489 tokens by cl100k_base, as published. Nobody here has run it
Grok Build CLI (grok) Executor
When to use
- User wants grok / Grok Build as the coding agent
- Need Grok
spawn_subagent,--agentsJSON, or--worktreeisolation from an orchestrator
Wrapper
./grok-exec.sh -C /path/to/repo -t 1800s "Implement X. NO git."
./grok-exec.sh -r -C /path/to/repo "Review lib/foo for races"
./grok-exec.sh -T -C /path/to/repo "Parallel research + implement"
./grok-exec.sh -f /tmp/bundle.txt -m grok-4.5 -e high -o json
./grok-exec.sh -w feat-branch -C /path/to/repo "Isolated worktree edit"
Flags: -m · -t · -C · -e effort · -o plain|json|streaming-json · -f · -r (plan + deny write/shell) ·
-s PROFILE · -T native subagent preamble · -w [NAME] worktree · --agents JSON ·
--max-turns · --json-schema · --rules · --disable-web-search · --no-git · -- passthrough.
Default model: grok-4.5 (grok models). No PTY needed — headless -p works on pipes.
-C is absolutized before use.
Native multi-agent
Grok has first-class spawn_subagent (types: general-purpose, explore, plan),
--agents JSON definitions, --no-subagents, --worktree isolation.
-T asks the model to fan out freely and synthesize.
Discipline
- Exit code untrusted — verify results yourself
- Orchestrator owns git (
--no-git) - Long prompts: always
-ffile
Raw surface
See grok --help: permission modes, sandbox, json-schema, tools allow/deny, resume/continue,
grok agent (stdio/headless/serve/leader), worktree, export, doctor.
What ships with it: 4 files
17.0 KB alongside SKILL.md, 4 of them executable
lib/
- common.shruns6.8 KB
- parse_stream_json.pyruns3.5 KB
- pty_run.pyruns1.7 KB
- grok-exec.shruns4.9 KB
Gives 0 of the 12 instructions most agent orchestration skills give in 489 tokens
Counted across 848 of the 1,300 authors here whose files we hold, read 2026-09-06
- Dispatch one agent per independent problem domainin 56 of 848, across 42 files
- Run full test suite after integrationin 55 of 848, across 42 files
- Verify fixes do not conflictin 40 of 848, across 32 files
- Review each summary when agents returnin 40 of 848, across 31 files
- Write a handoff document summarising the current conversationin 30 of 848, across 25 files
- Reference existing artifacts by path or URLin 26 of 848, across 24 files
- Give each agent a specific scopein 19 of 848, across 10 files
- Give each agent a clear goalin 19 of 848, across 10 files
- Include a suggested skills section in the documentin 18 of 848, across 16 files
- Tailor the doc to the user argumentsin 18 of 848, across 15 files
- Issue all subagent dispatches in the same responsein 17 of 848, across 11 files
- Use git worktrees for isolationin 17 of 848, across 8 files
Said here and by no other author read
- Run xAI Grok Build CLI headlessly via grok-exec.sh
- Verify results yourself
- Use file flag for long prompts
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.