happy: Skill for Claude Code

.agents/skills/terminal-emulator/SKILL.md

terminal-emulator is a skill for Claude Code from slopus/happy. It costs 77 tokens per session (602 once invoked), scanned A, original, MIT.

A testing tool for command-line programs and text-based interfaces that run in a real terminal. It can send keys such as arrows, Enter, Tab, Ctrl+C, and Escape, then check what appears.

In plain words
What is it for?
Use it to test CLI and TUI applications, simulate user input, and compare terminal output with saved snapshots.
Why use it?
It tests interactive terminal behavior that ordinary automated tests may miss, including prompts, keyboard navigation, and terminal display.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is slopus/happy's own configuration. It tells Claude Code how to work on happy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything happy configures →

About the project

Happy is a mobile, web, and desktop client that lets people use Claude Code and Codex remotely from their computers and mobile devices. It is for developers who want encrypted access to coding-agent sessions, including notifications and switching between devices. The catalogue add-ons extend the workflows available in this client.

slopus/happy · 23,673 stars · on GitHub · happy.engineering

Reuse

Borrowing it

Nothing to install: this file belongs to slopus/happy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/slopus/happy/main/.agents/skills/terminal-emulator/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/slopus/happy

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 terminal-emulator

README.md
[![agentmods](https://agentmods.dev/badge/skills/slopus/happy/terminal-emulator.svg)](https://agentmods.dev/skills/slopus/happy/terminal-emulator)
Your own site
<a href="https://agentmods.dev/skills/slopus/happy/terminal-emulator"><img src="https://agentmods.dev/badge/skills/slopus/happy/terminal-emulator.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
How audits are shown
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.00077 $0.00602
Opus 5 $0.00039 $0.00301
Sonnet 5 $0.00015 $0.00120
Haiku 4.5 $0.00008 $0.00060

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

Security

Grade A, and why

terminal-emulator 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 7d 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.

.agents/skills/terminal-emulator/SKILL.md · 78 lines

What it actually says

Testing Interactive CLI / TUI with @microsoft/tui-test

Playwright-like API for terminals. Real PTY per test. Made by Microsoft.

Install

yarn add -D @microsoft/tui-test

Usage

import { test, expect } from '@microsoft/tui-test';

test.use({ program: { file: 'node', args: ['./my-cli.js'] } });

test('selects option and proceeds', async ({ terminal }) => {
    await expect(terminal.getByText('Select an option')).toBeVisible();
    await terminal.write('\x1B[B');  // Arrow Down
    await terminal.submit();          // Enter
    await expect(terminal.getByText('Option 2 selected')).toBeVisible();
});

test('matches snapshot', async ({ terminal }) => {
    await expect(terminal).toMatchSnapshot();
});

API

// Navigation
await terminal.write('\x1B[A');    // Arrow Up
await terminal.write('\x1B[B');    // Arrow Down
await terminal.write('\x1B[C');    // Arrow Right
await terminal.write('\x1B[D');    // Arrow Left
await terminal.submit();           // Enter
await terminal.write('\t');        // Tab
await terminal.write('\x03');      // Ctrl+C
await terminal.write('\x1B');      // Escape
await terminal.write('\x7F');      // Backspace
await terminal.write('hello');     // Type text

// Assertions
await expect(terminal.getByText('pattern')).toBeVisible();
await expect(terminal.getByText('pattern', { full: true })).toBeVisible();
await expect(terminal).toMatchSnapshot();

// Reading
const content = terminal.content;  // Full terminal content as string

Running

npx tui-test                       # Run all tests
npx tui-test --update-snapshots    # Update snapshots
npx tui-test my-test.ts            # Run specific test

Reference

  • Used by VS Code terminal team
  • Real PTY isolation per test (no mocking)
  • Auto-waits for terminal renders
  • Cross-platform (macOS, Linux, Windows)
  • Snapshot testing built-in
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. 7d ago First seen · 78 lines · 77 tokens per session scan A c44b1d0093bb

Subscribe to this mod's changes

terminal-emulator is a skill published in the GitHub repository slopus/happy (23,673 stars, last pushed today), licensed MIT. It adds 77 tokens to every session and 602 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

implement-universal

Harness-agnostic version of /implement. Drives a single workshop ticket through the SWE→Tester loop in ONE conversation, with the role prompts bundled as agents/software-engineer.md and agents/tester.md instead of being launched as subagents. Resolves the ticket from implementyourself/tasks/, creates an…

Arindam200/awesome-ai-apps · 204 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens

verification-loop

This skill should be used when the user asks to "verify code", "run verification", "check quality", "validate changes", or before creating a PR. Provides comprehensive verification including build, type check, lint, tests, security scan, and diff review.

Galaxy-Dawn/claude-scholar · 55 tokens

explore-ui

Standalone Phase 2 of SAP UI testing. Opens the target transaction in a real browser (SAP WebGUI) and explores it live to produce tests/ /test-cases/screens.md — the authoritative map of every on-screen control, its accessible name/label as Playwright will see it, and its initial state. This is about how the UI…

marcellourbani/vscode_abap_remote_fs · 112 tokens

run-scripts

Standalone Phase 7 of SAP UI testing. Rediscovers the configured test folder, program/specs, test cases, prepared data, and target system from disk; then runs Playwright via SAP Testing tools, generates .docx evidence, and diagnoses test script failures. Use when the user asks to execute tests, run TC-XXX, generate…

marcellourbani/vscode_abap_remote_fs · 81 tokens

sap-testing

Entry point for the SAP UI test-automation environment. Explains project layout, the configured test folder, available tools, phase workflows, and bounded agent delegation. Use when the user asks about SAP UI testing, Playwright for SAP, writing tests for any ABAP report/transaction/process, generating test evidence…

marcellourbani/vscode_abap_remote_fs · 73 tokens