Add skill management for CodeMux engines#160
Open
FridayLiu wants to merge 7 commits into
Open
Conversation
Resolve scoped CodeMux skills into effective roots, project them into engine discovery folders when needed, and wire Copilot, Codex, Claude, and OpenCode adapters to use the managed skill set. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add scope-aware skill summaries and disabled fallback behavior - Redesign Skills settings into scope-based card columns with modal details - Add path-aware scoped skill instances and coverage for fallback semantics Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a first-class, scope-aware “Skills” management surface in the renderer, backed by new gateway RPC endpoints and Electron services that compute effective skills across builtin/global/project scopes and project those skills into engine-specific discovery locations.
Changes:
- Add a Skills settings page/UI (Global / Project / Builtin columns + details modal) and wire it into navigation and routing.
- Add unified gateway protocol types + GatewayClient/GatewayAPI methods + GatewayServer handlers for skill list/enable/delete/refresh operations.
- Add Electron skill registry/projection/API services and engine adapter hooks to refresh engine-visible skills, with accompanying unit tests.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/src/lib/gateway-api.test.ts | Adds delegation tests for new GatewayAPI skill methods. |
| tests/unit/electron/services/skill-services.test.ts | New unit tests for registry fallback/disable/delete and projection behaviors. |
| tests/unit/electron/gateway/ws-server.test.ts | Tests GatewayServer delegation for skill RPCs + engine refresh behavior. |
| tests/unit/electron/engines/opencode/index.test.ts | Tests OpenCode adapter skill refresh merging into command cache. |
| tests/unit/electron/engines/copilot/index.test.ts | Tests Copilot adapter skill reload + command cache refresh behavior. |
| tests/unit/electron/engines/codex/index.test.ts | Verifies Codex skill list calls include forceReload toggling. |
| tests/unit/electron/engines/claude/index.test.ts | Tests Claude adapter plugin reload + command cache update on skill refresh. |
| src/types/unified.ts | Adds skill scope/types + new gateway request types for skill operations. |
| src/pages/Skills.tsx | New Skills page wrapper with auth guard + titlebar layout. |
| src/pages/Chat.tsx | Adds “Harnesses” nav section and link to /skills. |
| src/locales/zh.ts | Adds zh translations for Skills + Harness nav strings. |
| src/locales/ru.ts | Adds ru translations for Skills + Harness nav strings. |
| src/locales/en.ts | Adds LocaleDict keys + en strings for Skills + Harness nav. |
| src/lib/gateway-client.ts | Adds GatewayClient RPC methods for skill list/enable/delete/refresh. |
| src/lib/gateway-api.ts | Adds GatewayAPI convenience wrappers for skill operations. |
| src/components/SkillSettingsSection.tsx | Implements the scope-aware Skills settings UI and actions. |
| src/App.tsx | Registers /skills route and lazy-load entry. |
| electron/main/services/skill-registry-service.ts | New service to scan roots, apply disable rules, and build effective skill set via symlinks. |
| electron/main/services/skill-projection-service.ts | New service to project effective skills into engine discovery roots + maintain manifests and git exclude. |
| electron/main/services/skill-api-service.ts | New API service providing list/enable/delete/refresh and emitting diagnostics from projection conflicts. |
| electron/main/services/logger.ts | Adds a dedicated skill logger scope. |
| electron/main/services/app-paths.ts | Adds persistent paths for global skills, effective roots, and projection manifests. |
| electron/main/gateway/ws-server.ts | Adds skill RPC handlers and triggers engine refresh on mutations/refresh. |
| electron/main/gateway/engine-manager.ts | Adds refreshSkillsForDirectory() fan-out across adapters. |
| electron/main/engines/opencode/index.ts | Prepares projected skills and merges OpenCode skills into command cache; adds refresh hook. |
| electron/main/engines/engine-adapter.ts | Adds default refreshSkillsForDirectory() hook. |
| electron/main/engines/copilot/index.ts | Passes projected skill roots into session config; adds refresh hook and skill reload logic. |
| electron/main/engines/codex/index.ts | Adds projection support and extraRoots syncing + force reload tracking. |
| electron/main/engines/claude/index.ts | Adds projection preparation + plugin reload support + per-directory command cache handling. |
| electron/main/app-main.ts | Wires SkillApiService into GatewayServer and SkillProjectionService into engine adapters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #159
Summary
Testing
npm run typechecknpm run buildnpm run lintbun run vitest run tests\unit\electron\services\skill-services.test.tsEngine test coverage