tui-testing-with-herdr
БесплатноБез исполняемых скриптовНе проверенDebug or e2e-test a TUI app using Herdr: launch it in an isolated tui-test workspace, drive it with keystrokes, read its rendered frames, and assert against…
от elentok★ 25 звёзд на GitHubОб этом скилле
TUI Testing with Herdr
This skill layers TUI-specific technique on top of the herdr skill. Invoke herdr first for CLI
mechanics (IDs, JSON responses, workspace/tab/pane primitives) — this document does not restate
them.
Setup: isolated tui-test workspace
Every run gets a fresh, isolated workspace so runs never interfere with each other or the user's layout:
herdr workspace create --label tui-test --cwd "$PWD" --no-focus
Read .result.workspace.workspace_id and .result.root_pane.pane_id from the response, then launch
the app under test in the root pane:
herdr pane run <root_pane_id> "<launch command>"
Wait for its first frame before interacting:
herdr pane wait-output <root_pane_id> --match "<text expected once it's up>" --timeout 15000
Reading rendered output
Default to --source visible:
herdr pane read <root_pane_id> --source visible --lines 60
TUI apps repaint the full screen instead of scrolling like a log, almost always on the terminal's
alternate screen. recent/recent-unwrapped only capture host scrollback, so once the app is on
the alternate screen those sources can't see it — visible is the one source that reflects what the
app is actually showing right now. Reach for recent-unwrapped only after confirming the specific
app doesn't use the alternate screen.
Sending input
Two primitives, pick per keystroke:
herdr pane send-text <pane_id> "<literal characters>"— typing into a text field or search box.herdr pane send-keys <pane_id> <key> [key...]— navigation and control:Enter,Tab,ArrowDown,ctrl+c,esc, etc.
Do not use herdr agent * commands against this pane — the process under test is an ordinary TUI,
not a Herdr-recognized coding agent, and agent commands won't resolve it.
Waiting for a frame to settle
Redraws are asynchronous after any input. Wait for the expected result instead of guessing at a delay:
herdr pane wait-output <pane_id> --match "<expected text>" --timeout 10000
# or
herdr pane wait-output <pane_id> --regex "<pattern>" --timeout 10000
When the expected text isn't known in advance (waiting out a spinner or animation), poll instead:
read --source visible twice a beat apart and compare, proceeding once two consecutive reads are
identical.
Debugging workflow
- Setup: launch the app in a fresh tui-test workspace.
- Reproduce: send the keystrokes that trigger the reported problem, using the wait-then-read loop between each step.
- Inspect:
pane read --source visiblefor the broken frame;pane process-infoif the process may have exited or hung. - Diagnose against the source, not guesses — the workspace stays alive for as many rounds of poke-and-read as needed.
- Teardown:
herdr workspace close <workspace_id>.
E2E testing workflow
- Setup: launch the app in a fresh tui-test workspace.
- Drive the scenario: alternate
send-text/send-keyswith the settle strategy above. - Assert: each
pane wait-output --match/--regexfor an expected transition IS the assertion — a timeout means the assertion failed. - All assertions passed: teardown —
herdr workspace close <workspace_id>. - An assertion failed or the app crashed: skip teardown, report the workspace/tab/pane IDs plus the
last
pane read --source visibleoutput, so the failure can be inspected live instead of guessed at from a log.
Установить tui-testing-with-herdr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tui-testing-with-herdr?
Debug or e2e-test a TUI app using Herdr: launch it in an isolated tui-test workspace, drive it with keystrokes, read its rendered frames, and assert against expected output. Use only when the user explicitly asks to debug or test a TUI app with/via Herdr. Requires HERDR_ENV=1.
Как установить скилл tui-testing-with-herdr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tui-testing-with-herdr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic