Dev-only per-agent Skills panel (agent-skills step 4) - #144
Merged
yikkuro merged 1 commit intoJul 30, 2026
Merged
Conversation
Add a DEV-ONLY "Skills" tab to ChatView that lets developers toggle each agent's skill set at runtime and reload the gateway once, without editing code. The tab and panel are gated on import.meta.env.DEV so they are absent from production builds. - ChatView: extend viewMode union with "skills"; add a v-if="isDev" toggle button and render SkillsDevPanel when selected. - SkillsDevPanel: agent picker (catalog agents), 23 skill toggles reflecting config.agents.list[id].skills, select/clear all, Apply & reload with applying/applied/failed feedback. - main.ts: new skills:set-agent-skills IPC that validates the agent id and skill ids, writes openclaw.json atomically, and restarts the gateway with rollback on failure. Exposed via preload as skills.setAgentSkills. - agent-catalog: add pure isKnownSkillId / sanitizeAgentSkillIds helpers. - agent-personas: change catalog-skill seeding from authoritative overwrite to fill-if-missing so dev-edited skills survive gateway reloads. Fresh installs still seed the full catalog list. - i18n: add skills.dev.* keys in en-US and zh-CN. - Update/extend unit tests for the seeding change and new helpers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
yikkuro
merged commit Jul 30, 2026
a8ec96d
into
sunt-microsoft-feat-agent-skills-binding-step2
1 check passed
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.
Summary
STEP 4 of the agent↔skills feature: a DEV-ONLY per-agent "Skills" panel so developers can toggle each agent's skill set at runtime and reload the gateway once — no code edits required.
The Skills tab and panel are gated on
import.meta.env.DEV, so they are completely absent from production builds (import.meta.env.DEVis statically replaced withfalseand thev-if="isDev"gate keeps the button/panel out of the release DOM).Stacking
This PR is stacked on:
sunt-microsoft-feat-agent-skills-binding-step2(base of this PR)Review/merge #140 and #141 first.
What changed
viewModeunion with"skills"; add a thirdmode-toggle-barbutton (v-if="isDev", right of Chat/Studio) and renderSkillsDevPanelwhen selected.config.agents.list[<id>].skills, select-all / clear-all, and an Apply & reload button with applying/applied/failed feedback. Defaults to the current chat agent, elsemain.skills:set-agent-skillsIPC — validates the agent id and that every skill id ∈ALL_SKILL_IDS, writesopenclaw.jsonatomically, and restarts the gateway once (with rollback on failure). Exposed via preload aswindow.openclaw.skills.setAgentSkills.isKnownSkillId/sanitizeAgentSkillIdshelpers.ensureAgentPersonasConfignow seeds a catalog agent's skills fill-if-missing (only when the entry has noskillskey) instead of authoritatively overwriting every gateway boot. This prevents the boot seeding from wiping dev toggles when the gateway reloads to apply them. Fresh installs still get the full catalog list seeded viacreateAgentEntry; only the "heal stale values every boot" behavior is dropped, which is safe for release (no Skills UI ships to users).skills.dev.*keys in bothen-USandzh-CN.Validation (from
desktop/)npm test(main): 679 passednpm test(renderer): 198 passednpx tsc --noEmit: cleannpx vue-tsc --noEmit(renderer): cleannpx vite build(renderer): succeeds;import.meta.env.DEV→ 0 unreplaced occurrences, so the dev button/panel are inert in prodmain.tspreserve-caught-error remain)Manual test
npm run devindesktop/.config.agents.list[<agent>].skillsreflects the change — and the change survives the reload (fill-if-missing seeding no longer overwrites it).vite build) and confirm the Skills button is not present.