# Write Tui

Use when writing or modifying the kimi-code terminal UI in apps/kimi-code/src/tui, ...

- Repository: https://github.com/MoonshotAI/kimi-code (8095 stars)
- Category: Design
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add MoonshotAI/kimi-code --skill write-tui -g -a claude-code -y`
Codex: `npx skills add MoonshotAI/kimi-code --skill write-tui -g -a codex -y`
Cursor: `npx skills add MoonshotAI/kimi-code --skill write-tui -g -a cursor -y`
Gemini CLI: `npx skills add MoonshotAI/kimi-code --skill write-tui -g -a gemini-cli -y`

## Description

Use when writing or modifying the kimi-code terminal UI in apps/kimi-code/src/tui, components, dialogs/selectors, slash commands, themes, streaming render, or the KimiTUI controllers. Covers the architecture, where new features go, test placement, the theme system mechanics, and the dialog interaction/visual spec (DESIGN.md).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Write TUI (apps/kimi-code)

The terminal UI lives in `apps/kimi-code/src/tui`. Before writing TUI code, read `apps/kimi-code/AGENTS.md` for the always-on **map, module boundaries, and hard constraints** (printable-key decoding, no chalk named colors, etc.). This skill is the **how-to**: architecture orientation, feature routing, test placement, theme mechanics, and the dialog spec.

For any list dialog, selector, input box, or status/toggle list, the interaction and visual rules are normative, see **[DESIGN.md](./DESIGN.md)** in this folder and follow its self-check list before submitting.

## Architecture

`KimiTUI` is a **coordinator** that wires state, layout, session, and dialogs together and delegates heavy logic to controllers.

The rest: https://github.com/MoonshotAI/kimi-code/blob/HEAD/.agents/skills/write-tui/SKILL.md
