opentui
构建 OpenTUI 终端界面
终端界面工作通常需要了解组件、布局、输入、动画和测试中与框架相关的 OpenTUI 细节。此技能为 Claude、Codex 和 Claude Code 提供结构化参考,用于构建和排查 OpenTUI 应用。
安装前请停下并请求确认。
请审查安装计划,并在更改文件前获得用户明确同意。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "opentui" from https://skillstore.io/skills/msmps-opentui.md and its manifest at https://skillstore.io/api/skills/msmps-opentui/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“opentui”。 我需要一个带表单和键盘快捷键的 React 终端应用。
预期结果:
- 推荐使用 React reconciler,以获得熟悉的组件模式。
- 使用带有显式焦点管理的输入组件。
- 为 escape 和控制快捷键添加键盘 hooks。
- 使用 OpenTUI test renderer 和快照进行测试。
正在使用“opentui”。 我的 OpenTUI 日志在应用运行时没有显示。
预期结果:
- OpenTUI 会在渲染期间捕获控制台输出。
- 使用控制台覆盖层、键盘切换开关,或临时调试文件。
- 创建可复现测试,而不是猜测渲染 bug。
正在使用“opentui”。 我需要在终端界面中使用 diff 查看器。
预期结果:
- 使用 code 和 diff 组件参考。
- 根据可用的终端宽度选择统一视图或分栏显示。
- 在设置样式之前先规划滚动和行号行为。
安全审计
高风险All 328 static findings are false positives caused by documentation links, code formatting, framework terminology, and benign examples. Semantic review found plaintext password logging and permissive SSH authentication examples. Both should be corrected before publication.
已确认安全问题 (2)
风险因素
📁 文件系统访问 (50)
⚙️ 外部命令 (50)
🌐 网络访问 (19)
🔑 环境变量 (13)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/msmps-opentui/audits/7?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/msmps-opentui?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/msmps-opentui?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/msmps-opentui/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/msmps-opentui.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
msmps. (2026). opentui security audit report (audit version 7) [Author version unspecified]. Skillstore. https://skillstore.io/skills/msmps-opentui/audits/7BibTeX 引用
@techreport{msmps-msmps-opentui-2026,
author = {msmps},
title = {opentui security audit report (audit version 7)},
institution = {Skillstore},
year = {2026},
number = {7},
url = {https://skillstore.io/skills/msmps-opentui/audits/7},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "opentui security audit report (audit version 7)"
version: "unspecified"
type: report
authors:
- name: "msmps"
date-released: "2026-08-09"
url: "https://skillstore.io/skills/msmps-opentui/audits/7"
identifiers:
- type: other
value: "skillstore:msmps-opentui:audit:7"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 中你能构建什么
启动新的 TUI 应用
选择合适的 OpenTUI 框架路径,并使用组件和布局搭建第一个界面。
添加交互式终端控件
实现输入、焦点处理、键盘快捷键、粘贴行为,以及 escape 或控制键流程。
调试和测试终端渲染
使用快照、测试渲染器、控制台覆盖层和聚焦的复现案例来修复 OpenTUI 问题。
试试这些提示
使用 opentui 技能帮我在 core、React 和 Solid 之间做选择,用于一个需要 [requirements] 的终端应用。解释权衡,并推荐一条路径。
使用 opentui 技能设计一个包含 [components] 的 OpenTUI 屏幕。包括布局、焦点行为,以及需要查阅的相关参考文件。
使用 opentui 技能调试为什么我的 OpenTUI 应用中的 [input or shortcut] 无法工作。检查焦点、按键名称以及特定框架的 hook 用法。
使用 opentui 技能为此 OpenTUI 功能创建测试计划:[feature]。包括快照测试、交互测试,以及失败时的调试步骤。
最佳实践
- 从框架 REFERENCE 文件开始,然后只阅读相关的 API、配置、模式或 gotcha 文件。
- 构建交互式应用时,使用 renderer 清理模式,而不是直接终止进程。
- 在修改多个 UI 层之前,为布局、输入和渲染问题编写可复现测试。
避免
- 不要在未检查组件参考的情况下混用 React 和 Solid 的组件命名规则。
- 不要假设键盘输入会工作,除非目标输入或委托的子元素已经获得焦点。
- 不要在 OpenTUI 应用捕获终端渲染时依赖可见的控制台输出。