feat(grok): surface Grok skills in the composer $ picker #7587
main fromrefs/pull/7587/head·opened View on GitHubFixes #4109. Related: #4414 (the merged Claude equivalent), #4630 (skill manager), and #5131 / #5503 / #5960 (earlier attempts, see disposition). Decision date: 2026-08-19.
Outcome#
The Grok provider snapshot now carries the CLI's skill catalog, so the composer $ picker lists Grok skills on web, desktop, and mobile. The provider check runs grok inspect --json next to the existing grok --version probe and maps the reported skills[] onto ServerProviderSkill.
This PR does not change: slash commands (the / picker), the ACP runtime, the Claude or Codex skill paths, any contract schema, or any client code. The pickers render the new data through the existing provider-agnostic path.
Before and after#
| Failure mode before | Mechanism after |
|---|---|
checkGrokProviderStatus never set skills, so every Grok snapshot defaulted to [] and the $ picker showed "No skills found" even with a full skill directory on disk. | The provider check asks the CLI for its resolved catalog and attaches it to the post-version snapshot branches. |
The obvious fix, a Claude-style flat disk scan, cannot see plugin skills (three levels deep under ~/.grok/installed-plugins/) and ignores Grok's own ignore/disable config. On the machine that produced this PR, a flat scan misses 44 of 75 installed skills. | grok inspect --json returns the catalog Grok itself resolved: user, project, bundled, and plugin skills, each with its SKILL.md path, description, and userInvocable flag. |
Decisions taken#
- Ask the CLI, do not scan the disk. House precedent: Claude scans disk only because its handshake omits paths (see the
ClaudeSkills.tsmodule doc); Codex asks the app-server overskills/list. Grok exposes paths throughinspect, so asking is the smaller and more correct mechanism. - Discovery is best-effort. An older CLI without
inspect, a non-zero exit, a 4 s timeout, or malformed JSON yields[]with a debug log. Skill discovery can never degrade the provider probe. userInvocable: falsemaps toenabled: false, not to omission. The pickers already filter onenabled; the snapshot stays a faithful record of the catalog.- Skills attach to the three post-version branches (ACP discovery failed, ACP timeout, ready), matching how much of the probe succeeded. The disabled and not-installed branches stay empty.
- No shared code moves. No
ClaudeSkills.tsextraction, noAcpSessionRuntimechange, no new dependency, no driver signature change (ChildProcessSpawnerwas already in the probe's requirements).
Disposition of the earlier attempts#
- #5131 (ACP
availableCommands): right instinct, but it couples OpenCode into the change and patches the sharedAcpSessionRuntime.inspectyields the same paths without touching shared code. - #5503: maps every advertised slash command to a skill with a synthetic
acp://path, so built-ins like/compactwould appear as skills. Wrong data. - #5960 (disk scan): asserts four unverified scan roots and misses plugin skills entirely.
Verification#
Ran on Linux, Node v26.7.0, pnpm 11.10.0, grok 1.0.5:
vp test run src/provider/Drivers/GrokSkills.test.ts— 4 passed (field mapping and sort, disabled skills, invalid entries skipped, malformed output).vp test run src/provider/Layers/GrokProvider.test.ts src/provider/Layers/GrokAdapter.test.ts— 27 passed.tsgo --noEmitinapps/server— no errors in changed files (pre-existing suggestions in unrelated files only).- Real-CLI check:
grok inspect --json(grok 1.0.5) returned 75 skills in ~60 ms; the fields map one-to-one ontoServerProviderSkill.
Not run: the full monorepo suite (CI owns it) and an in-app screenshot of the populated $ picker (needs a live instance; I can add one on request).
Rollout and rollback#
Server-side only, ships with the next build. No schema change, no migration, no durable state. Rollback is the previous build; a snapshot produced by this build renders fine on old clients because the skills field and its wire schema already exist.
Built with Claude Code (Claude Fable 5).
🤖 Generated with Claude Code
Note
Low Risk Server-only, additive probe after existing version check; discovery failures degrade to empty skills without changing probe outcomes.
Overview
Grok provider snapshots now include skills from grok inspect --json, so the existing composer $ picker can list Grok skills without client or contract changes.
New GrokSkills module runs a best-effort probe (4s timeout, optional server cwd) after the version check succeeds. JSON is mapped to ServerProviderSkill (scope, path, description; userInvocable: false → enabled: false). Failures return [] and only debug logs—probe status is unchanged.
checkGrokProviderStatus accepts cwd; GrokDriver passes ServerConfig.cwd. Discovered skills are attached on the post-version paths (ACP error, timeout, and ready), not when Grok is disabled or the CLI is missing.
Unit tests cover parsing edge cases and that inspect runs in the configured working directory.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c4574ba4eeb39de180a9657b641da49375d35134. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).Note
Surface Grok skills in the composer $ picker via CLI discovery#
- Adds
discoverGrokSkillsin GrokSkills.ts, which spawnsgrok inspect --jsonwith a 4s timeout and returns a best-effort list of skills, returning empty on any failure. - Adds
parseGrokInspectSkillsto map CLI output toServerProviderSkillobjects, filtering out malformed/unnamed entries, disabling non-invocable skills, deduplicating by name, and sorting alphabetically. - Extends
checkGrokProviderStatusin GrokProvider.ts to accept an optionalcwdand populate the provider snapshot with discovered skills across all return paths (success, ACP failure, timeout).
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot).
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1f28c7963d952204b7cfe760820778e2aa4b5a37. Configure [here](https://www.cursor.com/dashboard/bugbot).apps/server/src/provider/Drivers/GrokSkills.ts line 103Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -0,0 +81,21 @@81+ * to an empty list.82+ */83+export const discoverGrokSkills = Effect.fn("discoverGrokSkills")(function* (84+ grokSettings: Pick<GrokSettings, "binaryPath">,85+ environment: NodeJS.ProcessEnv = process.env,86+): Effect.fn.Return<87+ ReadonlyArray<ServerProviderSkill>,88+ never,89+ ChildProcessSpawner.ChildProcessSpawner90+> {91+ const command = grokSettings.binaryPath || "grok";92+ const inspectResult = yield* Effect.gen(function* () {93+ const spawnCommand = yield* resolveSpawnCommand(command, ["inspect", "--json"], {94+ env: environment,95+ });96+ return yield* spawnAndCollect(97+ command,98+ ChildProcess.make(spawnCommand.command, spawnCommand.args, {99+ env: environment,100+ shell: spawnCommand.shell,101+ }),Inspect spawn omits project cwd#
Medium Severity
grok inspectreports skills for the current project directory, butdiscoverGrokSkillsnever setscwdon the spawned CLI. Grok sessions start ACP with the thread workspace, so the$picker can omit project skills the agent would actually load, especially when the server process cwd is home or the app root rather than the workspace.Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1f28c7963d952204b7cfe760820778e2aa4b5a37. Configure [here](https://www.cursor.com/dashboard/bugbot).Additional Locations (1)
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This PR introduces a new feature that surfaces Grok skills in the composer $ picker via a new CLI integration (
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).grok inspect --json). New features with user-facing behavior changes and external integrations warrant human review.Bugbot's finding is half right; fixed the real half in 363c9472f.
Fixed: the inspect spawn inherited the server process cwd and ignored
ServerConfig.cwd— the directory the merged Claude skill scan already uses (ClaudeDriver.tsreads it and passes it tocheckClaudeProviderStatus). The Grok driver now passes the samecwdthroughcheckGrokProviderStatusto thegrok inspect --jsonspawn. A regression test asserts the spawn receives it.Not fixed, by design: "the thread workspace" is not knowable here. Provider snapshots are computed per instance, with no thread context — the merged Claude implementation (#4414) has the same property, and the
$picker reads the same per-instance snapshot for every provider. Per-thread skill catalogs would be a snapshot-model change, out of scope for this PR.Note
🤖 GPT-5.6 Sol responding on behalf of Theo
I am closing this because #8358 has landed in
mainand covers the same Grok skill-discovery behavior. I checked the current implementation and did not find any remaining change from this PR that we still need to merge.Thank you for putting this together. The closure is only because the work is now covered elsewhere, not because there was a problem with your contribution.
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.

Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
73816e2c-615f-4088-b9bf-2f203daee88fYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share