Skip to content

feat(skills): default user-invocable to true#3080

Open
CnsMaple wants to merge 1 commit into
charmbracelet:mainfrom
CnsMaple:feat/default-user-invocable
Open

feat(skills): default user-invocable to true#3080
CnsMaple wants to merge 1 commit into
charmbracelet:mainfrom
CnsMaple:feat/default-user-invocable

Conversation

@CnsMaple

@CnsMaple CnsMaple commented Jun 5, 2026

Copy link
Copy Markdown

Summary

  • Make user-invocable opt-out: when a SKILL.md does not declare the field, the skill appears in the command palette by default.
  • Skills that should stay hidden from the palette can opt out explicitly with user-invocable: false.
  • Switches Skill.UserInvocable to *bool so the catalog layer can tell "absent" from "false" without parsing YAML twice; downstream CatalogEntry / SkillInfo keep a plain bool filled in from a new Skill.IsUserInvocable() helper, so no consumer changes are required.
  • Adds table-driven coverage in internal/skills/skills_test.go for the absent / true / false cases.

Motivation

The user-invocable feature (#2834) currently requires every skill author to add user-invocable: true to 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 with disable-model-invocation: true).

Related

Test plan

  • go test ./internal/skills/... — new TestIsUserInvocable_DefaultTrue covers absent / true / false
  • go test ./internal/commands/...TestFromSkillCatalog_UserInvocableOnly and symlink test still pass
  • go build ./... clean

Note

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

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
@charmcli

charmcli commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@CnsMaple

CnsMaple commented Jun 5, 2026

Copy link
Copy Markdown
Author

I have read the Contributor License Agreement (CLA) and hereby sign the CLA.

@CnsMaple

CnsMaple commented Jun 5, 2026

Copy link
Copy Markdown
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants