mediar-ai/skillhubz/browser-lock-multi-agent-playwright-concurrency

Claude Code and agent skill by mediar-ai/skillhubz

Trust tier 2
  • community
LLM review pending
Source check pending

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

Install

npx vskill@latest install mediar-ai/skillhubz/browser-lock-multi-agent-playwright-concurrency

SKILL.md

The same SKILL.md was published earlier as mediar-ai/skillhubz/browser-lock-multi-agent-playwright-concurrency.

Browser Lock (Multi-Agent Playwright Concurrency)

Multiple Claude agents share a single browser instance via MCP Playwright. A hook-based locking system prevents conflicts — only one agent can use the browser at a time; others wait their turn.

How It Works

  1. PreToolUse hook (~/.claude/hooks/playwright-lock.sh) runs before any mcp__playwright* tool call:
  • If lock is free or held by the same session: acquire/refresh, allow the call
  • If held by another session: poll every 2s, wait up to 120s
  • If timeout: block the tool call (exit code 2)
  1. PostToolUse hook (~/.claude/hooks/playwright-unlock.sh) runs after each tool call:
  • Refreshes the lock timestamp, keeping the session's hold alive across sequential browser operations
  1. Session exit (~/.claude/hooks/session-end.sh) releases the lock on clean exit

Key Files

FilePurpose
~/.claude/hooks/playwright-lock.shPreToolUse hook — acquires lock or waits
~/.claude/hooks/playwright-unlock.shPostToolUse hook — refreshes lock timestamp
~/.claude/playwright-lock.jsonLock state: { session_id, timestamp }
~/.claude/playwright-mutex.d/Atomic filesystem mutex (transient, should not persist)
~/.claude/playwright-lock.logEvent log (ACQUIRED, BLOCKED, REFRESHED, TIMEOUT, EXPIRED)
~/.claude/settings.jsonHook config under PreToolUse / PostToolUse with matcher mcp__playwright.*

Parameters

ParameterValueDefined in
Lock expiry30s of inactivityplaywright-lock.sh LOCK_EXPIRY
Max wait120splaywright-lock.sh MAX_WAIT
Poll interval2splaywright-lock.sh POLL_INTERVAL
Mutex stale timeout5splaywright-lock.sh MUTEX_EXPIRY
PreToolUse hook timeout130ssettings.json
PostToolUse hook timeout5ssettings.json

Debugging

Check current lock status
bash
cat ~/.claude/playwright-lock.json
Watch lock activity in real time
bash
tail -f ~/.claude/playwright-lock.log
Force-release a stuck lock
bash
rm -f ~/.claude/playwright-lock.json ~/.claude/playwright-mutex.d
View recent contention events
bash
grep "BLOCKED\|ACQUIRED after\|TIMEOUT\|EXPIRED" ~/.claude/playwright-lock.log | tail -20

Important Notes

  • New/restarted sessions pick up hooks automatically
  • Running sessions must be restarted to activate locking (hooks are loaded at session startup from settings.json)
  • Session identity comes from the hook input JSON (session_id), with terminal-based fallback
  • The lock auto-expires after 30s of no Playwright calls from the holding session, so an agent that moves on to non-browser work releases the browser naturally

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

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

Source

Popularity

Repository stars
7
Repository forks
4
7-day trend score
15

Stars and forks are for the whole GitHub repository, not this skill alone. 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/mediar-ai/skillhubz/browser-lock-multi-agent-playwright-concurrency/badge)](https://verified-skill.com/skills/mediar-ai/skillhubz/browser-lock-multi-agent-playwright-concurrency)

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