OpenELIS-Global-2: Command for Claude Code

.ai/skills/playwright/commands/audit-playwright.md

audit-playwright is a command for Claude Code from DIGI-UW/OpenELIS-Global-2. It costs 0 tokens per session (445 once invoked), scanned A, original, MPL-2.0.

A command for reviewing Playwright tests, which automate checks in a web browser, and their helper files. It examines their reliability, readability, project integration, and compliance with OpenELIS testing practices.

In plain words
What is it for?
Auditing changed or selected Playwright files, checking test discovery, reviewing demo-test setup, improving diagnostics, and verifying deterministic helpers.
Why use it?
It catches fragile selectors, incorrect assertions, unreliable waiting, missing test configuration, and poor failure information before they make tests hard to trust.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is DIGI-UW/OpenELIS-Global-2's own configuration. It tells Claude Code how to work on OpenELIS-Global-2 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything OpenELIS-Global-2 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DIGI-UW/OpenELIS-Global-2. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DIGI-UW/OpenELIS-Global-2/develop/.ai/skills/playwright/commands/audit-playwright.md
Clone the repo
git clone --depth 1 https://github.com/DIGI-UW/OpenELIS-Global-2

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 audit-playwright

README.md
[![agentmods](https://agentmods.dev/badge/commands/digi-uw/openelis-global-2/audit-playwright.svg)](https://agentmods.dev/commands/digi-uw/openelis-global-2/audit-playwright)
Your own site
<a href="https://agentmods.dev/commands/digi-uw/openelis-global-2/audit-playwright"><img src="https://agentmods.dev/badge/commands/digi-uw/openelis-global-2/audit-playwright.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 445 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.00445
Opus 5 $0.00000 $0.00222
Sonnet 5 $0.00000 $0.00089
Haiku 4.5 $0.00000 $0.00044

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

Security

Grade A, and why

audit-playwright 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.

.ai/skills/playwright/commands/audit-playwright.md · 60 lines

What it actually says

Audit Playwright

Use this command to audit Playwright tests and helpers for stability, maintainability, and adherence to OpenELIS best practices.

User Input

$ARGUMENTS

Interpret input best-effort:

  • /audit-playwright - audit changed Playwright files
  • /audit-playwright <spec-or-helper> - audit specific file(s)

Audit Checklist

  1. Selector quality

    • Prefer data-testid / semantic locators over fragile CSS selectors.
    • Flag broad fallback selector chains and unnecessary .first() usage.
  2. Runtime correctness

    • Ensure assertions align with actual DOM behavior (e.g., input value vs text).
    • Ensure waits rely on Playwright assertions/events, not fixed sleeps.
  3. Project integration

    • Verify new specs are included in playwright.config.ts testMatch.
    • For demo tests, verify they are included in CORE_DEMO_TESTS or HARNESS_DEMO_TESTS.
  4. Debuggability

    • Ensure tests emit enough context on failure (URL, key state/logs).
    • Confirm helpers keep deterministic behavior.
  5. Repo policy alignment

    • Use videoPause() for demo pacing, not waitForTimeout().
    • Keep tests focused and avoid multi-concern mega-tests when possible.
  6. Anti-pattern detection

    • Flag response.ok() or response.status() used as pass/fail signal
    • Flag { force: true } without a justifying comment about Carbon
    • Flag .catch(() => false) on isVisible() calls (dead code)
    • Flag isVisible({ timeout: N }) — timeout param is deprecated
    • Flag tests with no expect() calls
    • Flag page.getByLabel("text").check() on Carbon inputs (targets hidden element)

Required References

  • .ai/skills/playwright/reference/selector-policy.md
  • .ai/skills/playwright/reference/debug-workflow.md
  • .specify/guides/playwright-best-practices.md
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 · 60 lines · 0 tokens per session scan A 48b0e12c0bd8

Subscribe to this mod's changes

audit-playwright is a command published in the GitHub repository DIGI-UW/OpenELIS-Global-2 (251 stars, last pushed today), licensed MPL-2.0. It costs nothing until one of its globs matches a file; then it loads 445 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.