Uses shellwright tools to launch, monitor, and test terminal-based programs in a PTY environment.
Install
mkdir -p .claude/skills/shellwright-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17922" && unzip -o skill.zip -d .claude/skills/shellwright-testing && rm skill.zipInstalls to .claude/skills/shellwright-testing
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Guide for using shellwright MCP tools to launch, interact with, and test LlamaOfFate programs in a PTY session. Use this when asked to run examples, test the CLI, or do interactive testing via shellwright.Key capabilities
- →Launch LlamaOfFate programs in a PTY session
- →Send commands and text to the terminal
- →Read the current terminal buffer
- →Detect when the app is ready for the next command
How it works
The skill uses shellwright MCP tools to launch and interact with terminal-based applications, sending input and reading output from a PTY session.
Inputs & outputs
When to use shellwright-testing
- →Run LlamaOfFate program examples
- →Test CLI command output
- →Automate interactive terminal sessions
- →Capture terminal screenshots for debugging
About this skill
Shellwright Testing
This skill covers using the shellwright MCP tools (shell_start, shell_send, shell_read, shell_stop, shell_screenshot) to launch and test LlamaOfFate programs interactively.
Tool Behavior
read vs send
shell_readreturns the current terminal buffer instantly. Use it to poll for output. No delay needed.shell_sendsends input and returnsbufferBefore/bufferAfter. Use it only when sending actual input (commands, text). Do NOT send empty strings to poll — usereadinstead.- The
delay_msonsendcontrols how long to wait after sending before capturingbufferAfter. IfbufferAfterdoesn't show the expected output, the app may still be processing — follow up withread.
Delay Guidelines for send
| Operation | delay_ms |
|---|---|
Built-in commands (help, scene, character, aspects, status) | 200 |
App startup (first read after shell_start) | 500 |
| LLM-powered actions (natural language input) | 200, then poll with read |
For LLM calls, send with a short delay (200ms) then poll with read until the input prompt reappears. Do not use large delays on send — the tool does not return early.
Completion Detection
Check for the app's input prompt at the end of the read buffer to know when the app is ready for the next command:
| Program | Ready prompt |
|---|---|
llamaoffate | \n> |
llm-scene-loop | \n> |
scenario-walkthrough | \n> |
| Batch programs | Process exits; buffer contains full output |
Terminal Sizing
Use cols: 120, rows: 50 to minimize scrolling artifacts in the buffer.
Launching Programs
Launch directly via shell_start with the binary as command and flags as args — no bash wrapper needed. This keeps the buffer clean (no shell prompt noise).
shell_start(command="./bin/llamaoffate", args=[], cols=120, rows=50)
shell_start(command="./bin/llm-scene-loop", args=["-scene", "saloon", "-log", ""], cols=120, rows=50)
shell_start(command="./bin/scenario-generator", args=["-name", "Test", "-concept", "Warrior"], cols=120, rows=50)
CWD defaults to the workspace root, so relative paths to ./bin/ and configs/ work.
Use -log "" on programs that support it to disable session log file creation during testing.
Building
No justfile targets exist for examples. Build manually:
go build -o ./bin/llamaoffate ./cmd/cli
go build -o ./bin/llm-scene-loop ./examples/llm-scene-loop
go build -o ./bin/scenario-generator ./examples/scenario-generator
go build -o ./bin/scenario-walkthrough ./examples/scenario-walkthrough
go build -o ./bin/scene-generator ./examples/scene-generator
All programs require an LLM config file (e.g., configs/azure-llm.yaml or configs/ollama-llm.yaml) for LLM access.
Program Inventory
| Program | Source | Mode | Input | Exit |
|---|---|---|---|---|
| llamaoffate | cmd/cli | Interactive | Free-text at > | exit, quit, end, leave, resolve |
| llm-scene-loop | examples/llm-scene-loop | Interactive | Free-text at > | exit, quit |
| scenario-generator | examples/scenario-generator | Batch | None | Process exits |
| scenario-walkthrough | examples/scenario-walkthrough | Interactive | Line input at > | quit, q, or max-scenes reached |
| scene-generator | examples/scene-generator | Batch | None | Process exits |
Testing Patterns
Batch Programs (scenario-generator, scene-generator)
1. shell_start(command="./bin/scenario-generator", args=["-name", "Test", "-concept", "Warrior", "-log", ""])
2. read — output is already in the buffer (LLM call may take time; poll with read until complete)
3. Verify expected content in output
4. shell_stop
Interactive Programs (llamaoffate, llm-scene-loop, scenario-walkthrough)
1. shell_start(command="./bin/llm-scene-loop", args=["-scene", "saloon", "-log", ""])
2. read — confirm startup, look for > prompt
3. send("help\r", delay_ms=200) — test built-in commands, check bufferAfter
4. send("I look around\r", delay_ms=200) — for LLM input, then poll with read until > reappears
5. send("exit\r", delay_ms=200) — end the session
6. shell_stop
Screenshots
Use shell_screenshot to capture terminal state as PNG when visual verification is needed. Primarily useful for debugging buffer issues or documenting behavior.
When not to use it
- →When sending empty strings to poll for output
- →When using large delays on `send` for LLM calls
- →When expecting `shell_send` to return early
Limitations
- →`shell_send` returns `bufferBefore`/`bufferAfter` only when sending actual input
- →The `delay_ms` on `send` controls how long to wait after sending before capturing `bufferAfter`
- →The tool does not return early for large delays on `send`
How it compares
This skill provides a programmatic way to interact with terminal applications, allowing for automated testing and interaction, unlike manual terminal usage.
Compared to similar skills
shellwright-testing side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| shellwright-testing (this skill) | 0 | 4mo | Review | Intermediate |
| webapp-testing | 353 | 3mo | Review | Intermediate |
| dev-browser | 53 | 4mo | Review | Intermediate |
| playwright-browser-automation | 29 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
webapp-testing
anthropics
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
dev-browser
SawyerHood
Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.
playwright-browser-automation
lackeyjb
Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.
windows-ui-automation
martinholovsky
Expert in Windows UI Automation (UIA) and Win32 APIs for desktop automation. Specializes in accessible, secure automation of Windows applications including element discovery, input simulation, and process interaction. HIGH-RISK skill requiring strict security controls for system access.
unity-mcp-orchestrator
CoplayDev
Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for effective Unity-MCP integration.
agent-browser
vercel-labs
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.