Pular para o conteúdo
Skillpedia
Código em geral260 mil · #442

grok

O que ela faz

Guia seu agente a rodar a ferramenta de linha de comando Grok Build em tarefas de código. É indicada para desenvolvedores que querem que a Grok seja o agente de código de um trabalho.

Quando usar

  • ✓Quando você quer que a Grok construa uma funcionalidade ou refatore parte do seu código.
  • ✓Quando você quer que a Grok revise um pull request.
  • ✓Quando quer que um lote de issues seja corrigido pela Grok em vez de outro agente de código.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/grok/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Peça para a Grok revisar o pull request aberto do módulo de pagamentos e me diga o que ela encontra.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente executa a Grok em modo headless para tarefas avulsas, ou em um terminal interativo para sessões mais longas. A skill diz que o login usa uma assinatura SuperGrok ou X Premium.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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
Perguntas frequentes

Como faço o login?

Rode grok login uma vez. Ele abre um navegador para o login e salva o token na sua pasta de usuário.

Qual plano ela usa?

A skill diz que usa uma assinatura SuperGrok ou X Premium, e não cobrança de API por token.

Como ela é instalada?

A skill prefere instalá-la com o npm, usando o nome oficial do pacote.

Detalhes

Descrição original do autor

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

repo: NousResearch/hermes-agent

Popularidade

Estrelas no GitHub
260 mil
Posição no ranking
#442
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas