feat(skills): default user-invocable to true#3080
Open
CnsMaple wants to merge 1 commit into
Open
Conversation
When a SKILL.md does not declare `user-invocable`, treat the skill as user-invocable so the feature is opt-out. Users who do not want a skill in the command palette can set `user-invocable: false` explicitly. Implementation switches `Skill.UserInvocable` to `*bool` to distinguish "absent" from "false" and adds an `IsUserInvocable` helper. The catalog and downstream `CatalogEntry` / `SkillInfo` keep a plain bool filled in from the helper, so no consumer changes are required. Refs: charmbracelet#2834 (initial user-invocable support), charmbracelet#2970 (skill picker UX), charmbracelet#2562 / charmbracelet#2467 (earlier command-palette dialogs). 💘 Generated with Crush Assisted-by: Crush:MiniMax-M3
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the Contributor License Agreement (CLA) and hereby sign the CLA. |
Author
|
recheck |
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
user-invocableopt-out: when aSKILL.mddoes not declare the field, the skill appears in the command palette by default.user-invocable: false.Skill.UserInvocableto*boolso the catalog layer can tell "absent" from "false" without parsing YAML twice; downstreamCatalogEntry/SkillInfokeep a plain bool filled in from a newSkill.IsUserInvocable()helper, so no consumer changes are required.internal/skills/skills_test.gofor the absent / true / false cases.Motivation
The user-invocable feature (#2834) currently requires every skill author to add
user-invocable: trueto opt in. In practice most custom skills are workflow shortcuts the user wants to fire from the command palette, so the friction is mostly on the common case. Flipping the default makes the feature useful out of the box while still allowing explicit opt-out for skills that are meant to be model-only (especially in combination withdisable-model-invocation: true).Related
user-invocablefrontmatter supportTest plan
go test ./internal/skills/...— newTestIsUserInvocable_DefaultTruecovers absent / true / falsego test ./internal/commands/...—TestFromSkillCatalog_UserInvocableOnlyand symlink test still passgo build ./...cleanNote
This change was authored with AI assistance (Crush / MiniMax-M3) and should be reviewed carefully. The semantic change is small (a single default flip) but it affects every skill in the system, so the explicit opt-out path should be documented once the PR is approved.
Supersedes the head ref of the originally opened PR (#3079) which closed automatically when the source branch was renamed.
💘 Generated with Crush
Assisted-by: Crush:MiniMax-M3