playwright-test
- Repo stars 34,831
- Author updated Live
- Author repo posthog
- Domain
- AI
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @PostHog · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: playwright-test
description: Write a playwright test, make sure it runs, and is not flaky. Read @playwright/README.md for bes…
category: ai
runtime: no special runtime
---
# playwright-test output preview
## PART A: Task fit
- Use case: Write a playwright test, make sure it runs, and is not flaky. Read @playwright/README.md for best practices, gotchas, and how to run tests. You are to plan an end to end playwright test for a feature. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Rules / Instructions / Step 1: Plan the test(s) to be done.” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Write a playwright test, make sure it runs, and is not flaky. Read @playwright/README.md for best practices, gotchas, and how to run tests. You are to plan an end to end playwright test for a feature. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “Rules / Instructions / Step 1: Plan the test(s) to be done.” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands.
Start with a small task and check whether the result follows “Rules / Instructions / Step 1: Plan the test(s) to be done.”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: playwright-test
description: Write a playwright test, make sure it runs, and is not flaky. Read @playwright/README.md for bes…
category: ai
source: PostHog/posthog
---
# playwright-test
## When to use
- Write a playwright test, make sure it runs, and is not flaky. Read @playwright/README.md for best practices, gotchas…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Rules / Instructions / Step 1: Plan the test(s) to be done.” and keep inference separate from source facts.
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "playwright-test" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Rules / Instructions / Step 1: Plan the test(s) to be done.
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, run shell commands | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Read @playwright/README.md for best practices, gotchas, and how to run tests.
Rules
- Follow the best practices in the README strictly
- After UI interactions, always assert on UI changes, do not assert on network requests resolving
- Keep looping until all tests pass. Do not give up or ask the user for help. You must resolve every failure yourself.
Instructions
You are to plan an end to end playwright test for a feature.
Step 1: Plan the test(s) to be done.
Use the Playwright MCP tools (e.g., mcp__playwright__browser_navigate, mcp__playwright__browser_click, mcp__playwright__browser_screenshot) to interact with the browser and plan your tests.
After your exploration, present the plan to me for confirmation or any changes.
Step 2: Implement the test plan
- Write the tests, making sure to use common patterns used in neighbouring files.
- Run the tests with
BASE_URL='http://localhost:8010' pnpm --filter=@posthog/playwright exec playwright test <file name> --retries 0 --workers 3 - Debug any failures. Look at screen shots, if needed launch the playwright mcp skills to interact with the browser. Go back to step 1 after attempting a fix.
Step 3: Ensure no flaky tests
After all tests pass in the file, run with --repeat-each 10 added to the command. This will surface any flaky tests.
If any test fails across the 10 runs, treat it as a real failure: go back to Step 2, debug, fix, and re-run Step 3. Do not proceed to Step 4 until every run of every test passes.
Step 4: Report
Once all tests pass, output a single line: Testing Complete
Decide Fit First
Design Intent
How To Use It
Boundaries And Review