Summary
I'd like to add Grok Build (grok, by xAI) as the 13th supported agent. Grok Build is a first-party terminal coding agent with a documented, open-source on-disk layout — similar in shape to Codex (TOML MCP) + Claude-like hooks, but with its own native enable/disable semantics.
Official product: https://x.ai/build
Source of truth for this proposal: https://github.com/xai-org/grok-build (checked at c2ad97f)
What Grok Build looks like on disk
Home is $GROK_HOME verbatim when set, otherwise ~/.grok (xai-grok-home).
$GROK_HOME/ # default ~/.grok
config.toml # settings + [mcp_servers.*] + [plugins] + [skills]
pager.toml
skills/<name>/SKILL.md
hooks/*.json # Claude-like JSON
disabled-hooks # one Grok hook spec.name per line
plugins/*/plugin.json
installed-plugins/*/
agents/*.md
rules/*.md
commands/*.md
memory/
AGENTS.md
<project>/.grok/
config.toml # only [mcp_servers], [plugins], [permission]
skills/
hooks/
plugins/
agents/
rules/
commands/
Project marker: .grok/. Canonical skill write target: .grok/skills (not .agents/skills).
Proposed first contribution
A full native adapter (crates/hk-core/src/adapter/grok.rs) implementing AgentAdapter:
- Detect
$GROK_HOME / ~/.grok without creating the directory.
- Skills — user
~/.grok/skills, project .grok/skills. Does not claim Claude/Cursor/.agents compat dirs (those stay with their own adapters). Disable via [skills].disabled is Grok-native; HK skill toggle can stay the existing rename model for files we own.
- MCP — TOML
[mcp_servers.<name>] in user + project config.toml. Remote key is headers (not Codex http_headers); type = "sse" is supported. Native toggle via user-level disabled_mcp_servers + per-entry enabled, matching grok mcp enable/disable. Personal disable must not rewrite shared project files. New McpFormat::GrokToml / RemoteMcpSchema::GrokToml so Codex's writer is never reused.
- Hooks — scan
$GROK_HOME/hooks/*.json and .grok/hooks/*.json (Claude-like). Install writes command hooks. Toggle uses $GROK_HOME/disabled-hooks with Grok's real spec name (global/<stem>:<event>[i].hooks[j]). Only $GROK_HOME/hooks is global/; a project under a custom $GROK_HOME stays project/. SubagentEnd uses upstream's subagent_stop display token and shares one group-index sequence. HTTP hooks are out of scope — HK's HookEntry is command-only; they are skipped as rows but still occupy Grok's hook index.
- Plugins — scan
$GROK_HOME/plugins/, $GROK_HOME/installed-plugins/, and project .grok/plugins. Toggle via [plugins].disabled / [plugins].enabled using Grok's stable plugin id ({scope}/{hex8}/{name}). Personal toggle writes the user lists only.
- Rules / settings / subagents / memory / commands — Grok-native paths only. Do not surface
auth.json or mcp_credentials.json.
- Frontend:
AGENT_ORDER, display name Grok Build, colors, LobeHub Icons grok mascot, onboarding, EN/ZH README matrix 12 → 13.
Compat isolation
Grok also reads Claude Code and Cursor skills / MCP / hooks / plugins when [compat.*] cells are on. HarnessKit already owns those through the existing adapters. The Grok adapter will not claim .claude, .cursor, or .agents trees, matching the omp adapter's "don't double-claim" rule.
Known limitations (called out, not silent)
- HTTP hook handlers are not modeled.
- Inline
[hooks] tables inside config.toml are not scanned in this first PR (JSON files under hooks/ are).
- Compat-sourced MCP (
.mcp.json / Claude / Cursor) is not written through the Grok adapter.
Verification plan
cargo test --workspace
npm test + npm run build
- Isolated
$GROK_HOME fixtures +, if available, grok inspect / grok mcp list smoke
Happy to do the work. Opening this for visibility; a PR will follow on feat/grok-build-agent-support.
Summary
I'd like to add Grok Build (
grok, by xAI) as the 13th supported agent. Grok Build is a first-party terminal coding agent with a documented, open-source on-disk layout — similar in shape to Codex (TOML MCP) + Claude-like hooks, but with its own native enable/disable semantics.Official product: https://x.ai/build
Source of truth for this proposal: https://github.com/xai-org/grok-build (checked at
c2ad97f)What Grok Build looks like on disk
Home is
$GROK_HOMEverbatim when set, otherwise~/.grok(xai-grok-home).Project marker:
.grok/. Canonical skill write target:.grok/skills(not.agents/skills).Proposed first contribution
A full native adapter (
crates/hk-core/src/adapter/grok.rs) implementingAgentAdapter:$GROK_HOME/~/.grokwithout creating the directory.~/.grok/skills, project.grok/skills. Does not claim Claude/Cursor/.agentscompat dirs (those stay with their own adapters). Disable via[skills].disabledis Grok-native; HK skill toggle can stay the existing rename model for files we own.[mcp_servers.<name>]in user + projectconfig.toml. Remote key isheaders(not Codexhttp_headers);type = "sse"is supported. Native toggle via user-leveldisabled_mcp_servers+ per-entryenabled, matchinggrok mcp enable/disable. Personal disable must not rewrite shared project files. NewMcpFormat::GrokToml/RemoteMcpSchema::GrokTomlso Codex's writer is never reused.$GROK_HOME/hooks/*.jsonand.grok/hooks/*.json(Claude-like). Install writes command hooks. Toggle uses$GROK_HOME/disabled-hookswith Grok's real spec name (global/<stem>:<event>[i].hooks[j]). Only$GROK_HOME/hooksisglobal/; a project under a custom$GROK_HOMEstaysproject/.SubagentEnduses upstream'ssubagent_stopdisplay token and shares one group-index sequence. HTTP hooks are out of scope — HK'sHookEntryis command-only; they are skipped as rows but still occupy Grok's hook index.$GROK_HOME/plugins/,$GROK_HOME/installed-plugins/, and project.grok/plugins. Toggle via[plugins].disabled/[plugins].enabledusing Grok's stable plugin id ({scope}/{hex8}/{name}). Personal toggle writes the user lists only.auth.jsonormcp_credentials.json.AGENT_ORDER, display name Grok Build, colors, LobeHub Iconsgrokmascot, onboarding, EN/ZH README matrix 12 → 13.Compat isolation
Grok also reads Claude Code and Cursor skills / MCP / hooks / plugins when
[compat.*]cells are on. HarnessKit already owns those through the existing adapters. The Grok adapter will not claim.claude,.cursor, or.agentstrees, matching the omp adapter's "don't double-claim" rule.Known limitations (called out, not silent)
[hooks]tables insideconfig.tomlare not scanned in this first PR (JSON files underhooks/are)..mcp.json/ Claude / Cursor) is not written through the Grok adapter.Verification plan
cargo test --workspacenpm test+npm run build$GROK_HOMEfixtures +, if available,grok inspect/grok mcp listsmokeHappy to do the work. Opening this for visibility; a PR will follow on
feat/grok-build-agent-support.