Skip to content

feat(server): expose Grok skills in provider snapshots - #5960

Open
rksfn wants to merge 6 commits into
pingdotgg:mainfrom
rksfn:feat/grok-skill-picker
Open

feat(server): expose Grok skills in provider snapshots#5960
rksfn wants to merge 6 commits into
pingdotgg:mainfrom
rksfn:feat/grok-skill-picker

Conversation

@rksfn

@rksfn rksfn commented Aug 10, 2026

Copy link
Copy Markdown

What Changed

Grok provider snapshots did not include filesystem skills, leaving the existing $ picker empty when Grok was selected.

  • Extracted Claude's filesystem scan into discoverSkillsFromRoots, with best-effort frontmatter parsing and later-root collision precedence.
  • Kept Claude's existing config and project root resolution on the shared scanner.
  • Added Grok user and project roots for both .agents/skills and .grok/skills.
  • Passed the server cwd and filesystem services into the Grok status probe, and retained skills on snapshots after a successful version probe even when ACP model discovery fails.
  • Added focused scanner, root-order, snapshot, and Claude regression coverage.

Why

Grok can use skills from these standard filesystem locations, but T3 only exposed Claude's discovered skills to clients. Sharing the scan keeps the parsing and override behavior consistent while leaving provider-specific root resolution at the adapter boundary.

UI Changes

No client UI code changed. The existing $ picker now receives Grok skills through the provider snapshot contract.

Verification

  • Focused provider tests: 31 passed
  • Workspace typecheck: passed (pre-existing Effect suggestions only)

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Screenshots are not applicable because no client UI was changed
  • Video is not applicable because no animation or interaction was changed

Implemented with GPT-5.6 Codex in the T3 Code harness.


Note

Low Risk
Best-effort filesystem reads with no auth or data-model changes; Claude behavior is preserved via delegation to the shared scanner.

Overview
Grok provider snapshots now include filesystem-discovered skills, so the existing $ picker can list Grok skills the same way it does for Claude.

Skill scanning is factored into shared discoverSkillsFromRoots in ProviderSkills.ts (YAML frontmatter parsing, skip malformed entries, later roots win on name collisions). Claude delegates to that helper instead of inline logic. Grok adds discoverGrokSkills, resolving user/project roots under HOME/USERPROFILE, GROK_HOME, and .agents / .grok skill directories.

checkGrokProviderStatus runs discovery with server cwd and attaches skills on every snapshot path—including when ACP model discovery fails or times out. GrokDriver wires FileSystem, Path, and cwd into the status probe. Tests cover the shared scanner, Grok root order, and snapshot behavior.

Reviewed by Cursor Bugbot for commit 9b3d161. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Expose Grok skills in provider snapshots via shared skill discovery

  • Adds discoverGrokSkills in GrokSkills.ts that resolves skill roots from ~/.agents/skills, $GROK_HOME/skills, and optional project-level .agents/skills/.grok/skills directories, with platform-aware home detection (USERPROFILE on Windows).
  • Introduces shared discoverSkillsFromRoots and parseSkillFrontmatter in ProviderSkills.ts; later roots override earlier ones on name collision, malformed SKILL.md files are skipped, and results are name-sorted.
  • checkGrokProviderStatus in GrokProvider.ts now calls discoverGrokSkills and includes discovered skills in all provider snapshot cases (error, timeout, success).
  • Refactors discoverClaudeSkills in ClaudeSkills.ts to delegate to the shared discoverSkillsFromRoots, removing its local YAML frontmatter parser.
  • Behavioral Change: malformed frontmatter detection now skips files that open with --- but lack a closing delimiter, rather than treating them as valid.

Macroscope summarized 9b3d161.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b34c9c5-0019-44ea-b179-7b24e1d2d426

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 10, 2026
Comment thread apps/server/src/provider/Layers/GrokProvider.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new feature that exposes Grok skills in provider snapshots, adding new discovery logic and integrating it into the provider system. New features that add user-facing capabilities warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the extracted skill-discovery helper and the Grok wiring against the Effect service conventions. Imports, Effect.fn.Return requirements, and dependency acquisition (yield* FileSystem.FileSystem / yield* Path.Path, no ManagedRuntime/runPromise, no fake service injection) all look correct. Two change-discipline findings on the extracted module.

Posted via Macroscope — Effect Service Conventions

Comment thread apps/server/src/provider/Drivers/ProviderSkills.ts
Comment thread apps/server/src/provider/Drivers/ProviderSkills.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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 for commit 4540e88. Configure here.

Comment thread apps/server/src/provider/Drivers/GrokSkills.ts Outdated
Comment thread apps/server/src/provider/Drivers/ProviderSkills.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant