haunt-test

haunt-test is a command for Claude Code from Chocolatine75/haunt. It costs 0 tokens per session (2,550 once invoked), scanned A, original, MIT.

A command that tests a running web application with simulated users, including a confused beginner, a malicious user, or a screen-reader user.

In plain words
What is it for?
Use /haunt-test with a local URL to run headless or visible browser sessions, choose personas, limit steps, test login, and print detailed observations.
Why use it?
It reveals navigation, authentication, and usability problems that ordinary checks may miss by following the site as different kinds of users.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the haunt plugin — 1 command shipped together

Good fit Use /haunt-test with a local URL to run headless or visible browser sessions, choose personas, limit steps, test login, and print detailed observations.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/chocolatine75/haunt/haunt-test
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.

Clone the repo
git clone --depth 1 https://github.com/Chocolatine75/haunt

Made for: Claude Code.

Or install haunt, the plugin that ships this one along with the rest of its 1 command.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/chocolatine75/haunt/haunt-test.svg)](https://agentmods.dev/commands/chocolatine75/haunt/haunt-test)
Your own site
<a href="https://agentmods.dev/commands/chocolatine75/haunt/haunt-test"><img src="https://agentmods.dev/badge/commands/chocolatine75/haunt/haunt-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,550 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.
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.00000 $0.02550
Opus 5 $0.00000 $0.01275
Sonnet 5 $0.00000 $0.00510
Haiku 4.5 $0.00000 $0.00255

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

Security

Grade A, and why

haunt-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 8d 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.

commands/haunt-test.md · 247 lines

How it starts

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

/haunt-test

Run a phantom user test session against a running web application.

Usage

/haunt-test [--personas ] [--headed] [--steps N] [--verbose]

Arguments

  • url — Target URL (required). Must be a running server, e.g. http://localhost:3000
  • --personas — Comma-separated persona names (default: confused-beginner) Available: confused-beginner, malicious-user, screen-reader-user
  • --headed — Show the browser window in real time (default: headless)
  • --steps — Max navigation steps per area (default: 3)
  • --email — Email to log in with before testing
  • --password — Password to log in with (use with --email)
  • --debug-auth — Print each auth step verbosely (use when auth fails silently)
  • --yes — Skip the cost estimate confirmation prompt (for scripted use)
  • --verbose — Print intermediate reasoning and observations between tool calls (default: silent)

First run

If haunt_spawn is not available as a tool, print:

haunt is installing Chromium (first run, ~2 min).
Come back once done and run again.

Then stop. Do NOT debug.

Behavior

Phase 0 — Header

Print exactly:

haunt v0.1.0  —  phantom user testing

Phase 0.5 — Auth (only if --email and --password are provided)

If credentials are present:

Print: logging in as <email>...

  • If --debug-auth: print · auth flow started
  1. haunt_spawn at target_url with timeout: 5
    • If --debug-auth: print · browser opened
  2. haunt_capture_state (include_dom: true) — look for a login form or link
    • If --debug-auth: print · page loaded
  3. If not already on a login page, haunt_navigate to find and go to the login page (look for a "Login", "Sign in", or "Se connecter" link in the accessibility tree or DOM)
    • If --debug-auth: print · login form found at <url>
  4. haunt_navigate — fill <email> in the email field
    • If --debug-auth: print · email filled
  5. haunt_navigate — fill <password> in the password field
    • If --debug-auth: print · password filled
  6. haunt_navigate — click the submit/login button
    • If --debug-auth: print · submit clicked
  7. haunt_capture_state — verify auth succeeded: URL is no longer the login page, or a logged-in element (avatar, dashboard, username) is visible
    • If --debug-auth: print · checking session...
  8. haunt_get_cookies — extract the session cookies
    • If --debug-auth: print · cookies captured (<N>)
  9. haunt_end_session

Read the full file on GitHub · 247 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. 8d ago First seen · 247 lines · 0 tokens per session scan A 9f5f5ed9b57d

Subscribe to this mod's changes

haunt-test is a command published in the GitHub repository Chocolatine75/haunt (12 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,550 tokens. 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.