IpMan 技能管家 (companion skill)
You drive the ipman CLI on the user's behalf. The TUI is for humans in a
terminal — NEVER launch bare ipman here. Use --json commands and render
panels in chat instead.
Step 0 — preflight (every invocation)
command -v ipman— if missing, STOP and tell the user to install:pipx install ipman-cli(oruv tool install ipman-cli). Never continue silently without the CLI.ipman skill-sync --check --json— three-way version check:cli_outdated: true→ tell the user a newer ipman exists on PyPI and suggest the /ipman-update skill (it detects pipx/uv/pip and upgrades, then regenerates the skills). Or, ONLY with their consent, runpipx upgrade ipman-clidirectly. Never upgrade silently.skill_stale: true→ runipman skill-sync --self <this skill's dir>to regenerate this skill from the installed CLI, then say "skill updated to match CLI vX — continuing with current instructions."- both false → proceed, say nothing.
Interaction protocol (three steps)
- Render the panel. Run
ipman status --json(oripman scan --jsonfor deep results incl. duplicate groups and cleanable findings). Render a compact markdown panel: one row per scope (taken_over ⚑/native ○, active, archived/loadable, wild, broken), then per-scope detail on request — 启用区 (active skills with linkness/ownership) and 归档区 (loadable items and packs with active ratios). Number the rows. - Choose. Small option sets (≤4 or grouped) → present via your host's
question tool (arrow-key selection). Large lists → the user names rows by
number or name; repeat their selection back before acting.
HARD RULE: any write action (
absorb,dedup --apply,clean --apply,takeover,release,enable,disable,pack create) requires one explicit confirmation. Show the dry-run output first where one exists. - Execute and report. Run the CLI command, then re-render the affected part of the panel so the user sees the before/after.
Command map (user vocabulary -> CLI)
| 用户说 | 命令 |
|---|---|
| 看看技能状况 / 全景 | ipman status --json |
| 深扫 / 找重复 / 找垃圾 | ipman scan --json |
| 接管技能 X(收进统一保管) | ipman absorb <X> [--user] |
| 接管整个目录(保护层:防误删、可整体恢复) | ipman takeover user (or . for the project) |
| 修复被外部更新器打断的接管 | ipman takeover <scope> (auto-repairs, merges new skills) |
| 释放目录 | ipman release <scope> |
| 停用 X(先撤下,还能再启用) | ipman disable <X> [--scope user] |
| 启用 X / 整包启用 | ipman enable <X> | --pack <P> [--scope user] |
| 去重 | ipman dedup then, confirmed, ipman dedup --apply |
| 清理断链/垃圾 | ipman clean then, confirmed, ipman clean --apply (quarantines to ~/.ipman/trash) |
| 定义功能包 | ipman pack create <name> <skills…> |
| 项目登记 | ipman init (inside the project) |
Safety notes you may relay when relevant: apply-level actions are dry-run first and quarantined (recoverable from ~/.ipman/trash); absorb never touches marketplace plugins, git clones (kept for their upstream) or suite wrappers; disable never deletes content — the store keeps the original.