What Changed#
Grok provider snapshots now include the CLI skill catalog, so the composer $ picker (and skill rows in /) list Grok skills on web, desktop, and mobile.
After a successful grok --version probe, checkGrokProviderStatus runs grok inspect --json and maps skills[] onto ServerProvider.skills. The driver passes ServerConfig.cwd so project-scope skills under .grok/skills are included. ACP model discovery uses that same cwd.
Parsing is schema-validated and Windows-safe: Effect Schema decodes the inspect envelope and each skill entry after a UTF-8 BOM or warning preamble is stripped. userInvocable: false maps to enabled: false (pickers already filter on enabled). Duplicate names keep the first inspect entry, matching Grok's own precedence. Failures are best-effort: timeout, missing inspect, non-zero exit, malformed JSON, or invalid entries yield [] or skip only the bad entry and do not change probe status.
No client, contract, or ACP runtime change. The pickers already render snapshot.skills.
Fixes #4109.
Why#
This is a snapshot gap, not a missing skill directory. On a machine with Grok CLI 1.0.5, grok inspect --json reports user skills from ~/.grok/skills plus bundled skills, while ~/.t3/caches/grok.json has "skills": []. Codex on the same install lists its catalog because it asks the CLI. Grok never did.
Earlier attempts:
- #5131 captured ACP
availableCommands but coupled OpenCode and the shared ACP session runtime, and mapped path-less commands.
- #5503 treated every slash command as a skill with a synthetic
acp:// path, so /compact would appear as a skill.
- #5960 scanned four disk roots and missed plugin skills under
~/.grok/installed-plugins/.
- #7587 is the right mechanism (
inspect). This PR keeps that design, adds BOM/preamble parsing, first-wins dedupe, cwd on the ACP probe, and replaces #!/bin/sh provider-status stubs so the tests run on Windows.
- #7638 bundled skills with plan mode, usage, tool-output caps, and a contract bump. That is a different PR. This one is only the catalog.
A flat scan of ~/.grok/skills cannot see plugin skills and ignores Grok's disable/ignore config. inspect is the catalog Grok itself resolved.
UI Changes#
No new UI. Existing $ and / pickers start receiving Grok skills.
Before#
Grok thread $ showed no skills; / had no Grok skill rows.
After#
Grok's resolved CLI catalog now appears in the existing skill picker, with non-invocable skills hidden.
Verified with 19 focused unit tests and a real Grok 1.0.5 grok inspect --json catalog from this checkout (25 user + 20 bundled + 4 project skills on Windows).
Checklist#
Note
Medium Risk
Adds a new CLI spawn (grok inspect) during provider health checks and threads ServerConfig.cwd into both skill and ACP probes. Failures fail open to an empty catalog and do not change probe status.
Overview
Grok snapshots now include the CLI skill catalog so the existing $ picker and / skill rows can list Grok skills.
After a successful grok --version, checkGrokProviderStatus runs grok inspect --json and maps skills[] onto ServerProvider.skills. The driver passes ServerConfig.cwd so project skills under .grok/skills are included; ACP model discovery uses the same cwd. Parsing is schema-validated, Windows-safe (BOM/warning preamble), first-wins on duplicate names, and maps userInvocable: false to enabled: false.
Discovery is best-effort: timeout, missing inspect, non-zero exit, or bad JSON yields [] and does not change probe status. No client or contract change.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4a5ea250fbc2edae6f4def76549086c3371fcd77. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Note
Populate Grok provider skill catalog via grok inspect output#
- Adds
parseGrokInspectSkills and discoverGrokSkills in GrokSkills.ts to parse grok inspect --json into normalized skills, tolerating BOMs and warning preambles
- Updates
checkGrokProviderStatus in GrokProvider.ts to run the inspect probe and attach skills to the provider snapshot
- Skill and model discovery now run relative to
ServerConfig.cwd, passed through GrokDriver.ts
- Behavioral Change:
discoverGrokSkills returns an empty list on spawn failure, timeout, or non-zero exit, so snapshots always include a skills array
Macroscope summarized 4a5ea25.
Summary by CodeRabbit#
New Features
- Added automatic discovery of available Grok skills.
- Discovered skills now appear in provider status information, including when model checks fail or time out.
- Skill discovery respects the configured working directory and handles disabled or duplicate skills appropriately.
Bug Fixes
- Improved resilience when Grok is unavailable, returns malformed output, or exceeds the timeout.
Documentation
- Documented Grok skill discovery behavior and error handling.
📝 Walkthrough
Walkthrough#
Grok provider checks now run
grok inspect --json, parse discovered skills, and include them in provider snapshots. The configured server working directory is passed to Grok and ACP processes. Tests cover parsing, failures, timeouts, and integration.Changes#
Grok skill discovery
apps/server/src/provider/Drivers/GrokSkills.ts,apps/server/src/provider/Drivers/GrokSkills.test.tsapps/server/src/provider/Drivers/GrokSkills.ts,apps/server/src/provider/Drivers/GrokSkills.test.tsgrok inspect --jsonwith the configured working directory and timeout. Spawn failures, non-zero exits, timeouts, and malformed output return empty skill lists.apps/server/src/provider/Drivers/GrokDriver.ts,apps/server/src/provider/Layers/GrokProvider.ts,apps/server/src/provider/Layers/GrokProvider.test.ts,docs/internals/providers.mdServerConfig.cwdto Grok checks and ACP discovery. Includes discovered skills in ready, failed, and timed-out snapshots. Documents the probe behavior.Estimated code review effort: 3 (Moderate) | ~20 minutes
Merge Risk: 🔵 Low · up to
33dcaThe PR adds best-effort Grok skill discovery in the configured workspace so existing pickers can display the catalog; discovery failures leave provider health unchanged and return no skills. It is mergeable with owner awareness that failure-path tests and the required Markdown formatting check still need completion, while workspace-controlled catalog output should remain within the intended trust boundary.
Suggested reviewers:
juliusmarminge🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
#4109by populating Grok skills for the existing skill and slash-command pickers.grok inspect.✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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