Skip to content

Refactor playwright-scenario-test into a lightweight evidence skill + optional advanced toolkit #17

@takemi-ohama

Description

@takemi-ohama

Background

The current plugins/ndf/skills/playwright-scenario-test skill has evolved into a very comprehensive E2E testing framework.

It includes:

  • pytest-playwright framework integration
  • HTSM / ISTQB / FEW HICCUPPS methodology
  • accessibility checks
  • Core Web Vitals collection
  • HAR collection
  • Google Drive upload/share
  • fixture orchestration
  • evidence generation
  • video conversion
  • scenario management

While powerful, this makes the skill heavy for the most common use case:

"Run Playwright E2E tests with video / trace / screenshot evidence enabled by default"


Proposal

Split responsibilities into multiple layers.

1. Create a lightweight skill

Suggested name:

  • playwright-evidence

Purpose:

  • minimal operational skill
  • standardize evidence collection
  • standardize execution commands
  • avoid overloading agent context

Example responsibilities:

  • ensure video, trace, screenshot are configured
  • prefer npm run e2e:evidence
  • summarize artifact paths after execution

Minimal policy:

use: {
  video: 'retain-on-failure',
  trace: 'retain-on-failure',
  screenshot: 'only-on-failure',
}

2. Move advanced features into a toolkit/plugin layer

Suggested names:

  • playwright-pytest-kit
  • playwright-advanced-testing

Advanced features:

  • HTSM / ISTQB / FEW HICCUPPS
  • accessibility automation
  • Core Web Vitals
  • HAR analysis
  • Drive upload/share
  • fixture orchestration
  • role-based scenario validation

These are valuable, but should be optional.


Why this matters

Better agent ergonomics

Large Skill descriptions increase:

  • token usage
  • accidental invocation
  • context pollution
  • maintenance complexity

Smaller focused skills work better with:

  • Claude Code
  • Codex CLI
  • Gemini CLI
  • MCP-based agents

Suggested skill description

Current description is likely too broad.

Proposed lightweight version:

name: playwright-evidence

description: |
  Lightweight Playwright E2E evidence collection skill.
  Ensures video, trace, screenshot, and HTML reports are enabled.

when_to_use: |
  Use when running Playwright E2E tests that require execution evidence.

Additional suggestion

Prefer treating methodology docs separately from operational skills.

Possible structure:

skills/
  playwright-evidence/

plugins/
  playwright-pytest-kit/

docs/
  web-testing-methodology/

This would make onboarding significantly easier while preserving the advanced capabilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions