AgentSkillsCN

playwright

基于Playwright CLI的浏览器流程验证工作流程。当测试或证据产物作为验证的主要输出时使用;切勿用于产品需求的优先级排序或架构拓扑的选择。

SKILL.md
--- frontmatter
name: playwright
description: "Browser flow verification workflow using Playwright CLI. Use when test or evidence artifacts are the primary output for verification; do not use for product requirement prioritization or architecture topology selection."

Playwright

Trigger Boundary

  • Use when real browser interaction is required to validate behavior.
  • Do not use for unit or API-only verification scopes.
  • Do not use for desktop app capture where no browser is involved.

Goal

Produce deterministic browser-run evidence for functional and UI flow validation.

Inputs

  • Target URLs and critical user journey definition
  • Test credentials or fixtures (provided via environment variables or secret store)
  • Required artifacts (snapshot, screenshot, trace)

Outputs

  • Reproducible command sequence for target flow
  • Artifact bundle for key checkpoints and failures
  • Findings list with exact reproduction references

Workflow

  1. Confirm Playwright CLI runtime availability and browser readiness.
  2. Prepare test credentials from environment variables; avoid inline plaintext secrets.
  3. Open target page and snapshot before interacting.
  4. Execute flow step-by-step; refresh references after DOM-changing actions.
  5. Capture artifacts at decision points and failure boundaries.
  6. Report observed behavior with command-level traceability.

Quality Gates

  • Every action maps to a fresh, valid UI reference.
  • Flow can be replayed from the documented command sequence.
  • Artifacts cover both success path and failing branch when present.
  • Conclusions are based on observed runs, not inferred behavior.
  • Credentials are never hardcoded in commands, scripts, logs, or screenshots.

Failure Handling

  • Stop when automation prerequisites (runtime, auth, env) are unmet.
  • Escalate when deterministic replay is impossible due to external instability.
  • Stop when only plaintext credentials are available and secure injection is not possible.