aashahin/ai-skills/grok-worker
Claude Code and agent skill by aashahin/ai-skills
- community
Checking that the SKILL.md file is still in the repository.
Directly delegate implementation, fixes, debugging, architecture, planning, research, testing, documentation, and review tasks to the locally authenticated Grok Build CLI. Use whenever the user explicitly invokes Grok or $grok-worker. Route immediately through exactly one grok_worker Codex sub-agent, without opening supplemental Codex agents, while preserving isolated Git worktrees, bounded lifecycle, visible progress, and Codex verification.
Install
npx vskill@latest install aashahin/ai-skills/grok-workerSKILL.md
The same SKILL.md was published earlier as aashahin/ai-skills/grok-worker.
Use Grok Build as one externally managed worker. Preserve the user's requested action: implementation requests require implementation, not advice.
Route directly
When the user explicitly invokes Grok or $grok-worker:
- Spawn exactly one
grok_workerCodex sub-agent for the delegated task. - Do not spawn explorers, architecture agents, planners, reviewers, workers, or
other Codex sessions to prepare, parallelize, supervise, or recover the task. The parent may perform minimal read-only context collection itself.
- Launch the Grok worker promptly. Do not make ordinary Codex-agent results a
prerequisite and do not defer Grok ownership until another slice finishes.
- Keep that worker as the only Codex sub-agent for the task until its wrapper,
execution session or cell, and descendants exit.
- Spawn
grok_revieweronly when the user explicitly requests a separate Grok
review or second opinion. Never add it automatically after grok_worker.
Heavy mode may use Grok Build's own internal subagents. Those are part of the single external Grok invocation and are not additional Codex sessions.
Prepare
- Convert the task into a standalone prompt containing the exact repository and
worktree path, branch, relevant files, constraints, verification commands, and expected output.
- Put the prompt in a mode-
600temporary file. Pass the exact absolute path
with --prompt-file; do not expose the task in process arguments. Do not depend on a shell variable created by an earlier tool call. Capture the path returned by mktemp, use apply_patch to write the prompt at that exact path, and pass the literal absolute path in the launch command.
- Before launch, require
test -s <literal-path>and verify its mode is600.
A missing or empty prompt is an orchestration error; do not call the wrapper.
- Select a performance mode:
- Use
--performance heavyfor implementation, debugging, architecture,
research, or other substantial work. This preserves Grok's normal memory and subagent behavior and allows up to 128 turns.
- Use
--performance safefor small reviews or privacy-sensitive work. This
disables memory and Grok subagents and allows up to 64 turns.
- Use the wrapper defaults unless the task justifies another bound: safe runs
time out after 30 minutes, heavy runs after 60 minutes, heartbeat every 15 seconds, and final output is capped at 64 MiB. Never disable the timeout casually.
Launch exactly once
Run the wrapper outside Codex's outer sandbox with the execution tool's escalated/unsandboxed permission. This is required because Grok applies its own kernel sandbox; nesting it inside Codex's sandbox can fail or hang. Ask for a persistable approval scoped to the wrapper command when available.
For a read-only task:
For implementation in an exact linked feature worktree selected by the parent, run from that worktree:
The linked worktree must be clean unless the user explicitly delegates continuation of its current changes; only then add --allow-dirty.
If no linked worktree was supplied, run from a clean primary checkout:
Prefer a repository-required named feature worktree and --existing-worktree. Never add Grok's own --worktree flag.
Launch exactly one Grok CLI invocation per delegated task. Never retry while the wrapper, its execution session/cell, or any descendant is alive. Keep the execution attached and relay heartbeat updates. Poll the exact execution session/cell until the wrapper exits.
GROK_RUN_STARTED is the boundary that proves the wrapper launched Grok. If a command fails before that marker, report a parent/worker handoff failure, not a Grok failure, and do not silently retry in the same turn.
Accept and integrate
Require all of the following:
- Exit status zero.
- A
GROK_RUN_METADATAfooter. STOP_REASONmatching EndTurn (current Grok versions reportend_turn;
the wrapper accepts both spellings and prints the raw value).
- The reported session ID matching the launched session.
- No live descendants.
A timeout, output-limit failure, missing footer, mismatched session, interrupted process, or nonzero exit is a failed run. Do not treat partial text as completion.
After the wrapper fully exits:
- Remove the temporary source prompt file.
- Inspect Grok's result and verify important claims, paths, changes, and tests.
- For implementation, inspect the isolated worktree diff and integrate verified
changes into the user's active checkout without overwriting unrelated work.
- Run independent validation in the active checkout.
- After successful integration, remove the linked Grok worktree to release disk
space. Delete its branch only when safely merged or otherwise preserved. Retain a failed/dirty recovery worktree and report it clearly.
- Distinguish Grok's output from Codex's verification.
Never let Grok and another agent edit the same checkout simultaneously. Keep one feature or vertical slice in one worktree. Do not extract Grok cookies, browser tokens, account credentials, or session secrets.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggrok-worker/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aashahin/ai-skills/grok-worker)