ui-test

ui-test is a command for Claude Code from MDGrey33/claude_mind. It costs 14 tokens per session (877 once invoked), scanned A, original, MIT.

A command for planning and running tests of an application's user interface, such as its pages, buttons, and forms. It can use Playwright, a browser-testing tool, when you approve execution.

In plain words
What is it for?
Use it to document UI test cases, check frontend and backend services, run approved browser tests, and report failures or other results.
Why use it?
It organizes the test target, checks that the application is available, and records what was tested before reporting results.

Command for Claude Code

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/mdgrey33/claude_mind/ui-test
Clone the repo
git clone --depth 1 https://github.com/MDGrey33/claude_mind

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/mdgrey33/claude_mind/ui-test.svg)](https://agentmods.dev/commands/mdgrey33/claude_mind/ui-test)
Your own site
<a href="https://agentmods.dev/commands/mdgrey33/claude_mind/ui-test"><img src="https://agentmods.dev/badge/commands/mdgrey33/claude_mind/ui-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 877 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00014 $0.00877
Opus 5 $0.00007 $0.00439
Sonnet 5 $0.00003 $0.00175
Haiku 4.5 $0.00001 $0.00088

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

Security

Grade A, and why

ui-test scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

if ! curl -s "http://localhost:$BACKEND_PORT/health" > /dev/null 2>&1; then
.claude/commands/ui-test.md · 127 lines

How it starts

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

UI Test Command

Run UI testing: $ARGUMENTS

Process

  1. Identify Target - Parse what to test
  2. Locate Application - URL or local path
  3. Check Services - Verify backend/frontend are running
  4. Check Existing Tests - Review documentation
  5. Create/Update Docs - Document test cases
  6. Ask User - Execute tests?
  7. Run Tests - If confirmed, use Playwright
  8. Report - Present results
  9. Cleanup - Stop any auto-started services

Service Health Check (Step 3)

Before running UI tests, verify required services are running. Auto-start if needed.

Check and Start Services

# Check if backend is running (default port 3000)
BACKEND_PORT=${BACKEND_PORT:-3000}
if ! curl -s "http://localhost:$BACKEND_PORT/health" > /dev/null 2>&1; then
  echo "Backend not running. Starting..."
  # Try common start commands
  if [ -f "package.json" ]; then
    npm run dev &
    BACKEND_PID=$!
    echo "Started backend (PID: $BACKEND_PID)"
  fi
  # Wait for startup
  sleep 5
fi

# Check if frontend is running (default port 5173 for Vite, 3001 for CRA)
FRONTEND_PORT=${FRONTEND_PORT:-5173}
if ! curl -s "http://localhost:$FRONTEND_PORT" > /dev/null 2>&1; then
  echo "Frontend not running. Starting..."
  if [ -d "frontend" ] && [ -f "frontend/package.json" ]; then
    cd frontend && npm run dev &
    FRONTEND_PID=$!
    echo "Started frontend (PID: $FRONTEND_PID)"
    cd ..
  fi
  sleep 5
fi

Health Check Requirements

Before proceeding with tests:

  1. Check if http://localhost:3000/health (or configured backend URL) responds
  2. Check if frontend dev server is accessible
  3. If services are down, attempt auto-start using project's package.json scripts
  4. Wait up to 30 seconds for services to become healthy
  5. Log clearly: "Starting backend server on port 3000..."
  6. Track PIDs of auto-started services for cleanup

Cleanup on Exit

After tests complete (success or failure):

# Kill any services we started
if [ -n "$BACKEND_PID" ]; then
  kill $BACKEND_PID 2>/dev/null
  echo "Stopped backend (PID: $BACKEND_PID)"
fi
if [ -n "$FRONTEND_PID" ]; then
  kill $FRONTEND_PID 2>/dev/null
  echo "Stopped frontend (PID: $FRONTEND_PID)"
fi

Read the full file on GitHub · 127 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. 3d ago First seen · 127 lines · 14 tokens per session scan A ca7cc454832d

Subscribe to this mod's changes

ui-test is a command published in the GitHub repository MDGrey33/claude_mind (2 stars, last pushed 8mo ago), licensed MIT. It adds 14 tokens to every session and 877 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.