Bind per-agent skills into openclaw.json (step 2) - #141
Merged
yikkuro merged 1 commit intoJul 30, 2026
Conversation
Write each agent's catalog skill allowlist into agents.list[*].skills so OpenClaw's per-agent skill filter binds skills natively. Skills are read per-agent from the catalog (never hardcoded) and enforced authoritatively for catalog-known agents during reconciliation; custom agent ids are left untouched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
yikkuro
merged commit Jul 30, 2026
6cbf674
into
sunt-microsoft-feat-agent-skills-binding-step1
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 2 of the agent-skills binding feature: MicroClaw now writes each agent's skill allowlist into
config.agents.list[*].skillswhen it generates/reconcilesopenclaw.json. This is the OpenClaw-native way to bind skills per agent — at runtimeresolveEffectiveAgentSkillFilterreadsagents.list[<id>].skillsand, when present, uses it to filter the agent's skills (replacingagents.defaults.skills).Skills are read per-agent from the catalog (
agent-catalog.tsskillsfield /getAgentSkills) — never hardcoded — so later steps can vary skills per agent without touching this plumbing. Since step 1 defaults every agent to all 23 skills, every entry currently receives the full list.Changes (
desktop/src/agent-personas.ts)skills: readonly string[]toAgentPersona, populated from the catalog inAGENT_PERSONAS.createAgentEntrywritesentry.skills = [...persona.skills](fresh array copy) into every newly generated entry.ensureAgentPersonasConfigenforces skills authoritatively and idempotently for catalog-known agents (overwrites stale values with a fresh copy); custom/non-catalog agent ids are left untouched. Existingchangeddetection still correctly reportstruewhen skills are newly added.Tests (
desktop/src/agent-personas.test.ts)Added coverage: generated entries' skills deep-equal catalog; distinct array instances per agent; stale skills overwritten; custom agent left without
skills;changedreported true when skills newly added.Validation
npm test→ 676 passednpx tsc --noEmit→ cleanmain.tserror left as-is)No UI/renderer/gateway changes.
Stacking
This PR is stacked on and depends on #140 (step 1, still open). Base branch is
sunt-microsoft-feat-agent-skills-binding-step1, notmain.