Load OpenCode skills (#2832)#2891
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1287661. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces new feature behavior - loading OpenCode skills from multiple project directories with deduplication logic. Changes to runtime skill discovery behavior beyond a bug fix warrant human review. You can customize Macroscope's approvability policy. Learn more. |
|
Hrm, this doesn't seem to pick up repo specific skills - will look into that |
…lls/ PR pingdotgg#2811 (pingdotgg/t3code) adds local filesystem skill loading for the OpenCode provider by reading .agents/skills/<dir>/SKILL.md. Fork compatibility: Clean apply. Both affected files match upstream base structure. Requires @effect/platform-node (already a dependency). PR pingdotgg#2891 conflict analysis: Both PRs modify checkOpenCodeProviderStatus success path. Approaches are complementary (local vs server). Recommend applying pingdotgg#2811 first, then pingdotgg#2891 on top with skill deduplication. Detailed findings in review-pr-2811.md.
Compatibility assessment and recommendation for upstream PR pingdotgg#2891 (skills fetching from opencode server, fixes issue pingdotgg#2832). Assessment: APPLY. Clean additive change, 2 files, +29/-3 lines. - adds OpenCodeSkill interface and skills to OpenCodeInventory - adds loadSkills (parallel with providers/agents) - maps skills to ServerProviderSkill contract in checkOpenCodeProviderStatus - no breaking call sites; ServerProvider.skills defaults to [] - fixes 'Opencode Skills not found' by populating skills field Risk: minimal. SDK call error surfaces through existing probe fallback. Optional defense: filter skills with empty names, but not necessary.
|
Seems to work fine like this |
… skills from server)

What Changed
We now fetch skills from opencode
Why
Skills are fun and sometimes useful
UI Changes
None
Checklist
Note
Low Risk
Adds parallel OpenCode API calls during provider refresh; per-directory failures are swallowed and project-list errors fall back to server cwd only, with no auth or data-model changes.
Overview
OpenCode provider status now loads skills from the OpenCode SDK (
app.skills) and exposes them on the server provider snapshot alongside models and agents.Multi-directory discovery:
checkOpenCodeProviderStatusandloadOpenCodeInventorytake a list of working directories instead of a singlecwd. The OpenCode driver builds that list from the server startup directory plus non-deleted project workspace roots fromProjectionProjectRepository, with a safe fallback to servercwdonly if listing projects fails. Skills are fetched per directory in parallel, merged with first-occurrence wins (server cwd first, then projects in creation order).Wiring:
ProjectionProjectRepositoryLiveis merged into the runtime layer before SQLite persistence so OpenCode driver hydration can resolve the repository. Tests and CLI layers get aNoOpProjectionProjectRepositoryso layers that boot OpenCode do not need real project DB state.Reviewed by Cursor Bugbot for commit fef119c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Load OpenCode skills from multiple project directories into provider snapshots
loadOpenCodeInventoryin opencodeRuntime.ts now accepts an array of working directories, fetches skills from each viaclient.app.skills, and deduplicates results by name (first occurrence wins).checkOpenCodeProviderStatusin OpenCodeProvider.ts maps returned skills toServerProviderSkillentries and includes them in the provider snapshot alongside models.ProjectionProjectRepository, builds a deduplicated list of workspace roots, and passes them to the status probe; on error it logs a warning and falls back to server cwd.ProjectionProjectRepositoryLiveis added to the core runtime layer in server.ts, and aNoOpProjectionProjectRepositoryis introduced for test environments.Macroscope summarized 8b51b75.