opentui
Skill này làm gì
Skill này bao quát việc xây giao diện người dùng terminal bằng framework OpenTUI, bằng code thuần hoặc với React hay Solid. Nó dành cho lập trình viên làm ứng dụng toàn màn hình chạy trong terminal.
Khi nào nên dùng
- ✓Khi ai đó muốn xây một ứng dụng terminal có bố cục trực quan.
- ✓Khi một giao diện terminal cần xử lý bàn phím, thành phần hoặc hoạt ảnh.
- ✓Khi một giao diện terminal có lỗi cần khắc phục.
Liên kết skill
https://github.com/cline/cline/blob/main/.agents/skills/opentui/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn xây một bảng điều khiển terminal có khung và phím tắt. Tôi bắt đầu với OpenTUI thế nào?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc hướng dẫn của framework phù hợp và làm theo các quy tắc thiết lập, thành phần và bố cục. Nó cũng kiểm tra các lỗi thường gặp, như thoát ứng dụng an toàn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
OpenTUI Platform Skill
Consolidated skill for building terminal user interfaces with OpenTUI. Use decision trees below to find the right framework and components, then load detailed references.
Critical Rules
Follow these rules in all OpenTUI code:
- Use
create-tuifor new projects. See frameworkREFERENCE.mdquick starts. create-tuioptions must come before arguments.bunx create-tui -t react my-appworks,bunx create-tui my-app -t reactdoes NOT.- Never call
process.exit()directly. Userenderer.destroy()(seecore/gotchas.md). - Text styling requires nested tags in React/Solid. Use modifier elements, not props (see
components/text-display.md).
How to Use This Skill
Reference File Structure
Framework references follow a 5-file pattern. Cross-cutting concepts are single-file guides.
Each framework in ./references/<framework>/ contains:
| File | Purpose | When to Read |
|---|---|---|
REFERENCE.md |
Overview, when to use, quick start | Always read first |
api.md |
Runtime API, components, hooks | Writing code |
configuration.md |
Setup, tsconfig, bundling | Configuring a project |
patterns.md |
Common patterns, best practices | Implementation guidance |
gotchas.md |
Pitfalls, limitations, debugging | Troubleshooting |
Cross-cutting concepts in ./references/<concept>/ have REFERENCE.md as the entry point.
Reading Order
- Start with
REFERENCE.mdfor your chosen framework - Then read additional files relevant to your task:
- Building components ->
api.md+components/<category>.md - Setting up project ->
configuration.md - Layout/positioning ->
layout/REFERENCE.md - Keyboard/input handling ->
keyboard/REFERENCE.md - Animations ->
animation/REFERENCE.md - Troubleshooting ->
gotchas.md+testing/REFERENCE.md
- Building components ->
Example Paths
./references/react/REFERENCE.md # Start here for React
./references/react/api.md # React components and hooks
./references/solid/configuration.md # Solid project setup
./references/components/inputs.md # Input, Textarea, Select docs
./references/core/gotchas.md # Core debugging tips
Runtime Notes
OpenTUI runs on Bun and uses Zig for native builds. Read ./references/core/gotchas.md for runtime requirements and build guidance.
Quick Decision Trees
"Which framework should I use?"
Which framework?
├─ I want full control, maximum performance, no framework overhead
│ └─ core/ (imperative API)
├─ I know React, want familiar component patterns
│ └─ react/ (React reconciler)
├─ I want fine-grained reactivity, optimal re-renders
│ └─ solid/ (Solid reconciler)
└─ I'm building a library/framework on top of OpenTUI
└─ core/ (imperative API)
"I need to display content"
Display content?
├─ Plain or styled text -> components/text-display.md
├─ Container with borders/background -> components/containers.md
├─ Scrollable content area -> components/containers.md (scrollbox)
├─ ASCII art banner/title -> components/text-display.md (ascii-font)
├─ Data table with borders/wrapping -> components/code-diff.md (TextTable)
├─ Code with syntax highlighting -> components/code-diff.md
├─ Diff viewer (unified/split) -> components/code-diff.md
├─ Line numbers with diagnostics -> components/code-diff.md
└─ Markdown content (streaming) -> components/code-diff.md (markdown)
"I need user input"
User input?
├─ Single-line text field -> components/inputs.md (input)
├─ Multi-line text editor -> components/inputs.md (textarea)
├─ Select from a list (vertical) -> components/inputs.md (select)
├─ Tab-based selection (horizontal) -> components/inputs.md (tab-select)
└─ Custom keyboard shortcuts -> keyboard/REFERENCE.md
"I need layout/positioning"
Layout?
├─ Flexbox-style layouts (row, column, wrap) -> layout/REFERENCE.md
├─ Absolute positioning -> layout/patterns.md
├─ Responsive to terminal size -> layout/patterns.md
├─ Centering content -> layout/patterns.md
└─ Complex nested layouts -> layout/patterns.md
"I need animations"
Animations?
├─ Timeline-based animations -> animation/REFERENCE.md
├─ Easing functions -> animation/REFERENCE.md
├─ Property transitions -> animation/REFERENCE.md
└─ Looping animations -> animation/REFERENCE.md
"I need to handle input"
Input handling?
├─ Keyboard events (keypress, release) -> keyboard/REFERENCE.md
├─
Câu hỏi thường gặp
Nó bao quát những framework nào?
Skill bao quát API mệnh lệnh cốt lõi, React reconciler và Solid reconciler.
Làm sao để bắt đầu một dự án mới?
Skill khuyến nghị công cụ create-tui, với các tùy chọn đặt trước tên dự án.
Tôi có thể thoát ứng dụng bằng process.exit không?
Skill khuyên không gọi process.exit trực tiếp, và dùng renderer.destroy thay thế.
Chi tiết
Mô tả gốc của tác giả
Comprehensive OpenTUI skill for building terminal user interfaces. Covers the core imperative API, React reconciler, and Solid reconciler. Use for any TUI development task including components, layout, keyboard handling, animations, and testing.
repo: cline/cline
Độ phổ biến
- Sao GitHub
- 71k
- Vị trí xếp hạng
- #3107
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
cline-sdk
71kDạy agent của bạn xây dựng AI agent bằng Cline SDK, bao gồm tool, phiên làm việc, sự kiện, nhà cung cấp mô hình và các đội nhiều agent.
create-pull-request
71kGiúp agent của bạn tạo pull request trên GitHub với tiêu đề và mô tả rõ ràng, theo template của dự án và kiểm tra nhánh trước.
tuistory
71kDạy agent của bạn điều khiển và kiểm thử ứng dụng terminal trong một phiên chạy nền, gõ lệnh và đọc màn hình, ngay cả khi không có màn hình hiển thị.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.