cli-prompts-clack
Clack CLI Prompts
Quick Guide: Use
@clack/promptsfor pre-styled interactive CLI prompts (text, select, multiselect, confirm, spinner, progress). CheckisCancel()after EVERY prompt call -- users can Ctrl+C at any point.cancel()only prints; exit after it, with a non-zero code. Usegroup()for multi-step flows with centralized cancellation. Use@clack/coreonly when building fully custom prompt UIs. ESM-only since v1.0.
<critical_requirements>
CRITICAL: Before Using This Skill
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST check isCancel() after EVERY prompt call -- skipping this causes silent crashes when users press Ctrl+C)
(You MUST exit the process after cancel() -- the cancel message prints but execution continues otherwise)
(You MUST exit with a NON-ZERO code on cancellation, taking the value from the CLI framework's exit-code table where one exists and using 130 where none does -- exiting 0 tells every caller the work succeeded)
(You MUST use group() with onCancel for multi-step flows -- it handles cancellation centrally so you don't check each prompt individually)