agentleFS
TermherdTermherd/termherd/.claude/skills/drive-termherd/SKILL.md

drive-termherd

Skill2 starsChanged 6 days agoMITView on GitHub

Drive or diagnose a running termherd through its MCP tools (mcp__termherd__*) — type into a session, wait for it, read its screen, press termherd's own keys, click a cell, check what reached the PTY or the clipboard. Use when reproducing a keyboard, mouse, clipboard or status bug in the live app, or when composing the act-wait-observe loop.

The file

Files
SKILL.md

Drive termherd over MCP

The server's instructions and each tool's description carry the calling rules; docs/agents/mcp.md holds the design and the open defects. The loop:

  1. Find the target. list_sessions, then address it by handle, never by the Claude resume_id.
  2. Act. run_in_session (a raw write, not a bracketed paste) returns at once. For a prompt to Claude, prefer prompt_in_session, which waits for the prompt to start before waiting for it to finish.
  3. Wait. wait_for_status for busy first, then for idle: just after typing, the status is still the one from before. Never poll snapshot.
  4. Observe. read_terminal for text; screenshot only for render, colour or glyph questions — it weighs hundreds of times a snapshot.

Diagnosing a live defect:

  • press_keys tests a binding through the live keymap, run_action the behaviour by action name. An open prompt eats both; escape leaves any prompt. Read each press's outcome (ran, inert + reason, overlay, typed, unbound).
  • PTY bytes are the ground truth: in a fresh shell run stty raw -echo; for i in {1..N}; do dd bs=64 count=1 | xxd -p; done, then press.
  • Clipboard: printf marker | pbcopy (outside the sandbox), act, pbpaste.
  • mouse_in_session answering forwarded for a move proves the child asked for DECSET 1003.
  • A synthesised key has key == text: Option-composed characters, and keys press_keys cannot name, need the user's hands.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.