grok
यह क्या करती है
यह आपके एजेंट को कोडिंग कामों पर Grok Build कमांड-लाइन टूल चलाने के चरण बताती है। यह उन डेवलपर्स के लिए है जो किसी काम के लिए Grok को कोडिंग एजेंट बनाना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप चाहते हों कि Grok कोई फ़ीचर बनाए या आपके कोड का हिस्सा रीफ़ैक्टर करे।
- ✓जब आप चाहते हों कि Grok किसी pull request की समीक्षा करे।
- ✓जब आप चाहते हों कि issues का बैच किसी दूसरे कोडिंग एजेंट के बजाय Grok ठीक करे।
Skill का लिंक
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/grok/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“पेमेंट मॉड्यूल की खुली pull request की समीक्षा Grok से करवाइए और बताइए कि उसे क्या मिलता है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक-बार के कामों के लिए Grok को headless मोड में चलाता है, और लंबे सेशन के लिए इंटरैक्टिव टर्मिनल में। स्किल कहती है कि साइन-इन 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 | 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 |
अक्सर पूछे जाने वाले सवाल
मैं साइन इन कैसे करूं?
एक बार grok login चलाइए। यह साइन-इन के लिए browser खोलता है और टोकन आपके user फ़ोल्डर में सेव करता है।
यह कौन-सा प्लान इस्तेमाल करता है?
स्किल कहती है कि यह प्रति-टोकन API बिलिंग के बजाय SuperGrok या X Premium सब्सक्रिप्शन इस्तेमाल करता है।
इसे कैसे इंस्टॉल करें?
स्किल आधिकारिक package नाम के साथ npm से इंस्टॉल करने को प्राथमिकता देती है।
जानकारी
लेखक का मूल विवरण
Delegate coding to xAI Grok Build CLI (features, PRs).
लोकप्रियता
- GitHub स्टार
- 260k
- रैंकिंग में स्थान
- #442
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
agent-merge-conflict-arbiter
260kदो एजेंट्स की branches के बीच git merge conflict को एक निष्पक्ष तीसरे पक्ष के रूप में सुलझाती है और रिपॉज़िटरी के लिए एक merged नतीजा बनाती है।
antigravity-cli
260kAntigravity कमांड-लाइन टूल को इंस्टॉल करने, अपडेट करने और उसकी दिक्कतें सुलझाने में मार्गदर्शन देती है, जिसमें प्लगइन, साइन-इन और sandbox शामिल हैं।
blackbox
260kआपके एजेंट को कोडिंग काम Blackbox AI कमांड-लाइन टूल को सौंपने देती है, जो कई AI मॉडल चलाकर सबसे अच्छा नतीजा चुनता है।
dynamic-workflow
260kआपके एजेंट को बड़े बैच के एक जैसे कामों को सेव की गई स्क्रिप्ट के रूप में चलाना सिखाती है, ताकि मुख्य बातचीत में केवल जांचे गए नतीजे लौटें।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।