generate-e2e-test-plan

Generate E2E test plan for Playwright MCP from spec implementation.

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/jnarowski/agentcmd/generate-e2e-test-plan
Clone the repo
git clone --depth 1 https://github.com/jnarowski/agentcmd

Made for: Claude Code.

Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00013 $0.03718
Opus 5 $0.00006 $0.01859
Sonnet 5 $0.00003 $0.00744
Haiku 4.5 $0.00001 $0.00372

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

Security

Grade A, and why

generate-e2e-test-plan 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 today.

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.

.claude/commands/generate-e2e-test-plan.md · 473 lines

How it starts

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

Generate E2E Test Plan

Analyze completed spec implementation and generate comprehensive end-to-end test plan document with user stories and step-by-step browser automation directions for Playwright MCP.

When to use: After implementing a frontend feature with user-facing UI, when you need structured test scenarios for browser automation testing.

Variables

  • $specIdOrNameOrPath: $1 (required) - Either a timestamp ID (e.g., 2511191130), feature name (e.g., webhook-frontend), or full path to spec file

Instructions

Critical Rules:

  • Generate test plan as USER STORIES with conversational directions, not code
  • Focus on browser interactions: click, type, navigate, verify
  • Map test scenarios to spec's acceptance criteria (primary) or phases (fallback)
  • Detect feature type: full test plan for frontend, smoke test for backend
  • Always include all template sections (strict structure for consistency)
  • Use aggressive fallbacks for missing spec sections - always generate something
  • Output test plan as e2e-test-plan.md in spec folder root (overwrite if exists)
  • Output ONLY raw JSON at the end (no markdown fences, no text)

Test Plan Requirements:

  • 3-7 user stories covering critical paths (frontend) or 2-3 smoke tests (backend)
  • Each story has: pre-conditions, step-by-step actions, expected outcomes
  • Include all 8 template sections: Prerequisites, Scenarios, Verification, Success Criteria, Troubleshooting, Seed Script, MCP Notes
  • Database seeding: always include section with template/examples (not working code)
  • No spec status validation - works for any status (draft, in-progress, review, completed)

Spec File Resolution

Parse and resolve $specIdOrNameOrPath:

  1. If it's a full path (contains /): use as-is
  2. Otherwise, look up in .agent/specs/index.json:
    • For timestamp ID: Match by id field (object key)
    • For feature name: Fuzzy match path (e.g., webhook-frontend matches todo/2511191130-webhook-frontend/spec.md)
    • Use path from index: .agent/specs/{path}
  3. If not found in index.json, fallback to directory search:
    • Search in order: todo/, backlog/, done/
    • For ID: Pattern {id}-*/spec.md
    • For feature name: Pattern *{feature-name}*/spec.md (fuzzy match)
  4. If still not found: Report error and exit

Read the full file on GitHub · 473 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. today First seen · 473 lines · 13 tokens per session scan A f8fad050ff78

Subscribe to this mod's changes

generate-e2e-test-plan is a command published in the GitHub repository jnarowski/agentcmd (18 stars, last pushed 8mo ago), licensed MIT. It adds 13 tokens to every session and 3,718 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-09-01.