Agent skill

OpenTUI Terminal Interfaces

by cline in cline/cline

Helps build terminal user interfaces with OpenTUI using its core imperative API or its React and Solid reconcilers, with references for layout, keyboard, animation and testing.

Apache-2.0Auto-check passedDevelopment

Install OpenTUI Terminal Interfaces

skills CLI
$ npx skills add cline/cline --skill opentui -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cline/cline opentui --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cline/cline.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/opentui .claude/skills/opentui && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
opentui
GitHub stars
70k
Token cost
~1.9k tokens
SKILL.md length
394 words
Files
29 (incl. references)
Skills in repo
8
Repo updated
First seen
Licence
Apache-2.0

At a glance

Helps build terminal user interfaces with OpenTUI using its core imperative API or its React and Solid reconcilers, with references for layout, keyboard, animation and testing.

  • Works in 4 steps: Use create-tui for new projects. See… → create-tui options must come before… → Never call process.exit() directly. Use… → …
  • Starting a new terminal UI project with create-tui
  • SKILL.md covers Critical Rules, How to Use This Skill, Quick Decision Trees and Product Index, plus 1 more section
  • Calls bunx

What it does

The skill is a router into a large set of reference files. Each framework folder (core, React, Solid) follows the same five-file pattern: `REFERENCE.md` with the overview and quick start, which is always read first, then `api.md`, `configuration.md`, `patterns.md` and `gotchas.md`. Shared topics such as components, layout, keyboard input, animation and testing have their own folders, and a reading order maps each task to the right files.

Four rules apply to all OpenTUI code: start new projects with `create-tui`, put its options before its arguments, never call `process.exit()` directly but use `renderer.destroy()`, and style text in React and Solid with nested modifier tags rather than props. OpenTUI runs on Bun and uses Zig for native builds, and the core gotchas file lists the runtime and build requirements. Decision trees help you pick between the imperative core and the two framework bindings.

When your agent uses it

  • Starting a new terminal UI project with create-tui
  • Building TUI components and layouts in React or Solid
  • Handling keyboard input and animations in a terminal app
  • Debugging OpenTUI build or runtime pitfalls

Example prompts

  • “Scaffold a new OpenTUI app with the React template.”
  • “Build a two-column layout with a scrollable list and a detail pane in OpenTUI.”
  • “Add keyboard shortcuts to quit and switch focus in this terminal UI.”
  • “My OpenTUI app leaves the terminal in a broken state on exit, so find out why.”

Requirements

  • Bun, which OpenTUI runs on
  • Zig, for native builds (see the gotchas reference)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  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).

What it can do on your machine

Read from SKILL.md and the folder at commit 81e9561. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bunx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

OpenTUI Terminal Interfaces loads about 1.9k tokens when it runs, and up to ~55k if it reads all its reference files. Until then it costs about 63 tokens; SKILL.md has 394 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~55k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cline/cline at commit 81e9561, republished under its Apache-2.0 licence (© cline). 394 words, ~1,901 tokens.

Download SKILL.mdSave it as .claude/skills/opentui/SKILL.md (or your agent's skills folder). This skill also uses 28 other files; get the full folder from GitHub.
name
opentui
description
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.
metadata.references
core, react, solid

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:

FilePurposeWhen to Read
REFERENCE.mdOverview, when to use, quick startAlways read first
api.mdRuntime API, components, hooksWriting code
configuration.mdSetup, tsconfig, bundlingConfiguring a project
patterns.mdCommon patterns, best practicesImplementation guidance
gotchas.mdPitfalls, limitations, debuggingTroubleshooting

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)
├─ 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)
Show full SKILL.md (156 more words)Show less
"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 & copy-on-select -> keyboard/REFERENCE.md (selection)
└─ Clipboard (OSC 52) -> keyboard/REFERENCE.md (clipboard)
"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
FrameworkEntry FileDescription
Core./references/core/REFERENCE.mdImperative API, all primitives
React./references/react/REFERENCE.mdReact reconciler for declarative TUI
Solid./references/solid/REFERENCE.mdSolidJS reconciler for declarative TUI
Cross-Cutting Concepts
ConceptEntry FileDescription
Layout./references/layout/REFERENCE.mdYoga/Flexbox layout system
Components./references/components/REFERENCE.mdComponent reference by category
Keyboard./references/keyboard/REFERENCE.mdKeyboard input handling
Animation./references/animation/REFERENCE.mdTimeline-based animations
Testing./references/testing/REFERENCE.mdTest renderer and snapshots
Component Categories
CategoryEntry FileComponents
Text & Display./references/components/text-display.mdtext, ascii-font, styled text
Containers./references/components/containers.mdbox, scrollbox, borders
Inputs./references/components/inputs.mdinput, textarea, select, tab-select
Code & Diff./references/components/code-diff.mdcode, line-number, diff, markdown, text-table

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

© cline, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 28 other files (references) in .agents/skills/opentui of cline/cline.

  • SKILL.md
  • references/animation/REFERENCE.md
  • references/components/REFERENCE.md
  • references/components/code-diff.md
  • references/components/containers.md
  • references/components/inputs.md
  • references/components/text-display.md
  • references/core/REFERENCE.md
  • references/core/api.md
  • references/core/configuration.md
  • references/core/gotchas.md
  • references/core/patterns.md
  • references/keyboard/REFERENCE.md
  • references/layout/REFERENCE.md
  • references/layout/patterns.md
  • … and 14 more

Open the folder on GitHubat commit 81e9561

Compare with similar skills

OpenTUI Terminal Interfaces next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

OpenTUI Terminal Interfaces compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
OpenTUI Terminal Interfaces this skillcline/cline70k—~1.9kAutomated safety check: PassApache-2.0
Opentrons TypescriptOpentrons/opentrons521—~3.7kAutomated safety check: PassApache-2.0
React Render Types CompositionHorusGoul/eslint-plugin-react-render-types111—~1.1kAutomated safety check: PassMIT
Safe Element Comparisonseasonedcc/remix-forms514—~1.8kAutomated safety check: PassMIT
Frontend Typescript Rulesshinpr/ai-coding-project-boilerplate232—~1.7kAutomated safety check: PassMIT
React Devdavila7/claude-code-templates32k2 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Opentrons Typescript

    Opentrons/opentrons

    TypeScript conventions, React patterns, testing, styling, and import rules for the Opentrons monorepo JS/TS packages.

    521 GitHub stars~3.7k tokensUpdated today
    DevelopmentAuto-check passed
  • React Render Types Composition

    HorusGoul/eslint-plugin-react-render-types

    Composition patterns for building React components with @renders type annotations from eslint-plugin-react-render-types.

    111 GitHub stars~1.1k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Safe Element Comparison

    seasonedcc/remix-forms

    Maintain element type comparison safety in remix-forms. An agent skill from seasonedcc/remix-forms.

    514 GitHub stars~1.8k tokensUpdated 5 mo ago
    Frontend & DesignAuto-check passed
  • Frontend Typescript Rules

    shinpr/ai-coding-project-boilerplate

    Applies React/TypeScript type safety, component design, and state management rules.

    232 GitHub stars~1.7k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • React Dev

    davila7/claude-code-templates

    This skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components are mentioned.

    32k GitHub starsUsed in 2 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Typescript Rules

    shinpr/claude-code-workflows

    React/TypeScript frontend development rules including type safety, component design, state management, and error handling.

    691 GitHub stars~1.8k tokensUpdated 7 days ago
    Frontend & DesignAuto-check passed

More from cline/cline

All 8 skills in this repo
  • Cline SDK Guide

    cline/cline

    Reference for building AI agents with the Cline SDK: the Agent runtime, ClineCore sessions, custom tools, plugins, events, providers, scheduling and multi-agent teams.

    70k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Guides publishing a one-time What's new dialog in the Cline desktop app: deciding if one is due, picking highlights from the changelog and editing one content file.

    70k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Covers preparing, tagging and publishing a Cline desktop app release on the stable, beta or nightly channel through the desktop-publish GitHub workflow.

    70k GitHub stars~4.5k tokensUpdated today
    Auto-check passed
  • Validates and publishes the standalone @cline/ui npm package through its own release workflow, separate from the Cline SDK runtime packages.

    70k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Walks through releasing the Cline CLI package to npm: release notes, version bump, matching git tag, and either the GitHub workflow or a local publish.

    70k GitHub stars~3.4k tokensUpdated today
    Auto-check: warnings

Questions about OpenTUI Terminal Interfaces

What does OpenTUI Terminal Interfaces do?

Helps build terminal user interfaces with OpenTUI using its core imperative API or its React and Solid reconcilers, with references for layout, keyboard, animation and testing. The skill is a router into a large set of reference files.md`.

When should I use OpenTUI Terminal Interfaces?

OpenTUI Terminal Interfaces fits situations like: starting a new terminal UI project with create-tui; building TUI components and layouts in React or Solid; handling keyboard input and animations in a terminal app; debugging OpenTUI build or runtime pitfalls.

How do I install OpenTUI Terminal Interfaces in Claude Code?

Run `npx skills add cline/cline --skill opentui -a claude-code`. Or copy the skill folder (.agents/skills/opentui in cline/cline) into .claude/skills/opentui in your project. Claude Code loads it when a task matches its description.

How do I install OpenTUI Terminal Interfaces in Codex?

Run `npx skills add cline/cline --skill opentui -a codex`. Or copy the skill folder (.agents/skills/opentui in cline/cline) into .agents/skills/opentui in your project. Codex loads it when a task matches its description.

Can I use OpenTUI Terminal Interfaces in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cline/cline --skill opentui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/opentui, .gemini/skills/opentui, .github/skills/opentui and .opencode/skills/opentui in your project.

What does OpenTUI Terminal Interfaces need to run?

Going by SKILL.md and its folder, OpenTUI Terminal Interfaces needs the command-line tools its instructions call (bunx). Our summary lists: Bun, which OpenTUI runs on; Zig, for native builds (see the gotchas reference).

Does OpenTUI Terminal Interfaces access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is OpenTUI Terminal Interfaces safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does OpenTUI Terminal Interfaces use?

OpenTUI Terminal Interfaces is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does OpenTUI Terminal Interfaces use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 53k tokens, read only when the agent opens those files.

What are the alternatives to OpenTUI Terminal Interfaces?

Skills that share tags, products or a category with OpenTUI Terminal Interfaces: Opentrons Typescript (Opentrons/opentrons, 521 stars), React Render Types Composition (HorusGoul/eslint-plugin-react-render-types, 111 stars), Safe Element Comparison (seasonedcc/remix-forms, 514 stars) and Frontend Typescript Rules (shinpr/ai-coding-project-boilerplate, 232 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains OpenTUI Terminal Interfaces?

cline (a GitHub organization) maintains it in cline/cline, which has 70,001 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 8, 2026.

Source: cline/cline on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.