ai-devkit
ai-devkit copied to clipboard
ui(skill): consistent result rendering across add/remove/update
Current output
skill add (from renderSkillInstallResult):
-> ~/.claude/skills/frontend-design/SKILL.md (already exists, skipped)
Successfully installed: frontend-design
ℹ Source: anthropics/skills
ℹ Installed to (global): claude, codex
skill remove:
-> Removed from /path/claude/skills/foo
✔ Successfully removed from 3 location(s).
Problems
->result lines are unstyled and inconsistent: install uses-> target (action)with a parenthetical that sometimes contains a sentence (already exists, skipped), remove uses-> Removed from target— plain text, no color, no glyph, different phrasing for the same "per-location result" concept.Successfully installed:line is plainui.textwhile remove usesui.success(✔) — the most important line of the output has no success styling inadd.- Naive pluralization:
3 location(s),feature doc(s)(docs command). - Metadata lines switch to
ℹinfo styling (Source:,Installed to) while the equivalent lines inremoveare alsoui.infobut labeledNote:— the key (Source/Installed to/Note) and styling conventions don't line up between the two flows. ui.summaryinskill update(updated/skipped/failed with error details) is the best output in the skill family — butadd/removedon't follow its pattern; three render styles for three subcommands.
Expectation
- One per-item line convention across add/remove/update:
✔/⚠/✖ <target> — <action or reason>with color by outcome (installed green, skipped dim/yellow, failed red). - Headline result through
ui.success/ui.warningconsistently (✔ Installed frontend-design from anthropics/skills). - Metadata (
Installed to,Source,Note: cached copy preserved) as dim lines under the headline, same order in every flow. - Pluralization via the shared helper (
3 locations). - Long term: converge on the
ui.summaryshape used byskill updateso all mutating skill subcommands render alike.
Files: packages/cli/src/commands/skill/skill.render.ts (renderSkillInstallResult, renderSkillRemoveResult, renderUpdateSummary)