tui-test-ghost CLAUDE.md

tui-test-ghost CLAUDE.md is an instructions file for Claude Code from hegner123/tui-test-ghost. It costs 1,425 tokens per session, scanned A, original, MIT.

Repository instructions for tui-test-ghost, a Zig toolkit for testing text-based terminal applications. It runs an application in a pseudo-terminal and checks the screen through a terminal emulator.

In plain words
What is it for?
Use them when building, testing, formatting, or changing the toolkit, its MCP server, command-line interface, or terminal-screen checks.
Why use it?
They describe how the toolkit works and set coding rules such as assertions, bounded loops, no recursion, and fixed memory allocation.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/home/Documents/Code/ghostty/.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tui-test-ghost CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hegner123/tui-test-ghost/claude-md.svg)](https://agentmods.dev/instructions/hegner123/tui-test-ghost/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/hegner123/tui-test-ghost/claude-md"><img src="https://agentmods.dev/badge/instructions/hegner123/tui-test-ghost/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,425 This file is loaded in full into every session.
When invoked 1,425 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01425 $0.01425
Opus 5 $0.00713 $0.00713
Sonnet 5 $0.00285 $0.00285
Haiku 4.5 $0.00143 $0.00143

Measured 5d ago against content hash f0675810013c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tui-test-ghost CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

tui-test-ghost — TUI Testing Toolkit

What This Is

A Zig-native TUI testing toolkit built on Ghostty's ghostty-vt terminal emulation core. Tests TUI applications by spawning them in a PTY, feeding output through a real terminal emulator, and exposing structured screen state for programmatic assertion.

Build Commands

zig build          # Build library + executable
zig build test     # Run all tests
zig build run      # Run MCP server / CLI
just build         # Same via justfile
just test          # Same via justfile
just fmt           # Run zig fmt

Architecture

See PLAN.md for full architecture, milestones, and step definitions.

Data flow: TUI Process → PTY → ReadonlyStream → ghostty-vt Terminal → Screen Query API → MCP/CLI

Threading: Single-threaded with explicit drain. No background threads.

TigerStyle (Mandatory)

Every function in this codebase MUST follow TigerStyle:

  1. >=2 assertions per function — pre/postconditions, paired at call+definition sites
  2. 70-line function limit — extract helpers, push ifs up and fors down
  3. No recursion — all iteration via bounded loops
  4. Static allocation — all memory allocated at init, no dynamic allocation after startup
  5. Explicitly-sized typesu16, u32, u64, not usize (except where Zig stdlib demands it)
  6. Named arguments via options struct when parameters could be confused
  7. No hidden control flow — no async callbacks, no background goroutines
  8. All errors handled — no _ for errors, wrap with context
  9. Compile-time assertions for constant relationships
  10. defer for postconditions where applicable

Reference: https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TIGER_STYLE.md

Key Dependencies

Dependency Location What It Provides
ghostty-vt /Users/home/Documents/Code/ghostty/ Terminal emulation core
Zig 0.15.2 /Users/home/Documents/Code/Zig/0.15.2/ Compiler + stdlib

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 119 lines · 1,425 tokens per session scan A f0675810013c

Subscribe to this mod's changes

tui-test-ghost CLAUDE.md is an instructions file published in the GitHub repository hegner123/tui-test-ghost (2 stars, last pushed 3mo ago), licensed MIT. It adds 1,425 tokens to every session, about $0.0071 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.