mediar-ai/skillhubz/browser-lock-multi-agent-playwright-concurrency
Claude Code and agent skill by mediar-ai/skillhubz
Trust tier 2
- community
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-concurrencySKILL.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
- PreToolUse hook (
~/.claude/hooks/playwright-lock.sh) runs before anymcp__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)
- 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
- Session exit (
~/.claude/hooks/session-end.sh) releases the lock on clean exit
Key Files
| File | Purpose | |
|---|---|---|
~/.claude/hooks/playwright-lock.sh | PreToolUse hook — acquires lock or waits | |
~/.claude/hooks/playwright-unlock.sh | PostToolUse hook — refreshes lock timestamp | |
~/.claude/playwright-lock.json | Lock state: { session_id, timestamp } | |
~/.claude/playwright-mutex.d/ | Atomic filesystem mutex (transient, should not persist) | |
~/.claude/playwright-lock.log | Event log (ACQUIRED, BLOCKED, REFRESHED, TIMEOUT, EXPIRED) | |
~/.claude/settings.json | Hook config under PreToolUse / PostToolUse with matcher mcp__playwright.* |
Parameters
| Parameter | Value | Defined in | |
|---|---|---|---|
| Lock expiry | 30s of inactivity | playwright-lock.sh LOCK_EXPIRY | |
| Max wait | 120s | playwright-lock.sh MAX_WAIT | |
| Poll interval | 2s | playwright-lock.sh POLL_INTERVAL | |
| Mutex stale timeout | 5s | playwright-lock.sh MUTEX_EXPIRY | |
| PreToolUse hook timeout | 130s | settings.json | |
| PostToolUse hook timeout | 5s | settings.json |
Debugging
Check current lock status
Watch lock activity in real time
Force-release a stuck lock
View recent contention events
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
- SKILL.md in the repositoryCheckingpackages/skills/skills/browser-lock-multi-agent-playwright-concurrency/skill.md
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
[](https://verified-skill.com/skills/mediar-ai/skillhubz/browser-lock-multi-agent-playwright-concurrency)