[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M785B7067Y9GPWB0YA87W94M":3,"skill-same:01M785B7067Y9GPWB0YA87W94M":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M785B7067Y9GPWB0YA87W94M","grok",null,"Delegate coding to xAI Grok Build CLI (features, PRs).","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Foptional-skills\u002Fgrok\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: grok\ndescription: \"Delegate coding to xAI Grok Build CLI (features, PRs).\"\nversion: 0.1.0\nauthor: Matt Maximo (MattMaximo), Hermes Agent\nlicense: MIT\nplatforms: [linux, macos, windows]\ncategory: autonomous-ai-agents\ntags: [Coding-Agent, Grok, xAI, Code-Review, Refactoring, Automation]\ncompatible: [claude-code, openai-agents, hermes-agent, autogen, langchain, any-llm]\nsource: optional\n---\n\n# Grok Build CLI — Hermes Orchestration Guide\n\nDelegate coding tasks to [Grok Build](https:\u002F\u002Fdocs.x.ai\u002Fbuild\u002Foverview) (xAI's\nautonomous coding agent CLI, the `grok` command) via the Hermes terminal. Grok\ncan read files, write code, run shell commands, spawn subagents, and manage git\nworkflows. It runs three ways: an interactive TUI, **headless** (`-p`), and as\nan **ACP agent** over JSON-RPC.\n\nThis is the third sibling to `codex` and `claude-code`. The orchestration\npattern is nearly identical — **prefer headless `-p` for one-shots**, use a PTY\nfor interactive sessions.\n\n## When to use\n\n- Building features\n- Refactoring\n- PR reviews\n- Batch issue fixing\n- Any task where you'd otherwise reach for Codex \u002F Claude Code but want Grok\n\n## Prerequisites\n\n- **Install (preferred):** `npm install -g @xai-official\u002Fgrok`\n  - The official installer `curl -fsSL https:\u002F\u002Fx.ai\u002Fcli\u002Finstall.sh | bash` also\n    works, but the `x.ai` host is Cloudflare-walled in some environments. The\n    npm path avoids that dependency entirely.\n- **Auth — SuperGrok \u002F X Premium+ subscription (primary path):**\n  - Run `grok login` once → opens a browser for OAuth → token cached in\n    `~\u002F.grok\u002Fauth.json`. This uses your **SuperGrok or X Premium+** subscription\n    (no per-token API billing).\n  - Check sign-in state by looking for `~\u002F.grok\u002Fauth.json`, or run a cheap\n    headless smoke test: `grok --no-auto-update -p \"Say ok.\"`\n  - In the TUI, `\u002Flogout` signs out and `\u002Flogin` (or relaunching) signs back in.\n- **No git repo required** — unlike Codex, Grok runs fine outside a git\n  directory (good for scratch\u002Fthrowaway tasks).\n- **Claude Code \u002F AGENTS.md compatible with zero config** — Grok auto-reads\n  `CLAUDE.md`, `.claude\u002F` (skills, agents, MCPs, hooks, rules), and the\n  `AGENTS.md` family. Existing project context just works.\n\n> **API-key fallback (not the default for this user):** Grok also supports\n> setting the `XAI_API_KEY` environment variable for pay-as-you-go billing\n> via `api.x.ai`. Only use\n> this if `grok login` \u002F SuperGrok auth is unavailable. The subscription path\n> (`grok login`) is the intended setup here.\n\n## Two Orchestration Modes\n\n### Mode 1: Headless (`-p`) — Non-Interactive (PREFERRED)\n\nRuns a one-shot task, prints the result, and exits. No PTY, no interactive\ndialogs to navigate. This is the cleanest integration path — the analog of\n`claude -p` and `codex exec`.\n\n```\nterminal(command=\"grok --no-auto-update -p 'Add a dark mode toggle to settings'\", workdir=\"\u002Fpath\u002Fto\u002Fproject\", timeout=180)\n```\n\nAlways pass `--no-auto-update` in automation to skip background update checks.\n\n**When to use headless:**\n- One-shot coding tasks (fix a bug, add a feature, refactor)\n- CI\u002FCD automation and scripting\n- Structured output parsing with `--output-format json`\n- Any task that doesn't need multi-turn conversation\n\n### Mode 2: Interactive PTY — Multi-Turn TUI Sessions\n\nThe TUI is a fullscreen, mouse-interactive app. Drive it with `pty=true`. For\nrobust monitoring\u002Finput use tmux (same pattern as the `claude-code` skill).\n\n```\n# Launch in a tmux session for capture-pane monitoring\nterminal(command=\"tmux new-session -d -s grok-work -x 140 -y 40\")\nterminal(command=\"tmux send-keys -t grok-work 'cd \u002Fpath\u002Fto\u002Fproject && grok' Enter\")\n\n# Wait for startup, then send a task\nterminal(command=\"sleep 5 && tmux send-keys -t grok-work 'Refactor the auth module to use JWT' Enter\")\n\n# Monitor progress\nterminal(command=\"sleep 15 && tmux capture-pane -t grok-work -p -S -50\")\n\n# Exit when done\nterminal(command=\"tmux send-keys -t grok-work '\u002Fquit' Enter && sleep 1 && tmux kill-session -t grok-work\")\n```\n\n**Tip for headless-but-inline output:** if you want TUI-style output without the\nfullscreen alt-screen takeover (e.g. for cleaner logs), add `--no-alt-screen`.\nFor pure automation, headless `-p` is still cleaner than the TUI.\n\n## Headless Deep Dive\n\n### Common Flags\n\n| Flag | Effect |\n|------|--------|\n| `-p, --single \u003CPROMPT>` | Send one prompt, run headless, exit |\n| `-m, --model \u003CMODEL>` | Choose a model |\n| `-s, --session-id \u003CID>` | Create or resume a named headless session |\n| `-r, --resume \u003CID>` | Resume an existing session |\n| `-c, --continue` | Continue the most recent session in the current directory |\n| `--cwd \u003CPATH>` | Set the working directory |\n| `--output-format \u003CFMT>` | `plain` (default), `json`, or `streaming-json` |\n| `--always-approve` | Auto-approve all tool executions (the `--full-auto` \u002F `--yolo` equivalent) |\n| `--no-alt-screen` | Run inline, no fullscreen TUI takeover |\n| `--no-auto-update` | Skip background update checks (use in all automation) |\n\n### Output Formats\n\n- `plain` — human-readable text (default)\n- `json` — one JSON object at the end of the run (parse the result cleanly)\n- `streaming-json` — newline-delimited JSON events as they arrive\n\n```\n# Structured result for parsing\nterminal(command=\"grok --no-auto-update -p 'List all TODO comments in src\u002F' --output-format json\", workdir=\"\u002Fproject\", timeout=120)\n\n# Auto-approve for autonomous building\nterminal(command=\"grok --no-auto-update --always-approve -p 'Refactor the database layer and run the tests'\", workdir=\"\u002Fproject\", timeout=300)\n```\n\n### Background Mode (Long Tasks)\n\n```\n# Start headless in background\nterminal(command=\"grok --no-auto-update --always-approve -p 'Refactor the auth module'\", workdir=\"\u002Fproject\", background=true, notify_on_complete=true)\n# Returns session_id\n\n# Monitor\nprocess(action=\"poll\", session_id=\"\u003Cid>\")\nprocess(action=\"log\", session_id=\"\u003Cid>\")\n\n# Kill if needed\nprocess(action=\"kill\", session_id=\"\u003Cid>\")\n```\n\nFor an interactive (TUI) background session, use `pty=true` + tmux and monitor\nwith `tmux capture-pane`, exactly like the `claude-code` \u002F `codex` skills.\n\n### Session Continuation\n\n```\n# Start a named session\nterminal(command=\"grok --no-auto-update -s refactor-db -p 'Start refactoring the database layer' --always-approve\", workdir=\"\u002Fproject\", timeout=240)\n\n# Resume it later\nterminal(command=\"grok --no-auto-update -r refactor-db -p 'Now add connection pooling' --always-approve\", workdir=\"\u002Fproject\", timeout=180)\n\n# Or continue the most recent session in this directory\nterminal(command=\"grok --no-auto-update -c -p 'What did you change last time?'\", workdir=\"\u002Fproject\", timeout=60)\n```\n\n## Read-Only Audit → Markdown Note Pattern\n\nTo have Grok review local artifacts and return a clean markdown note (for\nObsidian or a repo) without mutating anything:\n\n1. Prepare stable input files first with Hermes tools (`read_file`,\n   `write_file`). Snapshot only the relevant context into a temp file rather\n   than dumping raw paths.\n2. Run Grok headless **without** `--always-approve` so it cannot auto-write, and\n   demand `markdown only, no preamble`.\n3. Save Grok's stdout straight into the destination note with `write_file()`.\n\n```\ngrok --no-auto-update -p \"Read \u002Ftmp\u002Fcurrent.md and \u002Ftmp\u002Finventory.md. Produce markdown only, no preamble. Output a clean note titled 'Cleanup Review'.\" --output-format plain\n```\n\n**Pitfall (same as Claude Code):** for document rewrites, a loose \"rewrite this\"\nprompt may return a change summary instead of the full file. Instead: pipe the\nfile in, and demand `Return ONLY the full revised markdown document. No intro,\nno explanation, no code fences. Start immediately with '# Title'.` Verify the\nfirst lines with `read_file()` before overwriting the destination.\n\n## PR Review Patterns\n\n### Quick Review (Headless)\n\n```\nterminal(command=\"cd \u002Fpath\u002Fto\u002Frepo && git diff main...feature-branch | grok --no-auto-update -p 'Review this diff for bugs, security issues, and style problems. Be thorough.'\", timeout=120)\n```\n\n### Clone-to-temp Review (safe, no repo mutation)\n\n```\nterminal(command=\"REVIEW=$(mktemp -d) && git clone https:\u002F\u002Fgithub.com\u002Fuser\u002Frepo.git $REVIEW && cd $REVIEW && gh pr checkout 42 && grok --no-auto-update -p 'Review the changes vs origin\u002Fmain. Check bugs, security, race conditions, missing tests.'\", pty=true, timeout=300)\n```\n\n### Post the review\n\n```\nterminal(command=\"gh pr comment 42 --body '\u003Creview text>'\", workdir=\"\u002Fpath\u002Fto\u002Frepo\")\n```\n\n## Parallel Issue Fixing with Worktrees\n\n```\n# Create worktrees\nterminal(command=\"git worktree add -b fix\u002Fissue-78 \u002Ftmp\u002Fissue-78 main\", workdir=\"~\u002Fproject\")\nterminal(command=\"git worktree add -b fix\u002Fissue-99 \u002Ftmp\u002Fissue-99 main\", workdir=\"~\u002Fproject\")\n\n# Launch Grok headless in each (background)\nterminal(command=\"grok --no-auto-update --always-approve -p 'Fix issue #78: \u003Cdescription>. Commit when done.'\", workdir=\"\u002Ftmp\u002Fissue-78\", background=true, notify_on_complete=true)\nterminal(command=\"grok --no-auto-update --always-approve -p 'Fix issue #99: \u003Cdescription>. Commit when done.'\", workdir=\"\u002Ftmp\u002Fissue-99\", background=true, notify_on_complete=true)\n\n# Monitor\nprocess(action=\"list\")\n\n# After completion: push and open PRs\nterminal(command=\"cd \u002Ftmp\u002Fissue-78 && git push -u origin fix\u002Fissue-78\")\nterminal(command=\"gh pr create --repo user\u002Frepo --head fix\u002Fissue-78 --title 'fix: ...' --body '...'\")\n\n# Cleanup\nterminal(command=\"git worktree remove \u002Ftmp\u002Fissue-78\", workdir=\"~\u002Fproject\")\n```\n\n## Useful Subcommands & TUI Commands\n\n| Command | Purpose |\n|---------|---------|\n| `grok` | Start the interactive TUI |\n| `grok -p \"query\"` | Headless one-shot |\n| `grok login` \u002F `grok logout` | Sign in \u002F out (SuperGrok \u002F X Premium+ OAuth) |\n| `grok inspect` | Show what Grok discovered in cwd: config sources, instructions, skills, plugins, hooks, MCP servers |\n| `grok agent stdio` | Run as an ACP agent over JSON-RPC (for IDE\u002Ftool integration) |\n| `grok update` | Update the CLI (needs the `x.ai` host; skip in automation) |\n\nTUI slash commands (interactive only): `\u002Fmodel \u003Cname>`, `\u002Falways-approve`,\n`\u002Fplan`, `\u002Fcontext`, `\u002Fcompact`, `\u002Fresume`, `\u002Fsessions`, `\u002Ffork`, `\u002Fusage`,\n`\u002Fquit`. `Shift+Tab` cycles session modes (including Plan mode, which blocks\nwrite tools except the session plan file).\n\n## Config (`~\u002F.grok\u002Fconfig.toml`)\n\n```toml\n[cli]\nauto_update = false          # skip background update checks persistently\n\n[ui]\npermission_mode = \"ask\"      # or \"always-approve\" to skip tool prompts by default\n\n[models]\ndefault = \"grok-build-0.1\"\n```\n\nPut global preferences in `~\u002F.grok\u002Fconfig.toml` (not project-scoped\n`.grok\u002Fconfig.toml`). `permission_mode` supersedes the legacy `approval_mode` \u002F\n`yolo = true` keys.\n\n## Pitfalls & Gotchas\n\n1. **Auth is subscription-gated.** `grok login` requires a SuperGrok or X\n   Premium+ subscription. If login fails or there's no `~\u002F.grok\u002Fauth.json`,\n   confirm the subscription is active before falling back to `XAI_API_KEY`.\n2. **Don't conflate Hermes' xAI auth with the `grok` CLI's auth.** Hermes'\n   `x_search` runs on its own xAI OAuth; the standalone `grok` CLI has a\n   separate token in `~\u002F.grok\u002Fauth.json`. A working `x_search` does NOT mean\n   `grok` is logged in.\n3. **Always pass `--no-auto-update` in automation** — otherwise Grok phones home\n   for update checks (and `x.ai`\u002F`storage.googleapis.com` may be unreachable).\n4. **Prefer npm install over the curl installer** — `npm install -g\n   @xai-official\u002Fgrok` avoids the Cloudflare-walled `x.ai` host.\n5. **`--always-approve` is the autonomous-build switch.** Without it, headless\n   runs may stall waiting on tool-approval prompts. Omit it deliberately for\n   read-only review\u002Faudit work so Grok can't mutate files.\n6. **Headless `-p` skips TUI dialogs**; the TUI needs `pty=true` (+ tmux for\n   monitoring), just like Claude Code.\n7. **Use `--no-alt-screen`** if you run the TUI inline and the fullscreen\n   alt-screen takeover garbles captured output.\n8. **No git repo needed**, but for PR\u002Fcommit workflows you still want one — use\n   `mktemp -d && git init` for scratch commit tasks.\n9. **Clean up tmux sessions** with `tmux kill-session -t \u003Cname>` when done.\n\n## Rules for Hermes Agents\n\n1. **Prefer headless `-p`** for single tasks — cleanest integration, structured\n   output via `--output-format json`.\n2. **Always set `workdir`** (or `--cwd`) so Grok targets the right project.\n3. **Pass `--no-auto-update`** in every automated invocation.\n4. **Use `--always-approve` only when Grok should write autonomously**; omit it\n   for read-only reviews and audits.\n5. **Background long tasks** with `background=true, notify_on_complete=true` and\n   monitor via the `process` tool.\n6. **Use tmux for multi-turn interactive work** and monitor with\n   `tmux capture-pane -t \u003Csession> -p -S -50`.\n7. **Verify auth before relying on it** — check `~\u002F.grok\u002Fauth.json` or run a\n   cheap `grok -p \"Say ok.\"` smoke test; don't assume Hermes' xAI auth carries\n   over.\n8. **Report results to the user** — summarize what Grok changed and what's left.\n","# Grok Build CLI — Hermes Orchestration Guide\n\nDelegate coding tasks to [Grok Build](https:\u002F\u002Fdocs.x.ai\u002Fbuild\u002Foverview) (xAI's\nautonomous coding agent CLI, the `grok` command) via the Hermes terminal. Grok\ncan read files, write code, run shell commands, spawn subagents, and manage git\nworkflows. It runs three ways: an interactive TUI, **headless** (`-p`), and as\nan **ACP agent** over JSON-RPC.\n\nThis is the third sibling to `codex` and `claude-code`. The orchestration\npattern is nearly identical — **prefer headless `-p` for one-shots**, use a PTY\nfor interactive sessions.\n\n## When to use\n\n- Building features\n- Refactoring\n- PR reviews\n- Batch issue fixing\n- Any task where you'd otherwise reach for Codex \u002F Claude Code but want Grok\n\n## Prerequisites\n\n- **Install (preferred):** `npm install -g @xai-official\u002Fgrok`\n  - The official installer `curl -fsSL https:\u002F\u002Fx.ai\u002Fcli\u002Finstall.sh | bash` also\n    works, but the `x.ai` host is Cloudflare-walled in some environments. The\n    npm path avoids that dependency entirely.\n- **Auth — SuperGrok \u002F X Premium+ subscription (primary path):**\n  - Run `grok login` once → opens a browser for OAuth → token cached in\n    `~\u002F.grok\u002Fauth.json`. This uses your **SuperGrok or X Premium+** subscription\n    (no per-token API billing).\n  - Check sign-in state by looking for `~\u002F.grok\u002Fauth.json`, or run a cheap\n    headless smoke test: `grok --no-auto-update -p \"Say ok.\"`\n  - In the TUI, `\u002Flogout` signs out and `\u002Flogin` (or relaunching) signs back in.\n- **No git repo required** — unlike Codex, Grok runs fine outside a git\n  directory (good for scratch\u002Fthrowaway tasks).\n- **Claude Code \u002F AGENTS.md compatible with zero config** — Grok auto-reads\n  `CLAUDE.md`, `.claude\u002F` (skills, agents, MCPs, hooks, rules), and the\n  `AGENTS.md` family. Existing project context just works.\n\n> **API-key fallback (not the default for this user):** Grok also supports\n> setting the `XAI_API_KEY` environment variable for pay-as-you-go billing\n> via `api.x.ai`. Only use\n> this if `grok login` \u002F SuperGrok auth is unavailable. The subscription path\n> (`grok login`) is the intended setup here.\n\n## Two Orchestration Modes\n\n### Mode 1: Headless (`-p`) — Non-Interactive (PREFERRED)\n\nRuns a one-shot task, prints the result, and exits. No PTY, no interactive\ndialogs to navigate. This is the cleanest integration path — the analog of\n`claude -p` and `codex exec`.\n\n```\nterminal(command=\"grok --no-auto-update -p 'Add a dark mode toggle to settings'\", workdir=\"\u002Fpath\u002Fto\u002Fproject\", timeout=180)\n```\n\nAlways pass `--no-auto-update` in automation to skip background update checks.\n\n**When to use headless:**\n- One-shot coding tasks (fix a bug, add a feature, refactor)\n- CI\u002FCD automation and scripting\n- Structured output parsing with `--output-format json`\n- Any task that doesn't need multi-turn conversation\n\n### Mode 2: Interactive PTY — Multi-Turn TUI Sessions\n\nThe TUI is a fullscreen, mouse-interactive app. Drive it with `pty=true`. For\nrobust monitoring\u002Finput use tmux (same pattern as the `claude-code` skill).\n\n```\n# Launch in a tmux session for capture-pane monitoring\nterminal(command=\"tmux new-session -d -s grok-work -x 140 -y 40\")\nterminal(command=\"tmux send-keys -t grok-work 'cd \u002Fpath\u002Fto\u002Fproject && grok' Enter\")\n\n# Wait for startup, then send a task\nterminal(command=\"sleep 5 && tmux send-keys -t grok-work 'Refactor the auth module to use JWT' Enter\")\n\n# Monitor progress\nterminal(command=\"sleep 15 && tmux capture-pane -t grok-work -p -S -50\")\n\n# Exit when done\nterminal(command=\"tmux send-keys -t grok-work '\u002Fquit' Enter && sleep 1 && tmux kill-session -t grok-work\")\n```\n\n**Tip for headless-but-inline output:** if you want TUI-style output without the\nfullscreen alt-screen takeover (e.g. for cleaner logs), add `--no-alt-screen`.\nFor pure automation, headless `-p` is still cleaner than the TUI.\n\n## Headless Deep Dive\n\n### Common Flags\n\n| Flag | Effect |\n|------|--------|\n| `-p, --single \u003CPROMPT>` | Send one prompt, run headless, exit |\n| `-m, --model \u003CMODEL>` | Choose a model |\n| `-s, --session-id \u003CID>` | Create or resume a named headless session |\n| `-r, --resume \u003CID>` | Resume an existing session |\n| `-c, --continue` | Continue the most recent session in the current directory |\n| `--cwd \u003CPATH>` | Set the working directory |\n| `--output-format \u003CFMT>` | `plain` (default), `json`, or `streaming-json` |\n| `--always-approve` | Auto-approve all tool executions (the `--full-auto` \u002F `--yolo` equivalent) |\n| `--no-alt-screen` | Run inline, no fullscreen TUI takeover |\n| `--no-auto-update` | Skip background update checks (use in all automation) |\n\n### Output Formats\n\n- `plain` — human-readable text (default)\n- `json` — one JSON object at the end of the run (parse the result cleanly)\n- `streaming-json` — newline-delimited JSON events as they arrive\n\n```\n# Structured result for parsing\nterminal(command=\"grok --no-auto-update -p 'List all TODO comments in src\u002F' --output-format json\", workdir=\"\u002Fproject\", timeout=120)\n\n# Auto-approve for autonomous building\nterminal(command=\"grok --no-auto-update --always-approve -p 'Refactor the database layer and run the tests'\", workdir=\"\u002Fproject\", timeout=300)\n```\n\n### Background Mode (Long Tasks)\n\n```\n# Start headless in background\nterminal(command=\"grok --no-auto-update --always-approve -p 'Refactor the auth module'\", workdir=\"\u002Fproject\", background=true, notify_on_complete=true)\n# Returns session_id\n\n# Monitor\nprocess(action=\"poll\", session_id=\"\u003Cid>\")\nprocess(action=\"log\", session_id=\"\u003Cid>\")\n\n# Kill if needed\nprocess(action=\"kill\", session_id=\"\u003Cid>\")\n```\n\nFor an interactive (TUI) background session, use `pty=true` + tmux and monitor\nwith `tmux capture-pane`, exactly like the `claude-code` \u002F `codex` skills.\n\n### Session Continuation\n\n```\n# Start a named session\nterminal(command=\"grok --no-auto-update -s refactor-db -p 'Start refactoring the database layer' --always-approve\", workdir=\"\u002Fproject\", timeout=240)\n\n# Resume it later\nterminal(command=\"grok --no-auto-update -r refactor-db -p 'Now add connection pooling' --always-approve\", workdir=\"\u002Fproject\", timeout=180)\n\n# Or continue the most recent session in this directory\nterminal(command=\"grok --no-auto-update -c -p 'What did you change last time?'\", workdir=\"\u002Fproject\", timeout=60)\n```\n\n## Read-Only Audit → Markdown Note Pattern\n\nTo have Grok review local artifacts and return a clean markdown note (for\nObsidian or a repo) without mutating anything:\n\n1. Prepare stable input files first with Hermes tools (`read_file`,\n   `write_file`). Snapshot only the relevant context into a temp file rather\n   than dumping raw paths.\n2. Run Grok headless **without** `--always-approve` so it cannot auto-write, and\n   demand `markdown only, no preamble`.\n3. Save Grok's stdout straight into the destination note with `write_file()`.\n\n```\ngrok --no-auto-update -p \"Read \u002Ftmp\u002Fcurrent.md and \u002Ftmp\u002Finventory.md. Produce markdown only, no preamble. Output a clean note titled 'Cleanup Review'.\" --output-format plain\n```\n\n**Pitfall (same as Claude Code):** for document rewrites, a loose \"rewrite this\"\nprompt may return a change summary instead of the full file. Instead: pipe the\nfile in, and demand `Return ONLY the full revised markdown document. No intro,\nno explanation, no code fences. Start immediately with '# Title'.` Verify the\nfirst lines with `read_file()` before overwriting the destination.\n\n## PR Review Patterns\n\n### Quick Review (Headless)\n\n```\nterminal(command=\"cd \u002Fpath\u002Fto\u002Frepo && git diff main...feature-branch | grok --no-auto-update -p 'Review this diff for bugs, security issues, and style problems. Be thorough.'\", timeout=120)\n```\n\n### Clone-to-temp Review (safe, no repo mutation)\n\n```\nterminal(command=\"REVIEW=$(mktemp -d) && git clone https:\u002F\u002Fgithub.com\u002Fuser\u002Frepo.git $REVIEW && cd $REVIEW && gh pr checkout 42 && grok --no-auto-update -p 'Review the changes vs origin\u002Fmain. Check bugs, security, race conditions, missing tests.'\", pty=true, timeout=300)\n```\n\n### Post the review\n\n```\nterminal(command=\"gh pr comment 42 --body '\u003Creview text>'\", workdir=\"\u002Fpath\u002Fto\u002Frepo\")\n```\n\n## Parallel Issue Fixing with Worktrees\n\n```\n# Create worktrees\nterminal(command=\"git worktree add -b fix\u002Fissue-78 \u002Ftmp\u002Fissue-78 main\", workdir=\"~\u002Fproject\")\nterminal(command=\"git worktree add -b fix\u002Fissue-99 \u002Ftmp\u002Fissue-99 main\", workdir=\"~\u002Fproject\")\n\n# Launch Grok headless in each (background)\nterminal(command=\"grok --no-auto-update --always-approve -p 'Fix issue #78: \u003Cdescription>. Commit when done.'\", workdir=\"\u002Ftmp\u002Fissue-78\", background=true, notify_on_complete=true)\nterminal(command=\"grok --no-auto-update --always-approve -p 'Fix issue #99: \u003Cdescription>. Commit when done.'\", workdir=\"\u002Ftmp\u002Fissue-99\", background=true, notify_on_complete=true)\n\n# Monitor\nprocess(action=\"list\")\n\n# After completion: push and open PRs\nterminal(command=\"cd \u002Ftmp\u002Fissue-78 && git push -u origin fix\u002Fissue-78\")\nterminal(command=\"gh pr create --repo user\u002Frepo --head fix\u002Fissue-78 --title 'fix: ...' --body '...'\")\n\n# Cleanup\nterminal(command=\"git worktree remove \u002Ftmp\u002Fissue-78\", workdir=\"~\u002Fproject\")\n```\n\n## Useful Subcommands & TUI Commands\n\n| Command | Purpose |\n|---------|---------|\n| `grok` | Start the interactive TUI |\n| `grok -p \"query\"` | Headless one-shot |\n| `grok login` \u002F `grok logout` | Sign in \u002F out (SuperGrok \u002F X Premium+ OAuth) |\n| `grok inspect` | Show what Grok discovered in cwd: config sources, instructions, skills, plugins, hooks, MCP servers |\n| `grok agent stdio` | Run as an ACP agent over JSON-RPC (for IDE\u002Ftool integration) |\n| `grok update` | Update the CLI (needs the `x.ai` host; skip in automation) |\n\nTUI slash commands (interactive only): `\u002Fmodel \u003Cname>`, `\u002Falways-approve`,\n`\u002Fplan`, `\u002Fcontext`, `\u002Fcompact`, `\u002Fresume`, `\u002Fsessions`, `\u002Ffork`, `\u002Fusage`,\n`\u002Fquit`. `Shift+Tab` cycles session modes (including Plan mode, which blocks\nwrite tools except the session plan file).\n\n## Config (`~\u002F.grok\u002Fconfig.toml`)\n\n```toml\n[cli]\nauto_update = false          # skip background update checks persistently\n\n[ui]\npermission_mode = \"ask\"      # or \"always-approve\" to skip tool prompts by default\n\n[models]\ndefault = \"grok-build-0.1\"\n```\n\nPut global preferences in `~\u002F.grok\u002Fconfig.toml` (not project-scoped\n`.grok\u002Fconfig.toml`). `permission_mode` supersedes the legacy `approval_mode` \u002F\n`yolo = true` keys.\n\n## Pitfalls & Gotchas\n\n1. **Auth is subscription-gated.** `grok login` requires a SuperGrok or X\n   Premium+ subscription. If login fails or there's no `~\u002F.grok\u002Fauth.json`,\n   confirm the subscription is active before falling back to `XAI_API_KEY`.\n2. **Don't conflate Hermes' xAI auth with the `grok` CLI's auth.** Hermes'\n   `x_search` runs on its own xAI OAuth; the standalone `grok` CLI has a\n   separate token in `~\u002F.grok\u002Fauth.json`. A working `x_search` does NOT mean\n   `grok` is logged in.\n3. **Always pass `--no-auto-update` in automation** — otherwise Grok phones home\n   for update checks (and `x.ai`\u002F`storage.googleapis.com` may be unreachable).\n4. **Prefer npm install over the curl installer** — `npm install -g\n   @xai-official\u002Fgrok` avoids the Cloudflare-walled `x.ai` host.\n5. **`--always-approve` is the autonomous-build switch.** Without it, headless\n   runs may stall waiting on tool-approval prompts. Omit it deliberately for\n   read-only review\u002Faudit work so Grok can't mutate files.\n6. **Headless `-p` skips TUI dialogs**; the TUI needs `pty=true` (+ tmux for\n   monitoring), just like Claude Code.\n7. **Use `--no-alt-screen`** if you run the TUI inline and the fullscreen\n   alt-screen takeover garbles captured output.\n8. **No git repo needed**, but for PR\u002Fcommit workflows you still want one — use\n   `mktemp -d && git init` for scratch commit tasks.\n9. **Clean up tmux sessions** with `tmux kill-session -t \u003Cname>` when done.\n\n## Rules for Hermes Agents\n\n1. **Prefer headless `-p`** for single tasks — cleanest integration, structured\n   output via `--output-format json`.\n2. **Always set `workdir`** (or `--cwd`) so Grok targets the right project.\n3. **Pass `--no-auto-update`** in every automated invocation.\n4. **Use `--always-approve` only when Grok should write autonomously**; omit it\n   for read-only reviews and audits.\n5. **Background long tasks** with `background=true, notify_on_complete=true` and\n   monitor via the `process` tool.\n6. **Use tmux for multi-turn interactive work** and monitor with\n   `tmux capture-pane -t \u003Csession> -p -S -50`.\n7. **Verify auth before relying on it** — check `~\u002F.grok\u002Fauth.json` or run a\n   cheap `grok -p \"Say ok.\"` smoke test; don't assume Hermes' xAI auth carries\n   over.\n8. **Report results to the user** — summarize what Grok changed and what's left.\n",{"name":5,"tags":24,"author":31,"source":32,"license":15,"version":33,"category":34,"platforms":35,"compatible":39,"description":7},[25,26,27,28,29,30],"Coding-Agent","Grok","xAI","Code-Review","Refactoring","Automation","Matt Maximo (MattMaximo), Hermes Agent","optional","0.1.0","autonomous-ai-agents",[36,37,38],"linux","macos","windows",[40,41,42,43,44,45],"claude-code","openai-agents","hermes-agent","autogen","langchain","any-llm","master","4aa004da461d820f4ea5499e58eb8d196cf99016","optional-skills\u002Fgrok",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill grok",{"tool":61,"command":62},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill grok",{"tool":64,"command":65},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill grok","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Foptional-skills\u002Fgrok\u002FSKILL.md",true,[],[70,77,84,91,98,105],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]