jpskill.com
🛠️ 開発・MCP コミュニティ

opentui

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.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o opentui.zip https://jpskill.com/download/22797.zip && unzip -o opentui.zip && rm opentui.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22797.zip -OutFile "$d\opentui.zip"; Expand-Archive "$d\opentui.zip" -DestinationPath $d -Force; ri "$d\opentui.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して opentui.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → opentui フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
26

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

OpenTUI プラットフォームスキル

OpenTUI を使用してターミナルユーザーインターフェースを構築するための統合スキルです。以下の意思決定ツリーを使用して適切なフレームワークとコンポーネントを見つけ、詳細なリファレンスを読み込んでください。

重要なルール

すべての OpenTUI コードで以下のルールに従ってください。

  1. 新規プロジェクトには create-tui を使用してください。 フレームワークの REFERENCE.md のクイックスタートを参照してください。
  2. create-tui のオプションは引数の前に記述してください。 bunx create-tui -t react my-app は動作しますが、bunx create-tui my-app -t react は動作しません。
  3. process.exit() を直接呼び出さないでください。 renderer.destroy() を使用してください (core/gotchas.md を参照)。
  4. React/Solid でテキストのスタイル設定にはネストされたタグが必要です。 プロパティではなく修飾子要素を使用してください (components/text-display.md を参照)。

このスキルの使い方

リファレンスファイルの構造

フレームワークのリファレンスは5つのファイルパターンに従っています。横断的な概念は単一ファイルのガイドです。

./references/<framework>/ 内の各フレームワークには以下が含まれます。

ファイル 目的 読むべき時
REFERENCE.md 概要、使用時期、クイックスタート 常に最初に読んでください
api.md ランタイム API、コンポーネント、フック コードを書く時
configuration.md セットアップ、tsconfig、バンドル プロジェクトの設定時
patterns.md 一般的なパターン、ベストプラクティス 実装ガイダンス
gotchas.md 落とし穴、制限、デバッグ トラブルシューティング

./references/<concept>/ 内の横断的な概念は、REFERENCE.md をエントリポイントとしています。

読む順序

  1. 選択したフレームワークの REFERENCE.md から始めてください。
  2. 次に、タスクに関連する追加ファイルを読んでください。
    • コンポーネントの構築 -> api.md + components/<category>.md
    • プロジェクトのセットアップ -> configuration.md
    • レイアウト/配置 -> layout/REFERENCE.md
    • キーボード/入力処理 -> keyboard/REFERENCE.md
    • アニメーション -> animation/REFERENCE.md
    • トラブルシューティング -> gotchas.md + testing/REFERENCE.md

例のパス

./references/react/REFERENCE.md           # React の場合はここから開始
./references/react/api.md              # React コンポーネントとフック
./references/solid/configuration.md    # Solid プロジェクトのセットアップ
./references/components/inputs.md      # Input、Textarea、Select のドキュメント
./references/core/gotchas.md           # コアのデバッグのヒント

ランタイムに関する注意

OpenTUI は Bun 上で動作し、ネイティブビルドには Zig を使用しています。ランタイム要件とビルドガイダンスについては、./references/core/gotchas.md を読んでください。

クイック意思決定ツリー

「どのフレームワークを使用すべきですか?」

どのフレームワーク?
├─ 完全な制御、最高のパフォーマンス、フレームワークのオーバーヘッドなしを望む
│  └─ core/ (命令型 API)
├─ React を知っており、おなじみのコンポーネントパターンを望む
│  └─ react/ (React リコンサイラ)
├─ きめ細やかなリアクティビティ、最適な再レンダリングを望む
│  └─ solid/ (Solid リコンサイラ)
└─ OpenTUI の上にライブラリ/フレームワークを構築している
   └─ core/ (命令型 API)

「コンテンツを表示する必要があります」

コンテンツを表示しますか?
├─ プレーンまたはスタイル付きテキスト -> components/text-display.md
├─ 境界線/背景付きコンテナ -> components/containers.md
├─ スクロール可能なコンテンツ領域 -> components/containers.md (scrollbox)
├─ ASCII アートバナー/タイトル -> components/text-display.md (ascii-font)
├─ 構文ハイライト付きコード -> components/code-diff.md
├─ 差分ビューア (統合/分割) -> components/code-diff.md
├─ 診断付き行番号 -> components/code-diff.md
└─ Markdown コンテンツ (ストリーミング) -> components/code-diff.md (markdown)

「ユーザー入力が必要です」

ユーザー入力?
├─ 単一行テキストフィールド -> components/inputs.md (input)
├─ 複数行テキストエディタ -> components/inputs.md (textarea)
├─ リストからの選択 (垂直) -> components/inputs.md (select)
├─ タブベースの選択 (水平) -> components/inputs.md (tab-select)
└─ カスタムキーボードショートカット -> keyboard/REFERENCE.md

「レイアウト/配置が必要です」

レイアウト?
├─ Flexbox スタイルのレイアウト (行、列、折り返し) -> layout/REFERENCE.md
├─ 絶対位置指定 -> layout/patterns.md
├─ ターミナルサイズへの応答 -> layout/patterns.md
├─ コンテンツのセンタリング -> layout/patterns.md
└─ 複雑なネストされたレイアウト -> layout/patterns.md

「アニメーションが必要です」

アニメーション?
├─ タイムラインベースのアニメーション -> animation/REFERENCE.md
├─ イージング関数 -> animation/REFERENCE.md
├─ プロパティトランジション -> animation/REFERENCE.md
└─ ループアニメーション -> animation/REFERENCE.md

「入力を処理する必要があります」

入力処理?
├─ キーボードイベント (キープレス、リリース) -> keyboard/REFERENCE.md
├─ フォーカス管理 -> keyboard/REFERENCE.md
├─ ペーストイベント -> keyboard/REFERENCE.md
├─ マウスイベント -> components/containers.md
└─ テキスト選択 -> components/text-display.md

「TUI をテストする必要があります」

テスト?
├─ スナップショットテスト -> testing/REFERENCE.md
├─ インタラクションテスト -> testing/REFERENCE.md
├─ テストレンダラーのセットアップ -> testing/REFERENCE.md
└─ テストのデバッグ -> testing/REFERENCE.md

「デバッグ/トラブルシューティングが必要です」

トラブルシューティング?
├─ ランタイムエラー、クラッシュ -> <framework>/gotchas.md
├─ レイアウトの問題 -> layout/REFERENCE.md + layout/patterns.md
├─ 入力/フォーカスの問題 -> keyboard/REFERENCE.md
└─ 再現 + 回帰テスト -> testing/REFERENCE.md

トラブルシューティングインデックス

  • ターミナルのクリーンアップ、クラッシュ -> core/gotchas.md
  • テキストスタイルが適用されない -> components/text-display.md
  • 入力フォーカス/ショートカット -> keyboard/REFERENCE.md
  • レイアウトのずれ -> layout/REFERENCE.md
  • 不安定なスナップショット -> testing/REFERENCE.md

コンポーネント名の違いやテキスト修飾子については、components/REFERENCE.md を参照してください。

製品インデックス

フレームワーク

フレームワーク エントリファイル 説明
Core ./references/core/REFERENCE.md 命令型 API、すべてのプリミティブ
React ./references/react/REFERENCE.md 宣言型 TUI 用の React リコンサイラ
Solid ./references/solid/REFERENCE.md 宣言型 TUI 用の SolidJS リコンサイラ

横断的な概念

概念 エントリファイル 説明
Layout ./references/layout/REFERENCE.md Yoga/Flexb
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

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:

  1. Use create-tui for new projects. See framework REFERENCE.md quick starts.
  2. create-tui options must come before arguments. bunx create-tui -t react my-app works, bunx create-tui my-app -t react does NOT.
  3. Never call process.exit() directly. Use renderer.destroy() (see core/gotchas.md).
  4. 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

  1. Start with REFERENCE.md for your chosen framework
  2. 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

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)
├─ 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
├─ Focus management -> keyboard/REFERENCE.md
├─ Paste events -> keyboard/REFERENCE.md
├─ Mouse events -> components/containers.md
└─ Text selection -> components/text-display.md

"I need to test my TUI"

Testing?
├─ Snapshot testing -> testing/REFERENCE.md
├─ Interaction testing -> testing/REFERENCE.md
├─ Test renderer setup -> testing/REFERENCE.md
└─ Debugging tests -> testing/REFERENCE.md

"I need to debug/troubleshoot"

Troubleshooting?
├─ Runtime errors, crashes -> <framework>/gotchas.md
├─ Layout issues -> layout/REFERENCE.md + layout/patterns.md
├─ Input/focus issues -> keyboard/REFERENCE.md
└─ Repro + regression tests -> testing/REFERENCE.md

Troubleshooting Index

  • Terminal cleanup, crashes -> core/gotchas.md
  • Text styling not applying -> components/text-display.md
  • Input focus/shortcuts -> keyboard/REFERENCE.md
  • Layout misalignment -> layout/REFERENCE.md
  • Flaky snapshots -> testing/REFERENCE.md

For component naming differences and text modifiers, see components/REFERENCE.md.

Product Index

Frameworks

Framework Entry File Description
Core ./references/core/REFERENCE.md Imperative API, all primitives
React ./references/react/REFERENCE.md React reconciler for declarative TUI
Solid ./references/solid/REFERENCE.md SolidJS reconciler for declarative TUI

Cross-Cutting Concepts

Concept Entry File Description
Layout ./references/layout/REFERENCE.md Yoga/Flexbox layout system
Components ./references/components/REFERENCE.md Component reference by category
Keyboard ./references/keyboard/REFERENCE.md Keyboard input handling
Animation ./references/animation/REFERENCE.md Timeline-based animations
Testing ./references/testing/REFERENCE.md Test renderer and snapshots

Component Categories

Category Entry File Components
Text & Display ./references/components/text-display.md text, ascii-font, styled text
Containers ./references/components/containers.md box, scrollbox, borders
Inputs ./references/components/inputs.md input, textarea, select, tab-select
Code & Diff ./references/components/code-diff.md code, line-number, diff, markdown

Resources

Repository: https://github.com/anomalyco/opentui Core Docs: https://github.com/anomalyco/opentui/tree/main/packages/core/docs Examples: https://github.com/anomalyco/opentui/tree/main/packages/core/src/examples Awesome List: https://github.com/msmps/awesome-opentui

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。