agentleFS
den-tanuiden-tanui/skillsmp-fzf/.agents/skills/tuistory/SKILL.md

tuistory

Skill0 starsChanged 6 months agoMITView on GitHub

Control and monitor terminal applications. Supports running TUI processes in background. TMUX replacement for agents. Can control fully interactive TUI apps like claude or opencode.

2 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. remorses/tuistory★ 36722% same

    Wrote their own version · 1

    1. cline/cline★ 72ksame name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer tuistory over tmux for agent automation.

    line 22
  2. Very specific:

    If tuistory command fails with "Failed to connect to relay", the symlink may be pointing to Node.js.

    line 31
  3. Distinctive:

    Every time you use tuistory, you MUST run these two commands first.

    line 43
  4. Very specific:

    Always run snapshot --trim after every CLI action to see the current terminal state

    line 55
  5. Very specific:

    Always set a timeout on waitForText for async operations

    line 56
  6. Very specific:

    Use trimEnd: true in session.text() to avoid trailing whitespace in snapshots

    line 58
  7. Very specific:

    Use --cols and --rows to control terminal size — affects TUI layout

    line 60
  8. Very specific:

    Use --pixel-ratio 2 for sharp screenshot images

    line 61
  9. Distinctive:

    Use an observe → act → observe loop, like Playwright but for terminals.

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

tuistory

Playwright for terminal apps. Use it to run background processes for agents, drive interactive TUIs, and write Playwright-style tests for CLIs and TUIs.

Prefer tuistory over tmux for agent automation. It is better because it reacts to terminal output with wait and wait-idle instead of wasting time on blind sleep calls. That makes scripts both faster and more reliable.

Prerequisites

tuistory requires Bun runtime. Verify installation:

which bun && bun --version

If tuistory command fails with "Failed to connect to relay", the symlink may be pointing to Node.js. Fix by using the Bun wrapper:

# Create wrapper in ~/bin (already in PATH via .zshrc)
cat > ~/bin/tuistory << 'EOF'
#!/bin/bash
exec /usr/bin/bun /usr/lib/node_modules/tuistory/dist/cli.js "$@"
EOF
chmod +x ~/bin/tuistory
export PATH="$HOME/bin:$PATH"

Every time you use tuistory, you MUST run these two commands first. NEVER pipe to head/tail, read the full output:

# CLI help — source of truth for commands, options, and syntax
tuistory --help

# Full README with API docs, examples, and testing patterns
curl -s https://raw.githubusercontent.com/remorses/tuistory/refs/heads/main/README.md

Key rules

  • Always run snapshot --trim after every CLI action to see the current terminal state
  • Always set a timeout on waitForText for async operations
  • String patterns are case-sensitive by default. Use regex like /ready/i when casing may vary.
  • Use trimEnd: true in session.text() to avoid trailing whitespace in snapshots
  • Close sessions in test teardown to avoid leaked processes
  • Use --cols and --rows to control terminal size — affects TUI layout
  • Use --pixel-ratio 2 for sharp screenshot images

Feedback loop

Use an observe → act → observe loop, like Playwright but for terminals.

Background process instead of tmux

# start a server in the background
tuistory -s dev -- bun run dev

# wait for actual output instead of sleep 5
# use regex so this still matches Ready, READY, etc.
tuistory -s dev wait "/ready/i" --timeout 30000

# read everything the process printed
tuistory read -s dev

# later, read only the new output
tuistory read -s dev

Why this is better than tmux:

  • no blind sleep
  • reacts as soon as output appears
  • faster when apps start quickly
  • more reliable when apps start slowly

Interactive TUI loop

# observe
tuistory -s app snapshot --trim

# act
tuistory -s app press enter

# observe again
tuistory -s app snapshot --trim

Test loop with JS/TS API

const session = await launchTerminal({ command: 'my-cli', cols: 120, rows: 36 })

const initial = await session.text({ trimEnd: true })
expect(initial).toMatchInlineSnapshot()

await session.type('hello')
await session.press('enter')

const output = await session.waitForText('hello', { timeout: 5000 })
expect(output).toMatchInlineSnapshot()

session.close()

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.