Agent skill
playwright
Dynamic access to playwright MCP server (22 tools)
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/playwright-bjornslib-cobuilder-harness
SKILL.md
playwright Skill
Access playwright MCP server capabilities.
Context Efficiency
Traditional MCP approach:
- All 22 tools loaded at startup
- Estimated context: 11000 tokens
This skill approach:
- Metadata only: ~100 tokens
- Full instructions (when used): ~5k tokens
- Tool execution: 0 tokens (runs externally)
How This Works
Instead of loading all MCP tool definitions upfront, this skill:
- Tells you what tools are available (just names and brief descriptions)
- You decide which tool to call based on the user's request
- Generate a JSON command to invoke the tool
- The executor handles the actual MCP communication
Available Tools
browser_close: Close the pagebrowser_resize: Resize the browser windowbrowser_console_messages: Returns all console messagesbrowser_handle_dialog: Handle a dialogbrowser_evaluate: Evaluate JavaScript expression on page or elementbrowser_file_upload: Upload one or multiple filesbrowser_fill_form: Fill multiple form fieldsbrowser_install: Install the browser specified in the config. Call this if you get an error about the browser not being installed.browser_press_key: Press a key on the keyboardbrowser_type: Type text into editable elementbrowser_navigate: Navigate to a URLbrowser_navigate_back: Go back to the previous pagebrowser_network_requests: Returns all network requests since loading the pagebrowser_run_code: Run Playwright code snippetbrowser_take_screenshot: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.browser_snapshot: Capture accessibility snapshot of the current page, this is better than screenshotbrowser_click: Perform click on a web pagebrowser_drag: Perform drag and drop between two elementsbrowser_hover: Hover over element on pagebrowser_select_option: Select an option in a dropdownbrowser_tabs: List, create, close, or select a browser tab.browser_wait_for: Wait for text to appear or disappear or a specified time to pass
Usage Pattern
When the user's request matches this skill's capabilities:
Step 1: Identify the right tool from the list above
Step 2: Generate a tool call in this JSON format:
{
"tool": "tool_name",
"arguments": {
"param1": "value1",
"param2": "value2"
}
}
Step 3: Execute via bash:
python .claude/skills/mcp-skills/executor.py --skill playwright --call 'YOUR_JSON_HERE'
Getting Tool Details
If you need detailed information about a specific tool's parameters:
python .claude/skills/mcp-skills/executor.py --skill playwright --describe tool_name
This loads ONLY that tool's schema, not all tools.
Examples
Example 1: Simple tool call
User: "Navigate to a website with Playwright"
Your workflow:
- Identify tool:
browser_navigate - Generate call JSON
- Execute:
python .claude/skills/mcp-skills/executor.py --skill playwright --call '{"tool": "browser_navigate", "arguments": {"url": "https://example.com"}}'
Example 2: Get tool details first
python .claude/skills/mcp-skills/executor.py --skill playwright --describe browser_take_screenshot
Returns the full schema, then you can generate the appropriate call.
Error Handling
If the executor returns an error:
- Check the tool name is correct
- Verify required arguments are provided
- Ensure the MCP server is accessible
Performance Notes
Context usage comparison for this skill:
| Scenario | MCP (preload) | Skill (dynamic) |
|---|---|---|
| Idle | 11000 tokens | 100 tokens |
| Active | 11000 tokens | 5k tokens |
| Executing | 11000 tokens | 0 tokens |
Savings: ~54% reduction in typical usage
This skill was auto-generated from an MCP server configuration. Generator: mcp_to_skill.py
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?