Expand description
install_skill: search skillhub.cn for a skill, let the user review it
in the TUI, and install it to ~/.recursive/skills/<slug>/.
This tool is TUI-only. When called without a TUI side-channel
(skill_tx.is_none()) it returns an informative error rather than
blocking forever.
§Communication flow
Agent calls install_skill(query)
→ HTTP GET skillhub.cn/search?q=…
→ sends SkillInstallEvent::Search to TUI side-channel
→ awaits oneshot reply (selected slug or None)
TUI shows results modal, user picks a skill or presses Esc
→ oneshot reply: Some(slug) or None
If slug: HTTP GET skillhub.cn/download?slug=… (zip)
→ parse zip → collect SkillZipFile list
→ sends SkillInstallEvent::Files to TUI side-channel
→ awaits oneshot reply (bool: confirm)
TUI shows files preview; user presses y or Esc
→ oneshot reply: true or false
If confirmed: extract zip to ~/.recursive/skills/<slug>/Structs§
- Install
Skill - Skill
Files Request - Phase 2: tool → TUI. User reviews files and confirms installation.
- Skill
Search Request - Phase 1: tool → TUI. User selects a slug or cancels.
- Skill
Search Result - One search result returned by
skillhub.cn. - Skill
ZipFile - A single file from inside a skill zip archive.
Enums§
- Skill
Install Event - Events from the
install_skilltool to the TUI side-channel. Carried on a dedicatedmpsc::UnboundedReceiver<SkillInstallEvent>in the TUI backend, separate fromevent_rx, because the payloads containoneshot::Sendervalues which are notPartialEq.