⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
grok-cli
Use the locally installed Grok CLI (`grok`) for headless one-shot prompts, repo-aware coding/review prompts, model listing, and lightweight automation on this machine. Trigger when the user explicitly asks to use Grok CLI / grok-cli / `grok`, wants a local Grok run instead of OpenClaw's built-in xAI tools, wants a prompt executed inside Grok against a working directory, or wants Grok CLI-specific behavior like `grok -p`, `grok models`, or resuming a Grok session.
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
grok-cli-skills
Standalone skill bundles for using the local Grok CLI in clean, headless, repo-aware workflows.
This repository packages reusable skill variants for both OpenClaw and Codex that help an agent:
- run
grok -pheadless prompts - target a specific repository with
--dir - strip ANSI/session/progress noise from text output
- reuse prompt templates for repo summaries, code review, bug triage, and refactor planning
Why this exists
OpenClaw and Codex already have strong built-in tools, but sometimes you specifically want the local Grok CLI behavior on your own machine:
- use the installed
grokbinary directly - run repo-aware prompts against a local working tree
- keep behavior aligned with Grok CLI sessions and models
- wrap Grok CLI in a cleaner headless workflow for agent use
This repo isolates that workflow into small skills that can be installed, shared, and versioned separately.
Source / upstream
These skills are built for the local Grok CLI and document how to use it from OpenClaw or Codex.
Upstream Grok CLI project:
This repository is not the Grok CLI itself. It is a companion skill bundle for using that CLI more effectively.
Contents
grok-cli/— OpenClaw skillcodex/grok-cli/— Codex skillgrok-cli/SKILL.md— OpenClaw trigger description and operating instructionscodex/grok-cli/SKILL.md— Codex trigger description and operating instructionsgrok-cli/scripts/grok-headless-clean.sh— OpenClaw wrapper that removes ANSI/session/progress noisecodex/grok-cli/scripts/grok-headless-clean.sh— Codex wrapper that removes ANSI/session/progress noisegrok-cli/references/usage.md— OpenClaw prompt templates, examples, and model-selection notescodex/grok-cli/references/usage.md— Codex prompt templates, examples, and model-selection notesdist/grok-cli.skill— packaged skill artifact for distribution
Install
Option A — use the packaged .skill artifact
Download the latest release asset:
grok-cli.skill
Then install it with your preferred OpenClaw skill workflow.
Option B — copy the skill folder manually
For OpenClaw:
Copy the grok-cli/ directory into your skills location and reload/refresh skills in your OpenClaw environment.
For Codex:
Copy codex/grok-cli/ into your Codex skills location, typically ~/.codex/skills/grok-cli/.
Requirements
- OpenClaw or Codex
- A local
grokCLI installation on PATH - Valid Grok/xAI credentials configured for the CLI
This skill was verified on a machine where:
grok -Vreturned1.0.0-rc5grok modelsworked- headless prompt execution worked via
grok -p ...
Example usage
OpenClaw wrapper script:
./grok-cli/scripts/grok-headless-clean.sh \
--prompt "Summarize this repo in 5 bullets" \
--dir /path/to/repo
Codex wrapper script:
./codex/grok-cli/scripts/grok-headless-clean.sh \
--prompt "Summarize this repo in 5 bullets" \
--dir /path/to/repo
Raw Grok CLI:
grok -p "Review this codebase and list top risks" -d /path/to/repo --format text
Release artifacts
Each release may include:
- packaged
.skillfile for import/distribution - source files for manual inspection or installation
License
MIT
// HOW IT'S BUILT
// FILES
2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
grok-cli/SKILL.md3.6 KBupstream ↗
--- name: grok-cli description: Use the locally installed Grok CLI (`grok`) for headless one-shot prompts, repo-aware coding/review prompts, model listing, and lightweight automation on this machine. Trigger when the user explicitly asks to use Grok CLI / grok-cli / `grok`, wants a local Grok run instead of OpenClaw's built-in xAI tools, wants a prompt executed inside Grok against a working directory, or wants Grok CLI-specific behavior like `grok -p`, `grok models`, or resuming a Grok session. --- # Grok CLI Use the local `grok` binary on this machine for direct Grok CLI workflows. ## Installed facts for this machine - Binary path: `/home/deck/.nvm/versions/node/v22.22.0/bin/grok` - Verified working version: `1.0.0-rc5` - Basic headless prompt works: `grok -p "Reply with exactly: GROK_CLI_OK"` - Default workspace to use unless the user specifies another path: `/home/deck/.openclaw/workspace` ## Default behavior Prefer **headless mode** for agent use: - Use `grok -p "..."` for one-shot prompts - Add `-d <dir>` when repo context matters - Use `--format text` unless machine-readable output is explicitly useful - Use `--format json` only when you plan to parse structured events Avoid launching the interactive TUI unless the user explicitly wants the TUI. ## Safe command patterns ### 1) Version / sanity check ```bash grok -V grok models ``` ### 2) One-shot Q&A or summaries ```bash grok -p "Summarize the purpose of this repository in 5 bullets." -d /path/to/repo --format text ``` ### 3) Repo-aware coding or review prompt ```bash grok -p "Review the current codebase and list the top 5 risks." -d /path/to/repo --format text ``` ### 4) Structured output for downstream parsing ```bash grok -p "Summarize the repo state" -d /path/to/repo --format json ``` ### 5) Resume a Grok session ```bash grok -s latest grok -s <session-id> ``` Use session resume only when the user explicitly wants to continue prior Grok CLI context. ## Working directory rules - Always set `-d` / `--directory` when the task is about a specific repo or folder. - Default to `/home/deck/.openclaw/workspace` if the user does not specify a path. - If the task references another repo, resolve the path first and then pass it explicitly. ## Output handling - Grok CLI may print cosmetic ANSI color codes or a session line before the final answer. - When relaying results to the user, strip terminal noise and return the useful answer. - If the user asks for raw output, provide it explicitly. ## Suggested exec usage Prefer the bundled wrapper for text mode so output is clean: ```bash /home/deck/.openclaw/workspace/skills/grok-cli/scripts/grok-headless-clean.sh \ --prompt "<prompt>" \ --dir /some/path ``` Use raw `grok` directly when you need native behavior such as `grok models`, `grok -V`, or explicit session resume. If a run may take longer, give `exec` a larger `yieldMs` or poll the spawned process instead of tight loops. ## Bundled resources - Script: `scripts/grok-headless-clean.sh` - Use for headless text prompts with ANSI/progress/session noise stripped - Supports `--prompt`, `--dir`, `--format`, `--model`, `--session` - Reference: `references/usage.md` - Read when you need prompt templates, common command patterns, or model-selection hints ## When not to use this skill Do not use Grok CLI when OpenClaw first-class tools are better: - Use `web_search` for ordinary web research - Use `x_search` for X/Twitter search - Use `image_generate` / `image` for OpenClaw-native image flows Use this skill when the user specifically wants the **local Grok CLI** behavior, session model, or repo-aware headless prompt execution.README.mdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
Plain-text copy, no login: /skill-bundles/tern-grok-cli-skills-grok-cli.md