/open-skills:headless-grokfrom open-skills
Runs bounded Grok Build coding-agent tasks through the official grok CLI. Useful for headless task execution without installation or auth changes.
Ships in open-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Before every run, read access and failure handling and discover the current host state. The bundled scripts/check-access.mjs performs filesystem discovery only. A found CLI is not proof of login, subscription quota, API credits, model access, Windows containment, or parent supervision. Missing tools produce explicit route gaps; never install, authenticate, fall back to the API or change configuration automatically.
Run one bounded task through xAI's official Grok Build coding-agent CLI. This skill preserves the Handler's model, authentication route, permissions, directory, deadline, and retry decision. It does not install the CLI, change credentials or settings, enable billing, buy credits, or turn an X Premium/Grok subscription into API entitlement.
Load setup and login only when the CLI is absent, login is required, or the Handler explicitly requests setup. Setup is a separate authorized workflow; execution never performs it automatically. Reuse an existing selected subscription login. For simple literal text work, load the tested lean run and bundled profile; verify them on the current platform and CLI version before use.
Structured execution spec: protocol.yon. Read it for the canonical rules and step sequence; this file is explanation. The two must stay in sync; update both when their contract changes and refresh the @STAMP date.
For an unspecified model or effort, use the Grok Build column of the bundled task and effort starting policy. Apply caller constraints first, validate the exact choice against this runtime, and disclose the selection and uncertainty. Fill only an unspecified field; never replace a selected model to apply the table. Explicit model and effort remain controlling. This skill is complete without route-task, headless-models or the updater; do not sweep unrelated provider catalogs.
Read the shared run contract, freshness policy, and model state. Run the bundled freshness checker when Node is available. Due evidence triggers one parent-owned offer to update the complete family or continue with the dated snapshot. A child reports due status and stops for that choice; it never refreshes recursively.
XAI_API_KEY, GROK_API_KEY, GROK_MODELS_BASE_URL, GROK_MODELS_LIST_URL and XAI_API_BASE_URL; never print values or clear them automatically. Unexpected routing stops execution for review; setup/login remains conditional and separately scoped. Resolve the actual grok executable. Run grok --version, grok --help, and grok models; verify every flag against current local help before launch. Determine platform support on the target host. Dated absence or runtime results from the maintainer host belong only to validation boundaries and do not constrain another machine.--add-dir with "additionalDirectories is not supported", so a multi-root review needs one bundled working directory holding the reviewed inputs. Re-verify against current help.grok-4.7, with a 500k context window and configurable reasoning. Documentation is not local entitlement; use only a model returned by grok models. Never silently substitute a model or auth route.XAI_API_KEY. Existing browser/device login is preferred only when the Handler selects the consumer route. An API key has separate billing and requires explicit authorization plus a budget. Never print keys or inspect credential stores. Verify documented credential precedence and diagnose only variable presence/scope.For a literal baseline, use the locally verified lean profile, --permission-mode dontAsk, --no-subagents, and --disable-web-search, with zero advertised tools required for acceptance. The tested CLI did not support legacy --no-memory or --no-auto-update; use the child-scoped environment controls in lean run. An empty --tools argument alone did not remove advertised tools in the trial. Add only exact required tools and path rules using locally help-verified controls. A prompt is not a permission boundary. Never broaden settings or remove a denial to make a run pass.
The documentation describes sandboxing, but Windows containment has not been established for this workflow. Do not claim enforced read-only or exact filesystem isolation unless independently verified on the target version. For work requiring that boundary, stop. Otherwise disclose that tool monitoring detects actions after dispatch and use a trusted minimal directory.
Disable subagents by default. Nested delegation requires a separate explicit, bounded, observable and cancellable authorization. Disable memory and web search for literal prompts unless the task explicitly requires and authorizes them. Do not load unrelated instructions, MCP servers, skills, hooks, or repository configuration without review.
Use a foreground child owned by a supervisor that returns control, retains the process handle, captures stdout and stderr concurrently, reports a checkpoint within 60 seconds, enforces an external deadline, and can stop only that process tree. The CLI has no documented hard task timeout, so an external deadline is mandatory. Use the shared file-backed process runner on Windows when direct pipe capture fails.
After verifying current help, a baseline literal run has this shape:
grok -p "<literal prompt>" --agent <skill-directory>/profiles/lean-text.md --model <listed-model> --reasoning-effort <supported-effort> --max-turns 1 --output-format streaming-json --permission-mode dontAsk --no-subagents --disable-web-search --verbatim --disallowed-tools read_file,search_tool,use_tool
Pass arguments separately with shell execution disabled. Do not interpolate untrusted text into shell syntax. Use json or streaming-json only after verifying the current output contract; retain raw stdout, stderr, process identity, exit code, session ID when present, and terminal result. Plain output is for short human use, not structured acceptance.
Inspect every observed tool, target, denial, error, auth/billing diagnostic and model identity. Stop on scope drift. On timeout, interrupt through the supervisor and, if necessary, terminate only the retained process tree. Confirm it stopped; never kill by executable name. Preserve partial output and report uncertain cleanup as incomplete.
Exit zero means the harness finished, not that the task is correct. Require a complete nonempty terminal result, expected model/auth route, no denial/error/timeout/cancellation/malformed event, and only approved observed actions. Independently verify the requested answer or artifact. A public output format is not assumed to be a stable machine-readable schema across versions; reject unfamiliar structures rather than guessing.
Resume only when requested, using the exact retained session ID and the current help-supported resume command. Repeat preflight, permissions, model, auth route, deadline and supervision. Do not use a latest-session shortcut in automation.
Report CLI version, auth evidence without secrets, selected model/reasoning, permission mode, working-directory category, redacted command shape, deadline, output location, exit/result status, observed actions, verification, and gaps. On authentication, quota, billing, model, permission, malformed-output or cleanup failure, preserve the exact error and stop. Retry at most once only with new evidence, explicit authorization, and remaining budget.
Read validation boundaries before changing command, parser, permission, authentication, or billing guidance.
Self-improvement. If a run exposes a concrete material or recurring weakness, missing good practice, or unrecorded fixed pitfall, propose a specific repair for approval. Otherwise remain silent. Never auto-apply.
For current account quota and reset times, use headless-usage. grok usage <SESSION_ID> [TURN] reports persisted session accounting, not remaining subscription quota or reset time. Use the current interactive /usage or Settings -> Usage for the remaining shared pool; without an observed surface, report unknown.
Use the projected file-backed process runner on Windows when direct capture is unavailable. A successful version probe does not prove login, runtime-state writes, network access, subscription quota, or sandbox containment. The fixed outer dispatcher is available only from an already authorized capable host with one immutable reviewed launcher. Never copy credentials, weaken permissions, or switch billing routes to make a nested launch work.
profiles/lean-text.md (opens in a new tab)protocol.yon (opens in a new tab)references/access.md (opens in a new tab)references/fixed-dispatch.md (opens in a new tab)references/freshness.md (opens in a new tab)references/lean-run.md (opens in a new tab)references/model-selection.md (opens in a new tab)references/model-state.json (opens in a new tab)references/process-supervision.md (opens in a new tab)references/run-contract.md (opens in a new tab)references/setup-and-login.md (opens in a new tab)references/validation.md (opens in a new tab)scripts/check-access.mjs (opens in a new tab)scripts/check-model-freshness.mjs (opens in a new tab)scripts/dispatch-fixed.mjs (opens in a new tab)scripts/run-process.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub allemaar/open-skills --plugin open-skills93 skills in this plugin
/agent-mailboxTwo or more agents — any harness, any vendor — collaborate through any shared folder: share a folder, load the skill, point at it.
/agent-outputCompact agent-to-agent communication contract for worker reports, handoffs, status, blockers, and review findings. Trigger phrases: "/agent-output", "brief the worker", "make agent reports terse". Not a transport; use /agent-mailbox for delivery.
/ask-gateThe Ask-Gate Protocol (AGP). Before surfacing an AskUserQuestion, triage whether the question is genuinely the handler's call (anti-nag); ask routine questions directly after a quality checklist, but escalate high-stakes / branching / irreversible ones through /insight-critique then /insight-assess first. Trigger via /ask-gate, or automatically before any handler-facing question. Not /caller-options (routes a skill's venue/mode) or /next-skills (recommends successors) — AGP governs the question itself.
/ask-meConstructively interview someone about an idea, task, project or decision so useful work can start. Use when explicitly asked to be interviewed, including “ask me”; ordinary task requests do not start this interview./audit-code-commentsInventory the code comments in a repository, classify each one against the code it sits beside (tautology, stale, excuse, decision, keep, uncertain), then report, prune or strictly migrate them: delete noise, turn excuse comments into issue drafts, move decisions into ADRs, and optionally lock the result with a per-file comment ratchet. Edits go through a real parser with a token guard. Scales from a small module to a large repo with a pilot batch, path stages and budget gates. Trigger on /audit-code-comments, "audit the comments in this repo", "clean up code comments", "move comments to ADRs", "turn TODO comments into issues", "add a comment ratchet". Not for reviewing a diff for bugs (use /cold-review), not for prose in docs (use /prose-audit), not for duplicated constants (use /audit-coupled-constant).
/audit-coupled-constantAudit every site of a constant whose value is duplicated across multiple call sites (retry budgets, timeouts, page sizes, magic numbers, feature flags). The author-maintained `SEE ALSO` trail is documentation, not enforcement — one missed site means the trail lies. Trigger on /audit-coupled-constant, "audit budget consistency", "find all sites of this value", "check coupled invariant", "before raising this constant", or after any edit to a constant that has SEE ALSO cross-references in its comments. Pairs naturally before /cold-review on a "raise the budget" PR. Not for extract-constant refactors that consolidate scattered values into a single named import — use /improve-codebase-architecture. Not for constants enforced by the type system (TypeScript `as const` literal imported everywhere) where the compiler is the audit — skip.Other plugins' skills for the same job