terminal-ui

Terminal user interface (TUI) performance and UX guidance for TypeScript applications using Ink and Clack. Suitable for building CLI tools, interactive terminal prompts, or developer tools that include TUI components; triggered when tasks involve TUI components, CLI prompts, terminal rendering, keyboard input handling, or developer tooling.

Last repository push
GitHub Stars
228
Forks
20
Issues / PRs
3

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "terminal-ui" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-d9e4c47a5c1de35cff488f59d48776deb6de2206f148ed8b0d1a01ac74b915f6. Verify the upstream source and version against https://github.com/pproenca/dot-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Terminal user interface (TUI) performance and UX guidance for TypeScript applications using Ink and Clack. Suitable for building CLI tools, interactive terminal prompts, or developer tools that include TUI components; triggered when tasks involve TUI components, CLI prompts, terminal rendering, keyboard input handling, or developer tooling.

0 Downloads

Introduction source: third_party · pproenca · 0.0.1 Reference

SkillPi interpretation

Tasks
Terminal User Interface (TUI) performance and UX guidelines for TypeScript applications using Ink and Clack. This skill should be used when building CLI tools, interactive terminal prompts, or developer tooling with TUI components. Triggers on tasks involving TUI components, CLI prompts, terminal rendering, keyboard input handling, or developer tooling.
Inputs and outputs
`render-single-write` - Batch Terminal Output in Single Write `render-overwrite-dont-clear` - Overwrite Content Instead of Clear and Redraw `render-synchronized-output` - Use Synchronized Output Protocol for Animations `render-60fps-baseline` - Target 60fps for Smooth Animation `render-partial-updates` - Update Only Changed Regions `render-escape-sequence-batching` - Defer ANSI Escape Code Generation to Final Output
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: terminal-ui
description: Terminal User Interface (TUI) performance and UX guidelines for TypeScript applications using Ink and Clack. This skill should be used when building CLI tools, interactive terminal prompts, or developer tooling with TUI components. Triggers on tasks involving TUI components, CLI prompts, terminal rendering, keyboard input handling, or developer tooling.

DevEx Developer Experience TUI Best Practices

Comprehensive developer experience guide for building TypeScript terminal user interfaces using Ink (React for CLIs) and Clack prompts. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Building CLI tools with interactive prompts using @clack/prompts
  • Creating React-based terminal UIs with Ink
  • Handling keyboard input and user interactions
  • Optimizing terminal rendering and preventing flicker
  • Designing developer-friendly CLI experiences

Rule Categories by Priority

Priority Category Impact Prefix
1 Rendering & Output CRITICAL render-
2 Input & Keyboard CRITICAL input-
3 Component Patterns HIGH tuicomp-
4 State & Lifecycle HIGH tuistate-
5 Prompt Design MEDIUM-HIGH prompt-
6 UX & Feedback MEDIUM ux-
7 Configuration & CLI MEDIUM tuicfg-
8 Robustness & Compatibility LOW-MEDIUM robust-

Quick Reference

1. Rendering & Output (CRITICAL)

  • render-single-write - Batch Terminal Output in Single Write
  • render-overwrite-dont-clear - Overwrite Content Instead of Clear and Redraw
  • render-synchronized-output - Use Synchronized Output Protocol for Animations
  • render-60fps-baseline - Target 60fps for Smooth Animation
  • render-partial-updates - Update Only Changed Regions
  • render-escape-sequence-batching - Defer ANSI Escape Code Generation to Final Output

2. Input & Keyboard (CRITICAL)

  • input-useinput-hook - Use useInput Hook for Keyboard Handling
  • input-immediate-feedback - Provide Immediate Visual Feedback for Input
  • input-modifier-keys - Handle Modifier Keys Correctly
  • input-isactive-focus - Use isActive Option for Focus Management
  • input-escape-routes - Always Provide Escape Routes

3. Component Patterns (HIGH)

  • tuicomp-box-flexbox - Use Box Component with Flexbox for Layouts
  • tuicomp-text-styling - Use Text Component for All Visible Content
  • tuicomp-measure-element - Use measureElement for Dynamic Sizing
  • tuicomp-static-for-logs - Use Static Component for Log Output
  • tuicomp-percentage-widths - Use Percentage Widths for Responsive Layouts
  • tuicomp-border-styles - Use Border Styles for Visual Structure

4. State & Lifecycle (HIGH)

  • tuistate-useapp-exit - Use useApp Hook for Application Lifecycle
  • tuistate-cleanup-effects - Always Clean Up Effects on Unmount
  • tuistate-functional-updates - Use Functional State Updates to Avoid Stale Closures
  • tuistate-usecallback-stable - Stabilize Callbacks with useCallback
  • tuistate-usememo-expensive - Memoize Expensive Computations with useMemo

5. Prompt Design (MEDIUM-HIGH)

  • prompt-group-flow - Use Clack group() for Multi-Step Prompts
  • prompt-validation - Validate Input Early with Descriptive Messages
  • prompt-cancellation - Handle Cancellation Gracefully with isCancel
  • prompt-spinner-tasks - Use Spinner and Tasks for Long Operations
  • prompt-custom-render - Build Custom Prompts with @clack/core

6. UX & Feedback (MEDIUM)

  • ux-progress-indicators - Show Progress for Operations Over 1 Second
  • ux-color-semantics - Use Colors Semantically and Consistently
  • ux-error-messages - Write Actionable Error Messages
  • ux-next-steps - Show Next Steps After Completion
  • ux-intro-outro - Use Intro and Outro for Session Framing

7. Configuration & CLI (MEDIUM)

  • tuicfg-sensible-defaults - Provide Sensible Defaults for All Options
  • tuicfg-env-vars - Support Standard Environment Variables
  • tuicfg-flags-over-args - Prefer Flags Over Positional Arguments
  • tuicfg-help-system - Implement Comprehensive Help System
  • tuicfg-json-output - Support Machine-Readable Output Format

8. Robustness & Compatibility (LOW-MEDIUM)

  • robust-tty-detection - Detect TTY and Adjust Behavior Accordingly
  • robust-signal-handling - Handle Process Signals Gracefully
  • robust-exit-codes - Use Meaningful Exit Codes
  • robust-terminal-restore - Always Restore Terminal State on Exit
  • robust-graceful-degradation - Degrade Gracefully for Limited Terminals

How to Use

Read individual reference files for detailed explanations and code examples:

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供全面的 TypeScript TUI 开发最佳实践指南
  • 覆盖 Ink 和 Clack 两大主流库的使用规范
  • 按优先级分类的规则体系便于实际应用
Trigger Precision90/100

Highlights

  • 触发词描述清晰完整,覆盖多种使用场景
  • 边界定义明确,不易与其他 Skill 重叠
Structure and Standards95/100

Highlights

  • 文档结构完整,章节划分清晰
  • 包含优先级矩阵和快速参考表
  • frontmatter 完整规范
Execution Reliability60/100

Areas to improve

  • 引用文件缺失 Reported severity: Major

    主文档引用了 references/_sections.md、assets/templates/_template.md、references/render-single-write.md、references/input-useinput-hook.md 等多个文件,但这些文件未包含在传入内容中

    Recommendation: 请补充所有被引用的文件内容,或调整文档结构使其自包含

Highlights

  • 内容为静态指南,无动态执行风险
  • 分类体系完整,便于查阅和使用
Evidence Verifiability (mean of the first four)83/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.