Offer Grok Build as a skill install target

JE
2mo ago
+41-5

Origin: basecamp/hey-cli#344 by @shawnyeager — this carries that design (Shawn's) to fizzy-cli at the depth fizzy gives Codex.

What it does

fizzy skill (the interactive install wizard) gains a Grok (Global) location beside Codex (Global), resolving to $GROK_HOME/skills/fizzy/SKILL.md when GROK_HOME is set (trimmed), otherwise ~/.grok/skills/fizzy/SKILL.md. README's list of agents gains Grok.

The Codex path helper differed from the Grok one only in env var and home directory, so it becomes agentGlobalSkillPath(homeEnv, homeDir) called twice; codexGlobalSkillPath() keeps its name and behavior.

Why only a skill-path row

In fizzy-cli, Codex is a skill-copy destination and nothing more: no detection, no harness registration (internal/harness knows only Claude), no setup codex, no doctor check. Grok is added at exactly that depth — a peer of Codex everywhere Codex appears, and nowhere Codex does not. hey-cli has a full agent framework that this repo lacks; only the facts and the "peer of Codex" bar are borrowed from #344, not the harness.

Grok facts

  • Product: xAI Grok Build, binary grok.
  • Home: ~/.grok, overridden by GROK_HOME — docs.x.ai/build/settings; xai-dirs crate in xai-org/grok-build.
  • Skills: user skills are read from ~/.grok/skills/ and also from the cross-agent ~/.agents/skills/ — docs.x.ai/build/features/skills-plugins-marketplaces, "Agents.md compatibility". So the shared Agents (Shared) baseline already reaches Grok; Grok (Global) is the user-chosen agent-local copy, exactly as Codex (Global) is.

Tests

  • New TestAgentGlobalSkillPath, table-driven over both agents: default, *_HOME override, and whitespace-only override falling back to the default.
  • make check (fmt-check, vet, lint, tidy-check, race-test) and make surface-check green. SURFACE.txt is unchanged — the wizard's location list is not part of the command structure it snapshots.

Summary by cubic

Adds Grok Build as a skill install target in the fizzy skill wizard, giving users the same agent-local copy option they already have for Codex.

  • New "Grok (Global)" location resolves to $GROK_HOME/skills/fizzy/SKILL.md when set, otherwise ~/.grok/skills/fizzy/SKILL.md.
  • Generalizes the Codex path helper into a shared agentGlobalSkillPath; Codex behavior stays the same.
  • Grok also reads the cross-agent ~/.agents/skills/ baseline, so this adds the agent-local copy without changing that shared path.
  • Updates the README agent list and adds table-driven tests covering default, env override, and blank override for both agents.