Agent skill

Debug Tui

by trasta298 in trasta298/keifu

Drive and debug the real keifu TUI autonomously via its remote-control debug server (--debug-listen) — launch headlessly, inject keys/mouse, dump the rendered screen as text, and inspect app state.

MITAuto-check passedDevelopment

Install Debug Tui

skills CLI
$ npx skills add trasta298/keifu --skill debug-tui -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trasta298/keifu debug-tui --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trasta298/keifu.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/debug-tui .claude/skills/debug-tui && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
debug-tui
GitHub stars
811
Token cost
~1.3k tokens
SKILL.md length
600 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Drive and debug the real keifu TUI autonomously via its remote-control debug server (--debug-listen) — launch headlessly, inject keys/mouse, dump the rendered screen as text, and inspect app state.

  • Works in 4 steps: dump and confirm the precondition is on… → keys / mouse to act. → state + dump, then assert: grep the dump… → …
  • Tasks that involve Debugging
  • SKILL.md covers Launch, Protocol, Gotchas that will waste your… and Verification loop
  • Calls cargo, git and jq

What it does

Debug Tui is an agent skill from trasta298/keifu. Drive and debug the real keifu TUI autonomously via its remote-control debug server (--debug-listen) — launch headlessly, inject keys/mouse, dump the rendered screen as text, and inspect app state. Use this whenever a change affects TUI behavior, rendering, keybindings, mouse handling, focus, scrolling, or async loading states, when reproducing a user-reported UI bug, or when you need to confirm "does it actually work on screen" — cargo test alone cannot verify what the user sees. Reproduce the issue through this…

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Debugging. It works with Git and Rust. The repository describes itself as: Git genealogy, untangled. A TUI for navigating commit graphs with color and clarity. The licence is MIT.

When your agent uses it

  • Tasks that involve Debugging

Example prompts

  • “does it actually work on screen”
  • “/debug-tui”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. dump and confirm the precondition is on screen (e.g. the row you'll click).
  2. keys / mouse to act.
  3. state + dump, then assert: grep the dump for expected text, compare
  4. Quit, and read /tmp/keifu.log for the tracing trail

What it can do on your machine

Read from SKILL.md and the folder at commit 4d9f033. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo
    • git
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Debug Tui loads about 1.3k tokens when it runs. Until then it costs about 143 tokens; SKILL.md has 600 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~143
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trasta298/keifu at commit 4d9f033, republished under its MIT licence (© trasta298). 600 words, ~1,312 tokens.

Download SKILL.mdSave it as .claude/skills/debug-tui/SKILL.md (or your agent's skills folder).
name
debug-tui
description
Drive and debug the real keifu TUI autonomously via its remote-control debug server (--debug-listen) — launch headlessly, inject keys/mouse, dump the rendered screen as text, and inspect app state. Use this whenever a change affects TUI behavior, rendering, keybindings, mouse handling, focus, scrolling, or async loading states, when reproducing a user-reported UI bug, or when you need to confirm "does it actually work on screen" — cargo test alone cannot verify what the user sees. Reproduce the issue through this workflow before fixing, and re-verify after.

Debugging the keifu TUI headlessly

keifu has a built-in remote-control server. You can run the real app without a human at the terminal: send key/mouse input through the same code paths as real input, dump the rendered screen as plain text, and read the app state as JSON. The reliable workflow is always: drive → dump → assert, both to reproduce a bug and to prove the fix.

Launch

bash
cargo build
PORT=7167   # pick a fresh port per run to avoid stale instances
timeout 120 script -qec "./target/debug/keifu --debug-listen 127.0.0.1:$PORT --log-file /tmp/keifu.log" /dev/null >/dev/null 2>&1 &
sleep 2
  • script allocates a PTY; keifu cannot enable raw mode without one. The timeout wrapper guarantees stray instances die even if you forget to quit.
  • The script PTY reports size 0x0, so the main loop skips real rendering. Consequence: pane layout for mouse hit-testing is only recorded when a render happens — always send a dump with explicit width/height before any mouse command, and give mouse coordinates in that dump's space.
  • keifu operates on the repository of its working directory. To exercise staging/commit/push, launch it inside a throwaway repo (mktemp -d + git init), never the real working repo.

Protocol

Newline-delimited JSON over TCP; each request line gets one JSON response line.

bash
printf '%s\n' '{"cmd":"state"}' | nc -q1 127.0.0.1 $PORT
RequestEffect
{"cmd":"keys","keys":"j j <enter>"}Inject key input (normal keybinding layer)
{"cmd":"mouse","kind":"click","x":5,"y":3}Click / scroll_up / scroll_down at 0-based cell
{"cmd":"dump","width":110,"height":30}Render current state to plain text at that size
{"cmd":"state"}Mode, focused pane, selection, HEAD, async status

For "feels slow" reports, use the log: ops over 10ms are written live as slow operation, and quitting writes a per-op perf summary (count/avg/max). Reproduce → quit → grep the log file.

Every response is one JSON line. dump returns the screen as an escaped string in the screen field — pipe through jq -r .screen to read it. For single requests prefer nc -q1 (closes after the response); only multi-line batches need plain nc under timeout.

Key token syntax: whitespace-separated; single chars as-is (uppercase implies Shift); special keys <enter> <esc> <tab> <backtab> <space> <up> <down> <left> <right> <home> <end> <pgup> <pgdn> <backspace> <c-x> (Ctrl+x). To type a word in an input dialog, space-separate the letters: c f i x <space> b u g <enter>.

Full protocol details: docs/debugging.md. Implementation: src/debug_server.rs.

Show full SKILL.md (272 more words)Show less

Gotchas that will waste your time

  • Double-click = two clicks on the same cell within 400 ms. Separate nc invocations are too slow — send both clicks (plus the leading dump that records the layout) in ONE connection:

    bash
    printf '%s\n%s\n%s\n%s\n' \
      '{"cmd":"dump","width":110,"height":30}' \
      '{"cmd":"mouse","kind":"click","x":60,"y":24}' \
      '{"cmd":"mouse","kind":"click","x":60,"y":24}' \
      '{"cmd":"state"}' | timeout 4 nc 127.0.0.1 $PORT
  • Commands are processed after the event-poll tick, so responses can lag up to ~200 ms; wrap nc in timeout and don't interpret slowness as a hang.

  • A held-open nc may exit non-zero via timeout even after delivering the response — check the output, not the exit code.

  • Injected input bypasses the terminal's input layer. keys/mouse commands go straight into the app, so they cannot verify anything that depends on terminal modes — e.g. mouse tracking escape sequences (?1000/?1002/?1003) set in src/tui.rs. Changes there need a human in a real terminal.

  • q only quits from the graph pane. If another pane is focused or a popup is open (e.g. after a mouse click), q/<esc> first returns focus/closes the popup and the app keeps running. Send {"cmd":"keys","keys":"q q"} and confirm exit: a follow-up nc connection must be refused. (pgrep -af keifu matches your own shell's command line — don't trust it.)

Verification loop

  1. dump and confirm the precondition is on screen (e.g. the row you'll click).
  2. keys / mouse to act.
  3. state + dump, then assert: grep the dump for expected text, compare selected_index / mode / focused_pane in the state JSON.
  4. Quit, and read /tmp/keifu.log for the tracing trail (KEIFU_LOG=trace for more detail; useful for async diff-load issues).

A fix is not verified until step 3 shows the corrected behavior on a dump that previously showed the bug.

© trasta298, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/debug-tui of trasta298/keifu.

Open the folder on GitHubat commit 4d9f033

Compare with similar skills

Debug Tui next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Debug Tui compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Debug Tui this skilltrasta298/keifu811—~1.3kAutomated safety check: PassMIT
Stax Devcesarferreira/stax128—~987Automated safety check: PassMIT
Debuggnomeria/usbtree688—~715Automated safety check: PassMIT
OpenLogi macOS Permissions TriageAprilNEA/OpenLogi23k—~2.5kAutomated safety check: NotesApache-2.0
Worktrunk Tend CI Guidancemax-sixty/worktrunk8.9k—~6.4kAutomated safety check: PassCustom licence
Debugging and Error Recoveryaddyosmani/agent-skills102k1 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Stax Dev

    cesarferreira/stax

    Development harness for the stax Rust CLI project. An agent skill from cesarferreira/stax.

    128 GitHub stars~987 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Debug

    gnomeria/usbtree

    Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix.

    688 GitHub stars~715 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes
  • Worktrunk Tend CI Guidance

    max-sixty/worktrunk

    Adds Worktrunk-specific rules to the tend CI workflows: Codecov polling, Rust test commands, labels and review criteria for pull requests handled in CI.

    8.9k GitHub stars~6.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Debugging and Error Recovery

    addyosmani/agent-skills

    Applies a stop-the-line rule and a step-by-step triage when tests fail, builds break or something stops working, aiming at the root cause instead of guesses.

    102k GitHub starsUsed in 1 repo~2.6k tokens
    DevelopmentAuto-check passed
  • Worktrunk Release Workflow

    max-sixty/worktrunk

    Walks a maintainer through cutting a Worktrunk release: sync the release branch, pass two test gates, review the changes, then publish.

    8.9k GitHub stars~6.9k tokensUpdated today
    DevelopmentAuto-check passed

More from trasta298/keifu

  • Release

    trasta298/keifu

    Create a new release with tag, GitHub release, and homebrew-tap update

    811 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Debug Tui

What does Debug Tui do?

Drive and debug the real keifu TUI autonomously via its remote-control debug server (--debug-listen) — launch headlessly, inject keys/mouse, dump the rendered screen as text, and inspect app state. Debug Tui is an agent skill from trasta298/keifu. Drive and debug the real keifu TUI autonomously via its remote-control debug server (--debug-listen) — launch headlessly, inject keys/mouse, dump the rendered screen as text, and inspect app state.

When should I use Debug Tui?

Debug Tui fits situations like: tasks that involve Debugging.

How do I install Debug Tui in Claude Code?

Run `npx skills add trasta298/keifu --skill debug-tui -a claude-code`. Or copy the skill folder (.agents/skills/debug-tui in trasta298/keifu) into .claude/skills/debug-tui in your project. Claude Code loads it when a task matches its description.

How do I install Debug Tui in Codex?

Run `npx skills add trasta298/keifu --skill debug-tui -a codex`. Or copy the skill folder (.agents/skills/debug-tui in trasta298/keifu) into .agents/skills/debug-tui in your project. Codex loads it when a task matches its description.

Can I use Debug Tui in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trasta298/keifu --skill debug-tui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/debug-tui, .gemini/skills/debug-tui, .github/skills/debug-tui and .opencode/skills/debug-tui in your project.

What does Debug Tui need to run?

Going by SKILL.md and its folder, Debug Tui needs the command-line tools its instructions call (cargo, git and jq).

Does Debug Tui access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Debug Tui safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Debug Tui use?

Debug Tui is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Debug Tui use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Debug Tui?

Skills that share tags, products or a category with Debug Tui: Stax Dev (cesarferreira/stax, 128 stars), Debug (gnomeria/usbtree, 688 stars), OpenLogi macOS Permissions Triage (AprilNEA/OpenLogi, 23k stars) and Worktrunk Tend CI Guidance (max-sixty/worktrunk, 8.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Debug Tui?

trasta298 (a GitHub user) maintains it in trasta298/keifu, which has 811 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on July 30, 2026.

Source: trasta298/keifu on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.