一键导入
grok-prompting
Internal guidance for composing Grok prompts for coding, review, diagnosis, and research tasks inside the Grok Claude Code plugin
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Internal guidance for composing Grok prompts for coding, review, diagnosis, and research tasks inside the Grok Claude Code plugin
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run a multi-angle Grok analysis in a single call — Grok analyzes the task from several expert angles (security, review, research, tests) and synthesizes one consolidated answer with a section per angle plus a verdict. Use when the user wants a thorough, multi-perspective audit/review/analysis of something ("find everything wrong with…", "review this from all angles", "deep multi-angle look at…") that benefits from more coverage than a single-shot question. Read-only by default.
Ask xAI Grok a one-off question with optional live web search. Use when the user wants Grok's opinion or a quick answer that benefits from Grok's distinct training (recent web/X awareness, code-focused models). Read-only by default. Returns Grok's stdout verbatim.
Deep research with xAI Grok using effort=max, live web search, and Grok's self-verification --check loop. Use when the user wants a thorough investigation of a topic, recent events, or claims that need source-grounding. Returns Grok's research output verbatim.
Delegate a long-form coding task, root-cause investigation, multi-file refactor, or open-ended fix to xAI Grok via the companion's `task` subcommand. Use when the work is too large or specialized to handle inline and benefits from Grok's distinct training (live web search, code-focused models, 512K context).
Generate an image from a text description using xAI Grok's `/imagine` builtin. Use when the user asks for an image, picture, illustration, logo, mockup, or visual artifact. Returns the absolute path to the saved image plus an `open` command to view it.
Internal helper contract for calling the grok-companion runtime from Claude Code
| name | grok-prompting |
| description | Internal guidance for composing Grok prompts for coding, review, diagnosis, and research tasks inside the Grok Claude Code plugin |
| user-invocable | false |
Use this skill from inside grok:grok-rescue (and only there) to tighten a user's free-form rescue request into a more effective Grok prompt before calling task.
This skill draws on Grok's distinct strengths:
grok-build) is tuned for advanced coding work with a 512K-token context window, so it can absorb a substantial portion of a codebase at once.A good rescue prompt for Grok is short, direct, and grounded:
| User intent | Prompt pattern |
|---|---|
| "investigate why X" | Goal: diagnose root cause. Context: behavior + reproduction. Output: ranked list of suspect causes with evidence. |
| "fix the failing test" | Goal: make <test name> pass. Context: test file + recent changes. Output: minimal patch + explanation. |
| "explain how X works" | Goal: explain the data/control flow of <feature>. Output: a walkthrough citing files and line numbers. |
| "what should the design be" | Goal: propose a design for <feature>. Output: 2–3 options with tradeoffs, then a recommendation. |
| "what changed about X recently" | Goal: identify recent ecosystem changes (web search). Context: the framework/library. Output: dated summary + sources. |
--model when the user names one (e.g., grok-build). Otherwise leave it unset. The plugin resolves the model with this precedence: caller --model → GROK_PLUGIN_MODEL env → workspace config.activeModel → DEFAULT_MODEL in lib/grok.mjs (currently grok-build).--effort only when the user names a level. Valid: low, medium, high, xhigh, max. Higher levels cost more and take longer but produce more thorough reasoning.If the user mentions continuing or extending a prior Grok session, look for a session id they may have named (-s critique-pr-123) or seen earlier in the conversation. Pass it through as --session-id <id> (creates-if-missing semantics), or --resume=<id> (Grok-native resume of an existing session), or --continue (resume the most-recent session for cwd). All three are passthrough runtime controls handled by extractPolicyFlags and emitted as the corresponding grok CLI flag.
Note: in plain-output mode the companion does not extract Grok's internal sessionId from the response stream, so the trailing footer in task's output only includes the session id when the user supplied one via --session-id, --resume=<id>, or --continue. If you need a stable handle for resumption, recommend the user pass --session-id <name> themselves.
--write. Pass it through unchanged. The companion will refuse the call with exit 2 unless GROK_PLUGIN_ALLOW_WRITE=1 is in the env. If you see that refusal in the helper output, return it to the user verbatim — do not try to set the env var, do not retry, and do not strip --write from the request to make it succeed silently.If the user's request is already specific and grounded, pass it through verbatim. Rephrasing adds latency and risks losing nuance the user intended.