fix(agent): respect global skills toggle for skill tools#1145
Merged
afjcjsbx merged 1 commit intosipeed:mainfrom Mar 5, 2026
Merged
fix(agent): respect global skills toggle for skill tools#1145afjcjsbx merged 1 commit intosipeed:mainfrom
afjcjsbx merged 1 commit intosipeed:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes agent tool registration so that the skill-related tools (find_skills, install_skill) are only registered when the global tools.skills.enabled toggle is enabled, aligning runtime behavior with the config model.
Changes:
- Add a global
skillsenable check before registeringfind_skills/install_skill. - Prevent skill registry manager initialization when global skills are disabled.
Comments suppressed due to low confidence (2)
pkg/agent/loop.go:174
- Local boolean names use snake_case (e.g.,
skills_enabled), which is inconsistent with Go conventions and the surrounding camelCase locals in this function. Consider renaming these toskillsEnabled/findSkillsEnabled/installSkillEnabled(and updating uses) for readability and consistency.
skills_enabled := cfg.Tools.IsToolEnabled("skills")
find_skills_enable := cfg.Tools.IsToolEnabled("find_skills")
install_skills_enable := cfg.Tools.IsToolEnabled("install_skill")
if skills_enabled && (find_skills_enable || install_skills_enable) {
pkg/agent/loop.go:174
- The behavior change (gating
find_skills/install_skillregistration on the globalskillstoggle) is a config regression fix and would benefit from a unit test to prevent reintroductions. Suggest adding a test inpkg/agent/loop_test.gothat setscfg.Tools.Skills.Enabled=falsewhile enablingcfg.Tools.FindSkills.Enabled/cfg.Tools.InstallSkill.Enabled, then asserts the default agent's tool registry does not containfind_skillsorinstall_skill.
if skills_enabled && (find_skills_enable || install_skills_enable) {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
afjcjsbx
approved these changes
Mar 5, 2026
Collaborator
|
LGTM |
dj-oyu
pushed a commit
to dj-oyu/picoclaw
that referenced
this pull request
Mar 8, 2026
…bal-toggle fix(agent): respect global skills toggle for skill tools
fishtrees
pushed a commit
to fishtrees/picoclaw
that referenced
this pull request
Mar 12, 2026
…bal-toggle fix(agent): respect global skills toggle for skill tools
andressg79
pushed a commit
to andressg79/picoclaw
that referenced
this pull request
Mar 30, 2026
…bal-toggle fix(agent): respect global skills toggle for skill tools
ra1phdd
pushed a commit
to ra1phdd/picoclaw-pkg
that referenced
this pull request
Apr 12, 2026
…bal-toggle fix(agent): respect global skills toggle for skill tools
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
tools.skills.enabledbefore registeringfind_skills/install_skill