toh-test

toh-test is a command for coding agents from wasintoh/toh-framework. It costs 11 tokens per session (1,819 once invoked), scanned A, original, MIT.

A command that uses Playwright, a browser-testing tool, to test a web application and fix detected problems before testing again.

In plain words
What is it for?
Use it to test concrete browser flows such as a login page and automatically re-test after fixes.
Why use it?
It reduces the manual work of finding browser failures, applying fixes, and repeating tests until they pass.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/wasintoh/toh-framework/toh-test
Clone the repo
git clone --depth 1 https://github.com/wasintoh/toh-framework

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 toh-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/wasintoh/toh-framework/toh-test.svg)](https://agentmods.dev/commands/wasintoh/toh-framework/toh-test)
Your own site
<a href="https://agentmods.dev/commands/wasintoh/toh-framework/toh-test"><img src="https://agentmods.dev/badge/commands/wasintoh/toh-framework/toh-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,819 The whole file, excluding the scripts and references it only reads on demand.
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 $0.00011 $0.01819
Opus 5 $0.00005 $0.00910
Sonnet 5 $0.00002 $0.00364
Haiku 4.5 $0.00001 $0.00182

Measured 4d ago against content hash f79d8a269f64, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

toh-test 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 4d 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.

src/commands/toh-test.md · 234 lines

How it starts

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

/toh-test - Auto Test & Fix

Purpose

Automated system testing, and if errors are found, will call /toh-fix to fix and re-test until passing.

Workflow

User: /toh-test test login page

┌─────────────────────────────────────────────────────┐
│  🧪 Test Runner                                     │
├─────────────────────────────────────────────────────┤
│  0. 🚨 READ MEMORY (Tiered - not all 7)             │
│  Tier 1 - read ALWAYS (~800 tokens):                │
│     ├── .toh/memory/active.md      (current task)   │
│     └── .toh/memory/summary.md     (project)        │
│  Tier 2 - read per task type:                       │
│     ├── .toh/memory/changelog.md   (changes)        │
│     ├── .toh/memory/components.md  (components)     │
│     └── .toh/memory/architecture.md (structure)     │
│  Tier 3 - only when referenced:                     │
│     ├── .toh/memory/decisions.md   (decisions)      │
│     └── .toh/memory/agents-log.md  (agents)         │
│                                                     │
│  1. 🔐 QUICK SECURITY CHECK                         │
│     ├── Scan for hardcoded secrets                  │
│     ├── Check dangerous patterns                    │
│     └── If CRITICAL → BLOCK testing                 │
│                                                     │
│  2. Setup Playwright (if not exists)                │
│  3. Generate test cases from existing UI            │
│  4. Run tests                                       │
│  5. If PASS → Report results ✅                     │
│  6. If FAIL → Analyze error                         │
│     └── Call /toh-fix to fix                        │
│     └── Run tests again                             │
│     └── Loop until passing (max 3 rounds)           │
│                                                     │
│  7. 🚨 SAVE MEMORY                                  │
│     ├── Update active.md (ALWAYS)                   │
│     ├── Update summary.md (if shape changed)        │
│     ├── Update changelog.md (test session)          │
│     ├── Update components.md (if new)               │
│     ├── Update architecture.md (if changed)         │
│     ├── Update decisions.md (if fixes made)         │
│     └── Update agents-log.md (if delegated)         │
│                                                     │
│  8. Summary of test results                         │
└─────────────────────────────────────────────────────┘

Read the full file on GitHub · 234 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. 4d ago First seen · 234 lines · 11 tokens per session scan A f79d8a269f64

Subscribe to this mod's changes

toh-test is a command published in the GitHub repository wasintoh/toh-framework (95 stars, last pushed 8d ago), licensed MIT. It adds 11 tokens to every session and 1,819 once invoked, about $0.0001 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.