本文へスキップ
Skillpedia
一般的なプログラミング260k · #442

grok

できること

このスキルは、コーディングのタスクを実行するためにGrok Buildのコマンドラインツールを動かすよう、エージェントを導きます。ある作業のコーディングエージェントとしてGrokを使いたい開発者のためのものです。

使う場面

  • ✓Grokにコードの機能を構築させたり、一部をリファクタリングさせたりしたいとき。
  • ✓Grokにプルリクエストをレビューさせたいとき。
  • ✓別のコーディングエージェントではなく、Grokにイシューの一括修正をさせたいとき。

スキルのリンク

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/grok/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/grok/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Grokに未解決のプルリクエストをレビューさせて、見つかったことを教えてください。決済モジュールのものです。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、1回限りのタスクにはヘッドレスモードでGrokを実行し、長いセッションには対話型のターミナルで実行します。スキルは、サインインにSuperGrokまたはX Premiumのサブスクリプションを使うと述べています。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Grok Build CLI — Hermes Orchestration Guide

Delegate coding tasks to Grok Build (xAI's autonomous coding agent CLI, the grok command) via the Hermes terminal. Grok can read files, write code, run shell commands, spawn subagents, and manage git workflows. It runs three ways: an interactive TUI, headless (-p), and as an ACP agent over JSON-RPC.

This is the third sibling to codex and claude-code. The orchestration pattern is nearly identical — prefer headless -p for one-shots, use a PTY for interactive sessions.

When to use

  • Building features
  • Refactoring
  • PR reviews
  • Batch issue fixing
  • Any task where you'd otherwise reach for Codex / Claude Code but want Grok

Prerequisites

  • Install (preferred): npm install -g @xai-official/grok
    • The official installer curl -fsSL https://x.ai/cli/install.sh | bash also works, but the x.ai host is Cloudflare-walled in some environments. The npm path avoids that dependency entirely.
  • Auth — SuperGrok / X Premium+ subscription (primary path):
    • Run grok login once → opens a browser for OAuth → token cached in ~/.grok/auth.json. This uses your SuperGrok or X Premium+ subscription (no per-token API billing).
    • Check sign-in state by looking for ~/.grok/auth.json, or run a cheap headless smoke test: grok --no-auto-update -p "Say ok."
    • In the TUI, /logout signs out and /login (or relaunching) signs back in.
  • No git repo required — unlike Codex, Grok runs fine outside a git directory (good for scratch/throwaway tasks).
  • Claude Code / AGENTS.md compatible with zero config — Grok auto-reads CLAUDE.md, .claude/ (skills, agents, MCPs, hooks, rules), and the AGENTS.md family. Existing project context just works.

API-key fallback (not the default for this user): Grok also supports setting the XAI_API_KEY environment variable for pay-as-you-go billing via api.x.ai. Only use this if grok login / SuperGrok auth is unavailable. The subscription path (grok login) is the intended setup here.

Two Orchestration Modes

Mode 1: Headless (-p) — Non-Interactive (PREFERRED)

Runs a one-shot task, prints the result, and exits. No PTY, no interactive dialogs to navigate. This is the cleanest integration path — the analog of claude -p and codex exec.

terminal(command="grok --no-auto-update -p 'Add a dark mode toggle to settings'", workdir="/path/to/project", timeout=180)

Always pass --no-auto-update in automation to skip background update checks.

When to use headless:

  • One-shot coding tasks (fix a bug, add a feature, refactor)
  • CI/CD automation and scripting
  • Structured output parsing with --output-format json
  • Any task that doesn't need multi-turn conversation

Mode 2: Interactive PTY — Multi-Turn TUI Sessions

The TUI is a fullscreen, mouse-interactive app. Drive it with pty=true. For robust monitoring/input use tmux (same pattern as the claude-code skill).

# Launch in a tmux session for capture-pane monitoring
terminal(command="tmux new-session -d -s grok-work -x 140 -y 40")
terminal(command="tmux send-keys -t grok-work 'cd /path/to/project && grok' Enter")

# Wait for startup, then send a task
terminal(command="sleep 5 && tmux send-keys -t grok-work 'Refactor the auth module to use JWT' Enter")

# Monitor progress
terminal(command="sleep 15 && tmux capture-pane -t grok-work -p -S -50")

# Exit when done
terminal(command="tmux send-keys -t grok-work '/quit' Enter && sleep 1 && tmux kill-session -t grok-work")

Tip for headless-but-inline output: if you want TUI-style output without the fullscreen alt-screen takeover (e.g. for cleaner logs), add --no-alt-screen. For pure automation, headless -p is still cleaner than the TUI.

Headless Deep Dive

Common Flags

Flag Effect
-p, --single <PROMPT> Send one prompt, run headless, exit
-m, --model <MODEL> Choose a model
-s, --session-id <UUID> Assign a NEW valid UUID to a fresh conversation (must not already exist). Does not resume — use --resume/--continue for that. Only valid with --resume/--continue when paired with --fork-session
-r, --resume [<UUID>] Resume an existing session by its UUID (or the most recent if omitted)
-c, --continue Continue the most recent session in the current directory
--fork-session When resuming, create a n
よくある質問

どうやってサインインしますか?

grok loginを一度実行します。ブラウザが開いてサインインでき、トークンはユーザーのフォルダに保存されます。

どのプランを使いますか?

スキルは、トークンごとのAPI課金ではなく、SuperGrokまたはX Premiumのサブスクリプションを使うと述べています。

どうやってインストールしますか?

スキルは、公式のパッケージ名を使ってnpmでインストールすることを優先します。

詳細

作者による元の説明

Delegate coding to xAI Grok Build CLI (features, PRs).

repo: NousResearch/hermes-agent

人気

GitHubのスター
260k
ランキング
#442
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル