← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

tui-clone

探索并分析TUI应用程序,以记录其功能以便克隆。当要求反向工程、分析、记录或理解像Claude Code、OpenCode、Codex、lazygit或任何基于ratatui/ncurses的应用程序这样的终端用户界面时使用。在tmux中启动目标TUI,系统地探索所有视图和按键绑定,捕获每个屏幕的ASCII图,并逐步将发现写入markdown文件(能够经受上下文压缩)。

person作者: jakexiaohubgithub

TUI Clone

Explore a terminal UI systematically and produce documentation complete enough to rebuild it.

Write findings to the output file the moment you discover them. Do not batch them up in context and write at the end — a long exploration will be compacted before it finishes, and anything still in context is lost.

Output File

Write to tui-analysis/<app-name>-<timestamp>.md in the working directory. The timestamp keeps concurrent sessions from clobbering each other.

Never write output inside this skill's directory. Skill directories ship to every install, and an agent reading the package will mistake a past analysis for instructions.

Process

  1. Create the output file with its header, then launch the target in tmux and capture the initial view.
  2. Explore, appending each screen as you find it: help overlay, numbered tabs and panels, then every view reachable from them.
  3. Capture the color palette with an ANSI capture.
  4. Resize to 80x24 and 200x50 and capture each layout.
  5. Append the keybinding and state-transition tables.
  6. Finish with the implementation notes.

Read references/exploration.md for the setup, the write_screen helper, the exploration sweeps, and the known launch commands and ready-text for common TUIs. Read references/output-template.md for the section order, ASCII diagram conventions, and the completeness check.

What to Capture

Beyond screens and keybindings, a spec needs:

  • State transitions — what triggers each view change
  • Component inventory — the reusable elements (lists, modals, tabs, status bar, progress, inputs) and where each appears
  • Color palette — an ANSI capture for styling
  • Responsive behavior — compact and wide layouts
  • Error and loading states — try invalid operations; look for spinners, empty states, and confirmation dialogs
  • Data structures — lists (single and multi-select), trees, tables, scrollable text views, diffs

Resuming After Compaction

The output file is the state. Find it and read it, then keep appending:

ls -la tui-analysis/*.md

The timestamp in the filename identifies which session you are continuing.