# Usecli Grok

> Use Grok as an external CLI worker inside a Claude Code or LikeCode-centered workflow. Good for critical review and alternative perspectives. Requires GROK_API_KEY or equivalent local configuration.

- Skill: `harzva/usecli-grok` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add harzva/usecli-grok`
- Raw SKILL.md: https://api.skillmd.com/api/skills/harzva/usecli-grok/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: harzva (https://skillmd.com/u/harzva)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/harzva/usecli-grok

---


# usecli-grok

## Overview

Use xAI Grok CLI as an external worker inside a Claude Code workflow.

Best for:
- critical review
- alternative perspectives
- challenging assumptions
- contrarian critique

## Install

This sub-skill can be installed independently:

```bash
skill install https://github.com/Harzva/usecli-grok
```

Or manually:

```bash
git clone https://github.com/Harzva/usecli-grok.git
mkdir -p ~/.claude/skills
ln -s $(pwd) ~/.claude/skills/usecli-grok
```

## Command

```bash
bash ~/.claude/skills/usecli-grok/scripts/usecli-grok.sh --prompt "<prompt>"
```

Or with a prompt file:

```bash
bash ~/.claude/skills/usecli-grok/scripts/usecli-grok.sh --prompt-file <path>
```

## Verification

Run the local smoke test:

```bash
bash ~/.claude/skills/usecli-grok/tests/test_wrapper.sh
```

## Environment Variables

| Variable | Purpose | Default |
| --- | --- | --- |
| `USECLI_GROK_BIN` | Grok executable | `grok` |
| `USECLI_GROK_MODEL` | Model override | (none) |
| `USECLI_GROK_TIMEOUT` | Timeout seconds | (none) |

## Good Fits

- When you want a critic to challenge assumptions
- When you need alternative perspectives on a plan or design
- When you want contrarian feedback before final decisions

## Notes

- Uses `grok --prompt` in headless mode
- Requires `GROK_API_KEY` or equivalent local configuration
- Useful as a secondary lane once API key is configured

## Resources

### `bin/usecli-grok.sh`

The wrapper script. Sources `bin/usecli-lib.sh` for shared functionality.

### `examples/workflows/gemini-grok-review.sh`

Demonstrates Gemini + Grok review workflow.
