grok
Fungsinya
Skill ini memandu agent Anda menjalankan alat baris perintah Grok Build untuk tugas pemrograman. Skill ini ditujukan bagi pengembang yang ingin Grok menjadi agent pemrograman untuk suatu pekerjaan.
Kapan dipakai
- βSaat Anda ingin Grok membangun fitur atau merefaktor sebagian kode Anda.
- βKetika Anda ingin Grok meninjau sebuah pull request.
- βKetika Anda ingin kumpulan issue diperbaiki oleh Grok, bukan agent pemrograman lain.
Link skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/grok/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βMinta Grok meninjau pull request modul pembayaran yang masih terbuka dan beri tahu saya apa yang ditemukannya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menjalankan Grok dalam mode headless untuk tugas sekali jalan, atau di terminal interaktif untuk sesi yang lebih panjang. Skill menyatakan bahwa login memakai langganan SuperGrok atau X Premium.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 | bashalso works, but thex.aihost is Cloudflare-walled in some environments. The npm path avoids that dependency entirely.
- The official installer
- Auth β SuperGrok / X Premium+ subscription (primary path):
- Run
grok loginonce β 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,
/logoutsigns out and/login(or relaunching) signs back in.
- Run
- 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 theAGENTS.mdfamily. Existing project context just works.
API-key fallback (not the default for this user): Grok also supports setting the
XAI_API_KEYenvironment variable for pay-as-you-go billing viaapi.x.ai. Only use this ifgrok 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 |
Pertanyaan umum
Bagaimana cara masuk?
Jalankan grok login sekali. Perintah itu membuka browser untuk login dan menyimpan token di folder pengguna Anda.
Paket mana yang dipakai?
Skill menyatakan memakai langganan SuperGrok atau X Premium, bukan penagihan API per token.
Bagaimana cara memasangnya?
Skill lebih memilih pemasangan dengan npm, memakai nama paket resmi.
Detail
Deskripsi asli dari pembuat
Delegate coding to xAI Grok Build CLI (features, PRs).
Popularitas
- Bintang GitHub
- 260k
- Peringkat
- #442
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
agent-merge-conflict-arbiter
260kMenyelesaikan konflik merge git antara cabang dua agent sebagai pihak ketiga yang netral, menghasilkan satu hasil gabungan untuk repo.
antigravity-cli
260kMemandu Anda memasang, memperbarui, dan memecahkan masalah alat baris perintah Antigravity, termasuk plugin, login, dan sandbox-nya.
blackbox
260kMemungkinkan agent Anda menyerahkan tugas pemrograman ke alat baris perintah Blackbox AI, yang menjalankan beberapa model AI dan memilih hasil terbaik.
dynamic-workflow
260kMengajari agent Anda menjalankan pekerjaan sejenis dalam jumlah besar sebagai skrip tersimpan, sehingga hanya hasil terverifikasi yang kembali ke percakapan utama.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.