# 06-ink-react-terminal-ui

06-ink-react-terminal-ui — a Claude prompt that follows the React + Ink render path in the claude-code repo, checks the components and theme, and ends with a working terminal render test.

- prompt · `type=prompt` · Claude Code, ChatGPT · ★ 3444 repo stars
- Author: codeaashu
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codeaashu/claude-code/tree/HEAD/prompts/06-ink-react-terminal-ui.md
- Updated: 2026-10-14
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/prompts/06-ink-react-terminal-ui

## What it does

The prompt walks the agent through the Ink fork that lives in `src/ink/` of the `claude-code` repo. It reads the chain in order: `src/ink.ts`, `root.ts`, `reconciler.ts`, `renderer.ts`, `dom.ts`, then writes down how the virtual DOM turns into terminal strings. The write-up lands as a short architecture note.

Then come the checks. Every component under `src/ink/components/` is scanned for missing imports, `ThemeProvider` is inspected for outside dependencies, and 3-5 components in `src/components/` get their imports traced. After that the agent writes `scripts/test-ink.tsx`, which mounts a tiny component and unmounts it after 500 ms.

Failures usually come from the same few spots, and the prompt names them: a missing `yoga-wasm-web` or `yoga-layout` (Ink uses Yoga for flexbox layout), a reconciler that does not fit React 19, stdout without a TTY, no `chalk` for colors. Paths like `/workspaces/claude-code` and the file names come from one specific repo, so check them against your own tree before running the command.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/06-ink-react-terminal-ui.md`

### ChatGPT

**How to use**
- Paste the text at the start of a chat or into project instructions

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/codeaashu/claude-code/tree/HEAD/prompts/06-ink-react-terminal-ui.md

## When to use it
- trace how React components reach the terminal output
- spot an Ink component with a broken import
- confirm the theme layer pulls no outside resources
- build a minimal render test for the terminal
- diagnose an Ink crash caused by a missing TTY or Yoga

## Example prompts
- Run `/06-ink-react-terminal-ui` and find out why the Ink components never print to the terminal.
- Use `/06-ink-react-terminal-ui` to check imports in `src/ink/components/` and in the main components under `src/components/`.
- Run `/06-ink-react-terminal-ui`, write `scripts/test-ink.tsx` and prove the render works.

## Similar
- [ink](https://affpapa.org/en/nevibecode/skills/assistant-ui-ink.md) — skill · 1200 installs
- [terminal-ui](https://affpapa.org/en/nevibecode/skills/terminal-ui.md) — skill · 866 installs
- [opentui](https://affpapa.org/en/nevibecode/skills/opentui.md) — skill · 64600 installs
- [tui-designer](https://affpapa.org/en/nevibecode/skills/tui-designer.md) — skill · 6 installs
- [wterm-web-terminal](https://affpapa.org/en/nevibecode/skills/wterm-web-terminal.md) — skill · 442 installs
- [vercel-react-view-transitions](https://affpapa.org/en/nevibecode/skills/vercel-react-view-transitions.md) — skill · 197400 installs

From the same set: [codeaashu/claude-code](https://affpapa.org/en/nevibecode/by/codeaashu/claude-code.md) — 17 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
