fix: respect enabled: true as force-enable in shouldIncludeSkill#1109
Open
BingqingLyu wants to merge 2 commits intomainfrom
Open
fix: respect enabled: true as force-enable in shouldIncludeSkill#1109BingqingLyu wants to merge 2 commits intomainfrom
BingqingLyu wants to merge 2 commits intomainfrom
Conversation
When a skill has `enabled: true` in config, bypass `evaluateRuntimeEligibility` (which checks requires.bins, OS, etc.) so the skill is always included. This makes `enabled: true` symmetric with `enabled: false` (force-disable). The check runs after `isBundledSkillAllowed` so allowBundled restrictions are still respected. ✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)
- Add comment explaining why enabled: true is checked after isBundledSkillAllowed (Greptile review feedback). - Sync skills-status.ts eligibility with force-enable: when enabled: true, mark the skill as eligible in status reporting so CLI output matches runtime behavior (Codex review feedback). ✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)
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
enabled: falseforce-disables a skill, butenabled: truedoes not force-enable — it still checksrequires.bins, OS restrictions, etc.enabled: true, skipevaluateRuntimeEligibilityand returntrue. TheisBundledSkillAllowedcheck still runs first, so allowBundled restrictions are respected.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Setting
skills.entries.<key>.enabled: truein config now guarantees the skill is included, regardless of whether required binaries are installed or OS restrictions would normally exclude it.Security Impact (required)
Repro + Verification
Steps
requires: { bins: ["nonexistent"] })skills.entries.<skill-name>.enabled: truein configExpected
Actual
evaluateRuntimeEligibilityfails on the missing binary.enabled: truebypasses runtime eligibility.Evidence
New test file
src/agents/skills/config.test.tswith 4 test cases covering force-disable, force-enable, fallthrough, and allowBundled interaction.Human Verification (required)
enabled: truecorrectly force-enables,enabled: falsecorrectly force-disables.allowBundledrestrictions are still respected even whenenabled: true.Compatibility / Migration
enabled: undefined(default) behavior is unchanged.Failure Recovery (if this breaks)
config.ts.Risks and Mitigations
enabled: true). The user is taking responsibility for ensuring the skill works.✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)