LP

lackeyjb/playwright-skill

浏览器自动化

本页由 AI 翻译,技术细节请以原文为准。 查看原文

3249 stars 质量 72 趋势 44MIT

通用剧作家自动化编码代理

概览

一项Claude技能,使Claude能够即时编写并执行任何Playwright自动化——从简单的页面测试到复杂的多步流程。作为Claude代码插件打包,便于安装和分发。 Claude 会根据你的浏览器自动化需求自动决定何时使用这项技能,只加载你具体任务所需的最小信息。 - - Claude 会根据你的具体请求编写自定义代码,不限于预构建脚本 - - 实时查看无头自动化:false - - 通用执行器确保模块的正确访问 - - 简洁 SKILL.md,仅在需要时加载完整的 API 引用 - - 智能临时文件管理,无竞赛条件 - - 常见任务可选工具函数 该仓库结构化为包含技能的 Claude Code 插件。你可以将其安装为(推荐)或解压为 。

概述(AI 翻译)

通用剧作家自动化,用于编码代理

该代理技能使编码代理能够实时编写和执行Playwright自动化,涵盖从简单的页面测试到复杂的多步流程。它还作为Claude代码插件打包,便于安装。

Claude 会根据你的浏览器自动化需求自动决定何时使用这项技能,只加载你具体任务所需的最小信息。

用Claude代码制作。

特色

  • 任何自动化任务 - Claude 为你的具体请求编写自定义代码,不限于预构建脚本
  • 默认可见浏览器 - 实时查看自动化,使用 headless: false
  • 可移植执行器 - 运行文件和内联脚本,模块分辨率稳定
  • 渐进披露 - 简明 SKILL.md,仅在需要时加载完整 API 引用
  • 安全清理 - 无竞态条件的智能临时文件管理
  • 综合辅助工具 - 用于常见任务的可选实用功能

安装

该仓库包含标准的 Agent Skill 和 Claude Code 插件封装器。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Playwright Skill

General-purpose Playwright automation for coding agents

An Agent Skill that enables coding agents to write and execute Playwright automation on the fly, from simple page tests to complex multi-step flows. It is also packaged as a Claude Code Plugin for convenient installation.

Claude autonomously decides when to use this skill based on your browser automation needs, loading only the minimal information required for your specific task.

Made using Claude Code.

Features

  • Any Automation Task - Claude writes custom code for your specific request, not limited to pre-built scripts
  • Visible Browser by Default - See automation in real-time with headless: false
  • Portable executor - Runs file and inline scripts with stable module resolution
  • Progressive Disclosure - Concise SKILL.md with full API reference loaded only when needed
  • Safe Cleanup - Smart temp file management without race conditions
  • Comprehensive Helpers - Optional utility functions for common tasks

Installation

This repository contains a standard Agent Skill and a Claude Code plugin wrapper. The recommended installation method is Vercel’s skills CLI, which installs skills into the native locations for supported agents.

Why this skill?

Use this skill when the agent needs to write a real Playwright program: loops, assertions, multiple contexts, network interception, screenshots, video, or a script you want to keep and rerun. It also provides dev-server detection and a small set of focused helpers.

For straightforward interactive browsing, start with Microsoft’s official @playwright/cli and install its agent skills with playwright-cli install --skills. For tool-based browser control with accessibility snapshots, use playwright-mcp. This project is the code-first option when the automation itself is the useful artifact.

Understanding the Structure

This repository uses the plugin format with a nested structure:

playwright-skill/              # Plugin root
├── .claude-plugin/           # Plugin metadata
└── skills/
    └── playwright-skill/     # The actual skill
        └── SKILL.md

The repository keeps the skill inside the plugin’s skills/ directory. Installers handle that layout automatically; manual copying is only a fallback for clients without an installer.


Option 1: Install with skills (Recommended)

Install globally for your user:

npx skills add lackeyjb/playwright-skill --skill playwright-skill --global --yes

Install only for the current project by omitting --global:

npx skills add lackeyjb/playwright-skill --skill playwright-skill --yes

To target specific agents, add --agent followed by one or more agent IDs:

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add lackeyjb/playwright-skill
新手?先看 mcpskill.org 教程 →