Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计提醒

tui-validate验证

Agent Skill

tui-validate 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,088

周安装

44

GitHub Stars

2,798

下载量

341
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tui-validate(验证)
来源仓库:https://github.com/mikeyobrien/ralph-orchestrator
仓库路径:skills/tui-validate
安装命令:
npx skills add https://github.com/mikeyobrien/ralph-orchestrator --skill tui-validate
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/mikeyobrien/ralph-orchestrator --skill tui-validate

简介

tui-validate 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 安装前建议确认权限范围和维护状态,注意是否触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

TUI Validate

Overview

This skill validates Terminal User Interface (TUI) applications by capturing their output and using LLM-as-judge for semantic validation. It leverages freeze from Charmbracelet for high-fidelity terminal screenshots and provides structured validation criteria.

Philosophy: Rather than brittle string matching, this skill uses semantic understanding to validate that TUI output "looks right" - checking layout, content presence, and visual hierarchy without breaking on minor formatting changes.

When to Use

  • Validating TUI rendering after changes
  • Checking that UI components display correctly
  • Visual regression testing for terminal applications
  • Verifying TUI state after specific interactions
  • Creating documentation screenshots with validation

Prerequisites

Required:

  • freeze CLI tool installed (brew install charmbracelet/tap/freeze)
  • tmux for interactive TUI capture (optional, for live applications)

Verification:

# Check freeze is installed
freeze --version

# Check tmux is installed (for interactive capture)
tmux -V

Parameters

  • target (required): What to validate. One of:

- file:<path> - ANSI output file to validate - command:<cmd> - Command to execute and capture - tmux:<session> - Live tmux session to capture - buffer:<text> - Raw text/ANSI to validate

  • criteria (required): Validation criteria. Can be:

- A predefined criteria name (see Built-in Criteria) - A custom criteria string describing what to check

  • output_format (optional, default: "svg"): Screenshot format

- svg - Vector format, best for documentation - png - Raster format, best for visual diff - text - Text-only extraction, fastest

  • save_screenshot (optional, default: false): Whether to save the screenshot

- If true, saves to {target_name}.{format} in current directory

  • judge_mode (optional, default: "semantic"): Validation approach

- semantic - LLM judges based on meaning and layout - strict - Also checks exact content presence - visual - Requires PNG, checks visual appearance

Built-in Criteria

ralph-header

Validates Ralph TUI header component:

  • Iteration counter in [iter N] or [iter N/M] format
  • Elapsed time in MM:SS format
  • Hat indicator with emoji and name
  • Mode indicator (▶ auto or ⏸ paused)
  • Optional scroll mode indicator [SCROLL]
  • Optional idle countdown idle: Ns

ralph-footer

Validates Ralph TUI footer component:

  • Activity indicator (◉ active, ◯ idle, or ■ done)
  • Last event topic display
  • Search mode display when active

ralph-full

Validates complete Ralph TUI layout:

  • Header section at top (3 lines)
  • Terminal content area (variable height)
  • Footer section at bottom (3 lines)
  • Proper visual hierarchy and borders

tui-basic

Generic TUI validation:

  • Has visible content (not blank)
  • No rendering artifacts or broken characters
  • Proper terminal dimensions

Execution Flow

1. Capture Phase

Capture TUI output based on target type:

For file targets:

freeze {file_path} -o /tmp/tui-capture.{format}

For command targets:

freeze --execute "{command}" -o /tmp/tui-capture.{format}

For tmux targets:

tmux capture-pane -pet {session} | freeze -o /tmp/tui-capture.{format}

For buffer targets:

echo "{buffer}" | freeze -o /tmp/tui-capture.{format}

Constraints:

  • You MUST verify freeze is installed before attempting capture
  • You MUST handle capture failures gracefully and report the error
  • You MUST use appropriate freeze flags for the output format
  • You SHOULD use --theme base16 for consistent rendering
  • You SHOULD set reasonable dimensions with --width and --height

2. Extraction Phase

Extract content for LLM analysis:

For text/semantic validation:

  • If format is text, use the captured text directly
  • If format is svg or png, also capture text version for content analysis

For visual validation:

  • Requires PNG format
  • Will analyze the image directly using vision capabilities

Constraints:

  • You MUST extract both visual and text representations when judge_mode is visual
  • You MUST preserve ANSI escape sequences for color validation when relevant

3. Validation Phase

Apply LLM-as-judge with the appropriate criteria:

Semantic Validation Prompt Template:

Analyze this terminal UI output and determine if it meets the following criteria:

CRITERIA:
{criteria_description}

TERMINAL OUTPUT:
{captured_text}

Evaluate each criterion and provide:
1. PASS or FAIL for each requirement
2. Brief explanation for any failures
3. Overall verdict: PASS or FAIL

Be lenient on exact formatting but strict on:
- Required content presence
- Logical layout and hierarchy
- No rendering errors or artifacts

Visual Validation Prompt Template (with image):

Examine this terminal screenshot and validate:

CRITERIA:
{criteria_description}

Check for:
1. Visual hierarchy and layout
2. Color coding correctness
3. No rendering artifacts or broken characters
4. Proper alignment and spacing

Verdict: PASS or FAIL with explanation

Constraints:

  • You MUST return a clear PASS or FAIL verdict
  • You MUST provide specific feedback on failures
  • You MUST be lenient on whitespace/formatting differences
  • You MUST be strict on content presence and semantic correctness
  • You SHOULD note any warnings even on PASS results

4. Reporting Phase

Report validation results:

On PASS:

✅ TUI Validation PASSED

Criteria: {criteria_name}
Target: {target}
Mode: {judge_mode}

All requirements satisfied.
{optional_notes}

On FAIL:

❌ TUI Validation FAILED

Criteria: {criteria_name}
Target: {target}
Mode: {judge_mode}

Issues found:
- {issue_1}
- {issue_2}

Screenshot saved: {path_if_saved}

Constraints:

  • You MUST always provide a clear verdict
  • You MUST list specific issues on failure
  • You MUST offer the screenshot path if saved
  • You SHOULD suggest fixes for common issues

Examples

Example 1: Validate Ralph Header from File

Input:

/tui-validate file:test_output.txt criteria:ralph-header

Process:

  1. Read test_output.txt containing ANSI output
  2. Capture with freeze: freeze test_output.txt -o /tmp/capture.svg
  3. Extract text content
  4. Apply ralph-header criteria via LLM judge
  5. Report PASS/FAIL with details

Example 2: Validate Live TUI in tmux

Input:

/tui-validate tmux:ralph-session criteria:ralph-full save_screenshot:true

Process:

  1. Capture tmux pane: tmux capture-pane -pet ralph-session | freeze -o ralph-session.svg
  2. Also capture text: tmux capture-pane -pet ralph-session > /tmp/text.txt
  3. Apply ralph-full criteria checking header, content, and footer
  4. Save screenshot to ralph-session.svg
  5. Report validation result

Example 3: Custom Criteria Validation

Input:

/tui-validate command:"cargo run --example tui_demo" criteria:"Shows a bordered box with 'Hello World' text centered inside" output_format:png judge_mode:visual

Process:

  1. Execute command and capture: freeze --execute "cargo run --example tui_demo" -o /tmp/capture.png
  2. Use vision model to analyze PNG
  3. Check for bordered box and centered text
  4. Report visual validation result

Example 4: Quick Text Validation

Input:

/tui-validate buffer:"[iter 3/10] 04:32 | 🔨 Builder | ▶ auto" criteria:ralph-header output_format:text

Process:

  1. Analyze text directly (no freeze needed for text mode with buffer)
  2. Check for iteration format, elapsed time, hat, and mode indicator
  3. Report validation result

Criteria Definitions

ralph-header (Full Definition)

name: ralph-header
description: Ralph TUI header component validation
requirements:
  - name: iteration_counter
    description: Shows iteration in [iter N] or [iter N/M] format
    required: true
    pattern: '\[iter \d+(/\d+)?\]'

  - name: elapsed_time
    description: Shows elapsed time in MM:SS format
    required: true
    pattern: '\d{2}:\d{2}'

  - name: hat_indicator
    description: Shows current hat with emoji prefix
    required: true
    examples: ["🔨 Builder", "📋 Planner", "🎯 Executor"]

  - name: mode_indicator
    description: Shows loop mode status
    required: true
    values: ["▶ auto", "⏸ paused"]

  - name: scroll_indicator
    description: Shows [SCROLL] when in scroll mode
    required: false
    pattern: '\[SCROLL\]'

  - name: idle_countdown
    description: Shows idle timeout when present
    required: false
    pattern: 'idle: \d+s'

ralph-footer (Full Definition)

name: ralph-footer
description: Ralph TUI footer component validation
requirements:
  - name: activity_indicator
    description: Shows current activity state
    required: true
    values: ["◉ active", "◯ idle", "■ done"]

  - name: event_topic
    description: Shows last event topic
    required: false
    examples: ["task.start", "build.done", "loop.terminate"]

  - name: search_display
    description: Shows search query and match count when searching
    required: false
    pattern: 'Search: .+ \d+/\d+'

ralph-full (Full Definition)

name: ralph-full
description: Complete Ralph TUI layout validation
requirements:
  - name: header_section
    description: Header at top with iteration, time, hat, and mode
    required: true
    references: ralph-header

  - name: content_section
    description: Main terminal content area
    required: true
    checks:
      - Has visible content or is ready for content
      - Properly bounded between header and footer

  - name: footer_section
    description: Footer at bottom with activity status
    required: true
    references: ralph-footer

  - name: visual_hierarchy
    description: Clear visual separation between sections
    required: true
    checks:
      - Borders or spacing between sections
      - Consistent width across sections

Troubleshooting

freeze not found

# macOS
brew install charmbracelet/tap/freeze

# Linux (via Go)
go install github.com/charmbracelet/freeze@latest

# Verify installation
freeze --version

tmux capture fails

  • Ensure the tmux session exists: tmux list-sessions
  • Verify pane number: tmux list-panes -t {session}
  • Try capturing specific pane: tmux capture-pane -pet {session}:{pane}

Rendering artifacts in capture

  • Try different terminal emulator settings in freeze
  • Use --theme flag for consistent colors
  • Ensure terminal dimensions match TUI expectations

LLM judge too strict/lenient

  • Adjust criteria to be more specific
  • Use strict mode for exact matching requirements
  • Use semantic mode for layout/presence checking

Integration with Tests

This skill can be integrated into test suites:

// In tests/tui_validation.rs
#[test]
#[ignore] // Run with: cargo test -- --ignored
fn validate_header_rendering() {
    // 1. Render header to buffer
    let output = render_header_to_string(&test_state);

    // 2. Save to temp file
    std::fs::write("/tmp/header_test.txt", &output).unwrap();

    // 3. Run tui-validate skill (via CLI or programmatic)
    // /tui-validate file:/tmp/header_test.txt criteria:ralph-header

    // 4. Assert validation passed
}

Best Practices

  1. Use semantic validation for layout checks - Don't break on minor formatting
  2. Use strict validation for content requirements - Ensure critical info is present
  3. Save screenshots on failure - Aids debugging
  4. Test with various terminal sizes - TUIs should be responsive
  5. Combine with unit tests - Use this for integration/visual validation, unit tests for logic

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.91%
按下载量换算99

Gemini CLI

24.21%
按下载量换算83

Antigravity

17.32%
按下载量换算59

windsurf

13.26%
按下载量换算45

trae

7.31%
按下载量换算25

Codex

3.6%
按下载量换算12

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/mikeyobrien/ralph-orchestrator --skill tui-validate;npx skills add mikeyobrien/ralph-orchestrator --skill "tui-validate" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills