用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/spotify/confidence-cli --skill ink-tui命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Architecture guidelines and constraints for the Confidence Wizard CLI project
Load before writing, modifying, or adding any test file (unit, integration, or e2e). Covers testing philosophy, conventions, shared test scaffolds (__tests__/shared/), test framework structure (__tests__/e2e/testing-framework/, __tests__/ui/testing-framework/), and the named-key press() API for e2e tests.
IDE integration strategy pattern and guidelines for the Confidence Wizard CLI project
基于 SOC 职业分类
正在显示 SKILL.md
| name | ink-tui |
| description | Develop and modify the Ink-based terminal UI for the Confidence Wizard |
| version | 0.1 |
This skill covers building and modifying the interactive terminal user interface for the Confidence Wizard CLI. The TUI is built with Ink (React for CLIs), @inkjs/ui, and nanostores for state management.
The TUI follows a reactive session-driven pattern: the rendered screen derives from session state. Business logic updates state through store setters, and the router determines which screen to display.
src/lib/session.ts) — Source of truth for wizard statesrc/ui/tui/store.ts) — Nanostores-backed reactive store with explicit setterssrc/ui/tui/router.ts) — Declarative sequence-based navigationsrc/ui/tui/components/ScreenContainer.tsx) — Root layout orchestrating screenssrc/ui/tui/screen-registry.tsx) — Factory mapping ScreenId to componentssrc/ui/tui/screens/YourScreen.tsxScreenId entry in src/lib/session.tssrc/ui/tui/screen-registry.tsxsrc/ui/tui/screen-sequences.tsNo other files need changes.
For state that affects screen resolution:
WizardSession interfaceWizardStore that calls emitChange()For display-only state:
WizardStoresrc/ui/tui/components/)Reusable building blocks and composites: TextBlock, Divider, KeyboardHintsBar, ScreenContainer, TitleBar, etc. Barrel-exported from index.ts.
src/ui/tui/styles.ts)Shared constants: Colors, Icons, HAlign, VAlign. Import from here for consistent styling.
ink # Terminal React renderer (Yoga Flexbox)
react # Peer dependency
@inkjs/ui # Select, TextInput, Spinner, ProgressBar,
# ConfirmInput, MultiSelect, Badge, StatusMessage
Avoid standalone ink-text-input, ink-select-input — use @inkjs/ui instead.
| Browser | Ink Terminal |
|---|---|
<div> | <Box> |
<span> | <Text> |
| CSS/className | Direct props (flexDirection, padding) |
onClick | useInput() hook |
| Window size | useStdout().stdout.{columns,rows} |
| Layout | Flexbox via flexDirection |
ScreenId enum values, never raw strings for screen identificationWizardStore settersColors and Icons from styles.ts for consistent themingrouter as a prop for navigation@inkjs/ui components over custom implementationsuseEffect, not arrow functions — e.g. useEffect(function autoAdvance() { ... }, [deps])HAlign / VAlign enums from styles.ts instead of raw alignment strings ('flex-start', 'center', 'flex-end')