You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add /grok skill for xAI second opinion from Claude Code
Symmetric counterpart to /codex: review (pass/fail on [P1]), adversarial
challenge, and consult with session resume. Runs read-only via
--permission-mode plan with bin/gstack-grok-probe for auth, timeout, and
telemetry. Default headless model: grok-4.5.
Also wires a grok-review row into GSTACK REVIEW REPORT, documents the skill
in AGENTS.md / docs/skills.md / README, and skips /grok on non-Claude hosts
(same convention as /codex). Unit tests cover the probe and host-exclusion.
VERSION 1.62.0.0 (avoids open title claim on 1.61.0.0). Supersedes #2016.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,43 @@
1
1
# Changelog
2
2
3
+
## [1.62.0.0] - 2026-07-11
4
+
5
+
## **`/grok` is the symmetric counterpart to `/codex`.**
6
+
## **Independent review, challenge, or consult from xAI Grok Build CLI.**
7
+
8
+
Cross-model second opinion was a single provider. When you wanted a genuinely different model family than Claude or Codex, you had no first-class skill. `/grok` adds that voice with the same three-mode contract as `/codex`: **review** (diff-scoped `[P1]`/`[P2]` findings with a pass/fail gate), **challenge** (adversarial failure-mode hunt), and **consult** (open Q&A with session resume via `-r`/`-c`). Runs read-only via `--permission-mode plan`. Auth and hang protection live in `bin/gstack-grok-probe` (`~/.grok/auth.json` or `$XAI_API_KEY` / `$GROK_API_KEY`).
9
+
10
+
The plan-file GSTACK REVIEW REPORT gains a `grok-review` row next to `codex-review`. External hosts (Codex, Cursor, Factory, etc.) skip generating `/grok` the same way they skip `/codex` — both are Claude-host wrappers around another CLI.
11
+
12
+
### The numbers that matter
13
+
14
+
Source: local free suite after port (`bun test test/grok-hardening.test.ts` + skill-validation / gen-skill-docs).
15
+
16
+
| Metric | Value |
17
+
|--------|-------|
18
+
| Probe unit tests | 10/10 pass |
19
+
| Default headless model | `grok-4.5` (`-m`, overridable) |
20
+
| Hosts that skip `/grok` generation | all non-Claude hosts (parity with `/codex`) |
21
+
22
+
### What this means for you
23
+
24
+
After `./setup`, run `/grok review`, `/grok challenge security`, or `/grok Is this migration ordering safe?`. Requires `grok` on PATH and `grok login` or `$XAI_API_KEY`. Orthogonal to Grok-as-host work (#2028) and to the plan-review `llm` fallback chain (#1631).
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,6 +223,7 @@ Each skill feeds into the next. `/office-hours` writes a design doc that `/plan-
223
223
| Skill | What it does |
224
224
|-------|-------------|
225
225
|`/codex`|**Second Opinion** — independent code review from OpenAI Codex CLI. Three modes: review (pass/fail gate), adversarial challenge, and open consultation. Cross-model analysis when both `/review` and `/codex` have run. |
226
+
|`/grok`|**Second Opinion (xAI)** — independent code review from Grok Build CLI. Same three modes as `/codex` (review/challenge/consult) with read-only `--permission-mode plan`. Cross-model analysis when `/review`, `/codex`, and `/grok` have run. |
226
227
|`/careful`|**Safety Guardrails** — warns before destructive commands (rm -rf, DROP TABLE, force-push). Say "be careful" to activate. Override any warning. |
227
228
|`/freeze`|**Edit Lock** — restrict file edits to one directory. Prevents accidental changes outside scope while debugging. |
228
229
|`/guard`|**Full Safety** — `/careful` + `/freeze` in one command. Maximum safety for prod work. |
Copy file name to clipboardExpand all lines: devex-review/SKILL.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1127,7 +1127,7 @@ After completing the review, read the review log and config to display the dashb
1127
1127
~/.claude/skills/gstack/bin/gstack-review-read
1128
1128
```
1129
1129
1130
-
Parse the output. Find the most recent entry for each skill (plan-ceo-review, plan-eng-review, review, plan-design-review, design-review-lite, adversarial-review, codex-review, codex-plan-review). Ignore entries with timestamps older than 7 days. For the Eng Review row, show whichever is more recent between `review` (diff-scoped pre-landing review) and `plan-eng-review` (plan-stage architecture review). Append "(DIFF)" or "(PLAN)" to the status to distinguish. For the Adversarial row, show whichever is more recent between `adversarial-review` (new auto-scaled) and `codex-review` (legacy). For Design Review, show whichever is more recent between `plan-design-review` (full visual audit) and `design-review-lite` (code-level check). Append "(FULL)" or "(LITE)" to the status to distinguish. For the Outside Voice row, show the most recent `codex-plan-review` entry — this captures outside voices from both /plan-ceo-review and /plan-eng-review.
1130
+
Parse the output. Find the most recent entry for each skill (plan-ceo-review, plan-eng-review, review, plan-design-review, design-review-lite, adversarial-review, codex-review, grok-review, codex-plan-review). Ignore entries with timestamps older than 7 days. For the Eng Review row, show whichever is more recent between `review` (diff-scoped pre-landing review) and `plan-eng-review` (plan-stage architecture review). Append "(DIFF)" or "(PLAN)" to the status to distinguish. For the Adversarial row, show whichever is more recent between `adversarial-review` (new auto-scaled) and `codex-review` (legacy). For Design Review, show whichever is more recent between `plan-design-review` (full visual audit) and `design-review-lite` (code-level check). Append "(FULL)" or "(LITE)" to the status to distinguish. For the Outside Voice row, show the most recent `codex-plan-review` entry — this captures outside voices from both /plan-ceo-review and /plan-eng-review.
1131
1131
1132
1132
**Source attribution:** If the most recent entry for a skill has a \`"via"\` field, append it to the status label in parentheses. Examples: `plan-eng-review` with `via:"autoplan"` shows as "CLEAR (PLAN via /autoplan)". `review` with `via:"ship"` shows as "CLEAR (DIFF via /ship)". Entries without a `via` field show as "CLEAR (PLAN)" or "CLEAR (DIFF)" as before.
1133
1133
@@ -1199,6 +1199,8 @@ Parse each JSONL entry. Each skill logs different fields:
Copy file name to clipboardExpand all lines: docs/skills.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ Detailed guides for every gstack skill — philosophy, workflow, and examples.
43
43
||||
44
44
|**Multi-AI**|||
45
45
|[`/codex`](#codex)|**Second Opinion**| Independent review from OpenAI Codex CLI. Three modes: code review (pass/fail gate), adversarial challenge, and open consultation with session continuity. Cross-model analysis when both `/review` and `/codex` have run. |
46
+
|[`/grok`](#grok)|**Second Opinion (xAI)**| Independent review from Grok Build CLI. Same three modes as `/codex` with read-only `--permission-mode plan`. Cross-model analysis when `/review`, `/codex`, and `/grok` have run. |
46
47
|[`/pair-agent`](#pair-agent)|**Remote Agent Bridge**| Pair a remote AI agent (OpenClaw, Codex, Cursor, Hermes) with your browser. Scoped tunnel, locked allowlist, session token. |
47
48
|[`/setup-gbrain`](#setup-gbrain)|**Memory Sync**| Set up gbrain for cross-machine session memory sync. One command from zero to live. |
48
49
|[`/sync-gbrain`](#sync-gbrain)|**Keep Brain Current**| Refresh gbrain against this repo's code; teach the agent when to use `gbrain search`/`code-def` over Grep. Idempotent; safe to re-run. |
This is the **xAI second opinion** — the symmetric counterpart to `/codex`.
1064
+
1065
+
When you're in Claude Code and want a perspective from Grok (different training, different blind spots), `/grok` wraps the Grok Build CLI in read-only `--permission-mode plan` and runs the same three-mode contract as `/codex`: review (with `[P1]`/`[P2]` gate), adversarial challenge, and consult with session resume via `-r` / `-c`.
1066
+
1067
+
Requires `grok` on PATH and auth via `grok login` or `$XAI_API_KEY`. Install: Grok Build CLI from xAI.
1068
+
1069
+
```
1070
+
You: /grok review
1071
+
1072
+
Claude: Running independent Grok review...
1073
+
1074
+
GROK SAYS (code review):
1075
+
GATE: PASS
1076
+
[P2] Missing timeout on outbound HTTP client — hung requests block worker pool
1077
+
1078
+
Cross-model analysis (vs /codex review):
1079
+
UNIQUE TO GROK: HTTP client timeout
1080
+
UNIQUE TO CODEX: race in session cleanup
1081
+
```
1082
+
1083
+
---
1084
+
1059
1085
## Safety & Guardrails
1060
1086
1061
1087
Four skills that add safety rails to any Claude Code session. They work via Claude Code's PreToolUse hooks — transparent, session-scoped, no configuration files.
0 commit comments