Matt Simpson 87c512939f docs: update skill documentation with upstream repo (#3)
* fix(patterns): replace process.exit() with renderer.destroy() in react patterns

process.exit() violates Critical Rule #2 which states you must never call
it directly. Instead, use renderer.destroy() to properly clean up the
renderer and exit gracefully.

* docs(containers): add focusable prop and auto-focus behavior to Box

Documents the focusable prop on Box which allows boxes to receive focus
via mouse click. Includes controlled focus state example and notes about
focus bubbling and preventDefault behavior.

* docs(react/api): add focusable, themeMode, and theme_mode event

- Documents renderer.themeMode property for detecting terminal theme
- Adds theme_mode event listener example for reactive theme changes
- Adds focusable and focused props to Box component
- Adds paddingX/Y and marginX/Y axis shorthand props to Box

* docs(solid/api): add focusable, themeMode, and enhance useSelectionHandler

- Documents renderer.themeMode property and theme_mode event
- Adds focusable and focused props to Box component
- Adds paddingX/Y and marginX/Y axis shorthand props
- Expands useSelectionHandler docs with Selection API details
- Notes that useSelectionHandler is Solid-only

* docs(components): add markdown component and axis shorthand props

- Adds markdown component to component table and chooser
- Documents paddingX/Y and marginX/Y axis shorthand properties
- Updates Code & Diff category to include markdown

* docs(config): add autoFocus renderer option to react configuration

Documents the autoFocus option that controls whether clicking on a
focusable element automatically focuses it. Default is true.

* docs(config): add autoFocus renderer option to solid configuration

Documents the autoFocus option that controls whether clicking on a
focusable element automatically focuses it. Default is true.

* docs(keyboard): clarify usePaste is Solid-only, add OSC 52 clipboard API

- Notes that usePaste hook is only available in Solid, not React
- Documents copyToClipboardOSC52, clearClipboardOSC52, isOsc52Supported
- Adds ClipboardTarget enum usage for X11 clipboard targets
- Shows Selection.copyToClipboard() convenience method

* docs(code-diff): add onHighlight callback and markdown component

- Documents onHighlight callback for intercepting/modifying highlights
- Adds full Markdown component section with Core/React/Solid examples
- Includes renderNode custom rendering and streaming mode docs

* docs(skill): add markdown to decision tree and product index

Updates the display content decision tree and component categories
to include the markdown component.

* docs(layout): add axis shorthand spacing examples

Documents paddingX/Y and marginX/Y shorthand props with examples
showing horizontal and vertical spacing patterns.

* docs(containers): add axis shorthand to Box spacing section

Adds paddingX/Y and marginX/Y to the spacing props example to
show the axis shorthand options alongside individual side props.

* docs(gotchas): document expanded signal handling

Lists all signals handled by OpenTUI for automatic cleanup including
SIGPIPE, SIGBUS, SIGFPE, SIGHUP, and SIGBREAK.

* docs: add See Also sections to keyboard, animation, and testing references

These three cross-cutting REFERENCE.md files were navigation dead-ends
with no outbound links to related content. Adds cross-references so
agents can discover related APIs, components, and patterns.

* docs(skill): add keyboard and animation to Reading Order section

These two reference areas were only discoverable via the decision trees
further down. Adding them to the Reading Order ensures agents following
the prescribed path don't miss them.
2026-02-15 19:20:08 +00:00
2026-01-29 09:37:59 +00:00
2026-01-19 21:54:55 +00:00
2026-01-19 21:54:55 +00:00
2026-01-29 09:55:09 +00:00

OpenTUI Skill

OpenTUI platform reference docs. Covers the Core imperative API, React reconciler, Solid reconciler, layout system, components, keyboard handling, animations, and testing.

Install

AI Coding Assistants

Add the skill to your AI coding assistant for richer context:

npx skills add msmps/opentui-skill

This works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode, and Windsurf.

OpenCode (inc /command)

Local installation (current project only):

curl -fsSL https://raw.githubusercontent.com/msmps/opentui-skill/main/install.sh | bash

Global installation (available in all projects):

curl -fsSL https://raw.githubusercontent.com/msmps/opentui-skill/main/install.sh | bash -s -- --global

Usage

Once installed, the skill appears in OpenCode's <available_skills> list. The agent loads it automatically when working on OpenTUI tasks.

Use the /opentui command to load the skill and get contextual guidance:

/opentui create a React TUI with keyboard navigation

Updating

To update to the latest version:

/opentui --update-skill

Structure

The installer adds both a skill and a command:

# Skill (reference docs)
skill/opentui/
├── SKILL.md              # Main manifest + decision trees
└── references/           # Framework and concept subdirectories
    ├── core/             # Imperative API (5-file pattern)
    ├── react/            # React reconciler (5-file pattern)
    ├── solid/            # Solid reconciler (5-file pattern)
    ├── components/       # Component categories
    ├── layout/           # Yoga/Flexbox layout
    ├── keyboard/         # Input handling
    ├── animation/        # Timeline animations
    └── testing/          # Test renderer + snapshots

# Command (slash command)
command/opentui.md        # /opentui entrypoint

Decision Trees

The main SKILL.md contains decision trees for:

  • Choosing a framework (Core, React, Solid)
  • Displaying content (text, containers, code, diffs)
  • Handling user input (inputs, keyboard, focus)
  • Layout and positioning (flexbox, absolute, responsive)
  • Animations (timeline, easing, transitions)
  • Testing (snapshots, interaction, debugging)
  • Troubleshooting (gotchas, common issues)

Topics Covered

Frameworks: Core (imperative), React (declarative), Solid (fine-grained reactivity)

Components: text, box, scrollbox, input, textarea, select, tab-select, ascii-font, code, line-number, diff

Cross-cutting: Layout (Yoga/Flexbox), Keyboard handling, Animations, Testing

Credits & Inspiration

This skill's structure and patterns are heavily inspired by:

License

MIT - see LICENSE

S
Description
No description provided
Readme MIT
232 KiB
Languages
Shell 100%