strocs/.dotfiles/playwright-cli-hygiene

Claude Code and agent skill by strocs/.dotfiles

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Trigger: playwright-cli, browser instance, close browser, pwcli close, session cleanup. Enforce lifecycle hygiene: close every instance the agent opened; ask before closing pre-existing ones.

Install

npx vskill@latest install strocs/.dotfiles/playwright-cli-hygiene

SKILL.md

The same SKILL.md was published earlier as strocs/.dotfiles/playwright-cli-hygiene.

Skill: playwright-cli-hygiene

Activation Contract

Load whenever work drives a real browser through playwright-cli (or its wrapper) and any lifecycle decision arises: opening, reusing, closing, or managing browser instances and named sessions. Complements the base playwright CLI skill; do not replace it.

Hard Rules

  1. CLOSE WHAT YOU OPENED: every browser instance or named session the agent opened MUST be closed when the work ends (pwcli close or pwcli --session <name> close). No exceptions.
  2. NEVER close an instance or session that pre-existed the agent's work without asking the user first. If the agent only reused it, closing is optional: ask whether it should be closed or kept.
  3. Never touch the default session when the user may be using it. Isolate agent work in a named session: pwcli --session <label> open <url>.
  4. Cleanup applies on failure too: an aborted or failed flow still requires closing agent-opened instances.
  5. Verify closure: after closing, confirm no agent-owned session or instance remains. Never close the same instance twice.
  6. Use --headed only when a visual check genuinely helps; default to headless.
  7. Report final state: what was opened, what was closed, what remains open and why.

Decision Gates

Who owns the instance or session?Action
Agent opened it this workClose it, no question needed
Pre-existing (user or other process)Ask: close or keep? Never close silently
Ownership unknownAsk: close or keep?
User explicitly asked to closeClose it

Execution Steps

  1. Before starting, record which instances and sessions already exist (pwcli --session <name> tab-list or session listing) so ownership is known.
  2. Open agent work in its own named session: pwcli --session <work-label> open <url> (headless unless a visual check is needed).
  3. Work with the base CLI loop: open, snapshot, interact, re-snapshot.
  4. On completion (success or failure): close every session or instance the agent opened and verify closure.
  5. Ask about pre-existing instances only when closure is relevant; never close them silently.
  6. Report the final lifecycle state.

Output Contract

Return: the sessions and instances the agent opened and closed; any pre-existing instance left open and why; any user decision requested and its outcome.

References

  • ../playwright/SKILL.md — base playwright CLI skill (wrapper, workflow, guardrails).
  • ../playwright/references/cli.md — close, --session, and session commands.
  • ../playwright/references/workflows.md — practical flows and troubleshooting.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/strocs/.dotfiles/playwright-cli-hygiene/badge)](https://verified-skill.com/skills/strocs/.dotfiles/playwright-cli-hygiene)

Something wrong with this skill or its page? Tell us.