Scope / evidence
P2 feature expansion. Research date 2026-09-06; Agent Bundle baseline 5fc8de37c9695b816d55bdcf18a6bcb1dfee69f5. Read xAI's own host documentation and official marketplace repository; no Grok installation/native test was run. Grok Build is the coding harness, not the xAI REST model API.
Primary sources
Native model and limits
Grok discovers native plugin directories from project/user locations, configured paths and --plugin-dir. Skills come from .grok/skills, global skills, enabled plugins and configured sources. Existing Claude-compatible material may also be discovered. Compatibility discovery is not proof that all callback semantics are identical.
The official marketplace defines conventional skills/, commands/, agents/, hooks/hooks.json, .mcp.json, and .lsp.json; an optional root plugin.json can provide metadata/path overrides. Marketplace remote sources require full commit pinning; a generated component index is not a hand-authored plugin API.
The current hook guide says only PreToolUse is blocking. Passive event stdout is ignored. A deny result or exit 2 blocks; crashes, malformed output and timeouts otherwise fail open. Consequently a canonical promise of context injection on session start or guaranteed deny-on-timeout cannot simply be copied from Claude. Report unsupported control effects rather than inventing them.
Proposed layout and operator setup
composite-root/
plugin.json
skills/review/SKILL.md
commands/review.md
hooks/grok-hooks.json # use an override only after parser verification
hooks/tool-before.grok.mjs
mcp/example.mjs
Start with explicit local loading to validate the chosen parser/version:
grok --plugin-dir /absolute/composite-root
grok inspect
grok mcp list --json
grok mcp doctor example --json
Use /plugins to inspect and enable installed components and /hooks-trust for project code after user review. Do not automatically add --trust or alter trusted_folders.toml as an installer shortcut.
For independent declared MCP delivery, the host documents:
grok mcp add example -- node /absolute/composite-root/mcp/example.mjs
Equivalent native config shape:
[mcp_servers.example]
command = "node"
args = ["/absolute/composite-root/mcp/example.mjs"]
Project scope uses .grok/config.toml; user scope uses ~/.grok/config.toml. Existing compatible MCP files merge at a different precedence. Keep secret values in the operator environment or native credential flow, not published manifests. Do not both install bundled MCP and add an independent duplicate definition automatically.
Hook lowering example
Host shape, with the command path resolved from a supported native plugin anchor during emission/installation:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "node /installed/example/hooks/tool-before.grok.mjs", "timeout": 10 }]
}
]
}
}
The adapter must preserve Grok payload fields, matcher behavior, error/timeout semantics and GROK_PLUGIN_ROOT/GROK_PLUGIN_DATA separation. The example's absolute path is illustrative; published output must not contain a build-checkout path. Shell quoting and platform support need real fixtures.
Design requirements
- Prove whether the existing Claude/portable artifact subset already loads correctly before adding redundant documents.
- Create a Grok capability profile that distinguishes skill activation, MCP tools, observational hooks and before-tool denial. Do not mark passive context injection supported because a hook process ran.
- Use canonical operation/schema records for MCP and shared authored content for skills/commands. No independent application registry or Grok agent loop.
- Pin plugin manifest/override parsing from native evidence or official first-party examples; the high-level compatibility claim alone is insufficient.
- Test effective discovery when
.claude, .cursor, .agents, root plugin and native Grok files coexist. Explicit conflict diagnostics are preferable to silently running hooks twice.
- Installation receipts own only the native entries created by this integration. Preserve existing project/user MCP config, disabled plugins, trust state and durable data.
Acceptance
No LSP implementation, automatic marketplace submission, trust bypass, global permission edits, or required domain retry/state system is in scope.
Scope / evidence
P2 feature expansion. Research date 2026-09-06; Agent Bundle baseline
5fc8de37c9695b816d55bdcf18a6bcb1dfee69f5. Read xAI's own host documentation and official marketplace repository; no Grok installation/native test was run. Grok Build is the coding harness, not the xAI REST model API.Primary sources
Native model and limits
Grok discovers native plugin directories from project/user locations, configured paths and
--plugin-dir. Skills come from.grok/skills, global skills, enabled plugins and configured sources. Existing Claude-compatible material may also be discovered. Compatibility discovery is not proof that all callback semantics are identical.The official marketplace defines conventional
skills/,commands/,agents/,hooks/hooks.json,.mcp.json, and.lsp.json; an optional rootplugin.jsoncan provide metadata/path overrides. Marketplace remote sources require full commit pinning; a generated component index is not a hand-authored plugin API.The current hook guide says only PreToolUse is blocking. Passive event stdout is ignored. A deny result or exit 2 blocks; crashes, malformed output and timeouts otherwise fail open. Consequently a canonical promise of context injection on session start or guaranteed deny-on-timeout cannot simply be copied from Claude. Report unsupported control effects rather than inventing them.
Proposed layout and operator setup
Start with explicit local loading to validate the chosen parser/version:
Use
/pluginsto inspect and enable installed components and/hooks-trustfor project code after user review. Do not automatically add--trustor altertrusted_folders.tomlas an installer shortcut.For independent declared MCP delivery, the host documents:
Equivalent native config shape:
Project scope uses
.grok/config.toml; user scope uses~/.grok/config.toml. Existing compatible MCP files merge at a different precedence. Keep secret values in the operator environment or native credential flow, not published manifests. Do not both install bundled MCP and add an independent duplicate definition automatically.Hook lowering example
Host shape, with the command path resolved from a supported native plugin anchor during emission/installation:
{ "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [{ "type": "command", "command": "node /installed/example/hooks/tool-before.grok.mjs", "timeout": 10 }] } ] } }The adapter must preserve Grok payload fields, matcher behavior, error/timeout semantics and
GROK_PLUGIN_ROOT/GROK_PLUGIN_DATAseparation. The example's absolute path is illustrative; published output must not contain a build-checkout path. Shell quoting and platform support need real fixtures.Design requirements
.claude,.cursor,.agents, root plugin and native Grok files coexist. Explicit conflict diagnostics are preferable to silently running hooks twice.Acceptance
allowed-toolsmust not be presented as a permission grant.No LSP implementation, automatic marketplace submission, trust bypass, global permission edits, or required domain retry/state system is in scope.