diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-22 14:23:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-22 14:23:34 -0500 |
| commit | 2e9d5b0acb5e6fd13020519e1807d804d5ab8a80 (patch) | |
| tree | b6648f3d8c912ea9b1b1c7911fb4d7bac9a6c0f7 /playwright-js | |
| parent | 6d08ddfed52428b7ccffc78dc45e36009bdeb841 (diff) | |
| download | rulesets-2e9d5b0acb5e6fd13020519e1807d804d5ab8a80.tar.gz rulesets-2e9d5b0acb5e6fd13020519e1807d804d5ab8a80.zip | |
docs(skills): document headed vs headless choice in playwright skills
playwright-js defaulted headed, playwright-py headless, with no explanation, so an agent could flip modes by habit. I added a matching purpose-based decision table to each (headed for interactive debugging, headless for CI/pytest), and made each skill name its own default and point at the other. I also softened the absolutist "always headless" comment in the py example.
Diffstat (limited to 'playwright-js')
| -rw-r--r-- | playwright-js/SKILL.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/playwright-js/SKILL.md b/playwright-js/SKILL.md index 7c5f10c..b4b037b 100644 --- a/playwright-js/SKILL.md +++ b/playwright-js/SKILL.md @@ -30,7 +30,12 @@ General-purpose browser automation skill. I'll write custom Playwright code for 2. **Write scripts to /tmp** - NEVER write test files to skill directory; always use `/tmp/playwright-test-*.js` -3. **Use visible browser by default** - Always use `headless: false` unless user specifically requests headless mode +3. **Choose headed vs headless by purpose, not habit.** This skill defaults to *headed* (`headless: false`) because its job is interactive visual debugging. The companion `/playwright-py` defaults to *headless* because it targets CI and pytest. The two differ on purpose — pick by what you're doing, and only override when the purpose flips: + + | Purpose | Mode | + |---|---| + | Interactive debugging, watching a flow, demos | headed (`headless: false`) | + | CI, pytest, smoke tests, unattended runs | headless (`headless: true`) | 4. **Parameterize URLs** - Always make URLs configurable via environment variable or constant at top of script |
