Class: Rubino::CLI::SkillsCommand
- Inherits:
-
Thor
- Object
- Thor
- Rubino::CLI::SkillsCommand
- Defined in:
- lib/rubino/cli/skills_command.rb
Overview
Subcommands for managing skills (#188). ‘list` mirrors the in-chat /skills disclosure (enabled/disabled markers), `show` prints a skill’s SKILL.md body (trust review before enabling), and ‘enable`/`disable` run the SAME registry-validated StateRepository write the HTTP API toggle and the in-chat `/skills enable|disable` use (Skills::Toggle) —no new logic, just the missing terminal surface.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
17 18 19 |
# File 'lib/rubino/cli/skills_command.rb', line 17 def self.exit_on_failure? true end |
Instance Method Details
#disable(name) ⇒ Object
55 56 57 |
# File 'lib/rubino/cli/skills_command.rb', line 55 def disable(name) toggle(name, enabled: false) end |
#enable(name) ⇒ Object
50 51 52 |
# File 'lib/rubino/cli/skills_command.rb', line 50 def enable(name) toggle(name, enabled: true) end |
#list ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/rubino/cli/skills_command.rb', line 22 def list Rubino.ensure_database_ready! registry = Skills::Registry.trusted skills = registry.all if skills.empty? Rubino.ui.info("No skills found.") Rubino.ui.info("Add .md files to .rubino/skills/ to create skills.") return end rows = skills.map do |skill| [skill.name, skill_status(skill.name, registry), skill.description.to_s] end Rubino.ui.table(headers: %w[Name Status Description], rows: rows) end |