playwright

playwright is a skill for Claude Code, Codex from liyecom/liye-ai. It costs 11 tokens per session (1,052 once invoked), scanned A, original, Apache-2.0.

A browser-automation toolkit based on Playwright, a tool for controlling web browsers through code. It can interact with pages and check whether they behave as expected.

In plain words
What is it for?
It helps automate clicks, form entry, selections, waits, and checks, as well as capture screenshots and record browser sessions.
Why use it?
It helps find broken user-interface behavior and confirm that web features work across browsers without checking every step manually.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit It helps automate clicks, form entry, selections, waits, and checks, as well as capture screenshots and record browser sessions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/liyecom/liye-ai/playwright
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add liyecom/liye-ai --skill playwright
Clone the repo
git clone --depth 1 https://github.com/liyecom/liye-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for playwright

README.md
[![agentmods](https://agentmods.dev/badge/skills/liyecom/liye-ai/playwright.svg)](https://agentmods.dev/skills/liyecom/liye-ai/playwright)
Your own site
<a href="https://agentmods.dev/skills/liyecom/liye-ai/playwright"><img src="https://agentmods.dev/badge/skills/liyecom/liye-ai/playwright.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,052 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.01052
Opus 5 $0.00005 $0.00526
Sonnet 5 $0.00002 $0.00210
Haiku 4.5 $0.00001 $0.00105

Measured 7d ago against content hash dd8f247440ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

playwright scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Skills/00_Core_Utilities/development-tools/playwright/SKILL.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Playwright Browser Automation

来源: ComposioHQ/awesome-claude-skills 适配: LiYe OS 三层架构

基于 Playwright 的 Web 自动化测试,验证前端功能、调试 UI 行为、截图。

When to Use This Skill

当需要 Web 自动化时:

  • 自动化测试 Web 应用
  • 验证前端功能
  • 调试 UI 行为
  • 截图和录屏
  • 跨浏览器测试

Core Capabilities

1. 浏览器自动化

import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.click('button#submit');
await browser.close();

2. 元素交互

// 点击
await page.click('button.primary');

// 填写表单
await page.fill('input[name="email"]', '[email protected]');

// 选择下拉
await page.selectOption('select#country', 'US');

// 等待元素
await page.waitForSelector('.loading', { state: 'hidden' });

3. 截图与录屏

// 截图
await page.screenshot({ path: 'screenshot.png' });

// 全页面截图
await page.screenshot({ path: 'full.png', fullPage: true });

// 录制视频
const context = await browser.newContext({
  recordVideo: { dir: 'videos/' }
});

4. 断言与验证

import { expect } from '@playwright/test';

// 文本断言
await expect(page.locator('h1')).toHaveText('Welcome');

// 可见性断言
await expect(page.locator('.modal')).toBeVisible();

// URL 断言
await expect(page).toHaveURL(/.*dashboard/);

5. 跨浏览器测试

  • Chromium (Chrome, Edge)
  • Firefox
  • WebKit (Safari)
  • 移动设备模拟

Usage Examples

示例 1: 测试登录流程

用户: 帮我自动化测试网站的登录流程
Claude: [使用 playwright 编写登录测试脚本,验证成功和失败场景]

示例 2: 网页截图

用户: 帮我截取这个页面在不同设备上的样子
Claude: [使用 playwright 模拟手机、平板、桌面,分别截图]

示例 3: 表单自动填写

用户: 帮我自动填写这个复杂的表单
Claude: [使用 playwright 定位元素并填写表单数据]

Dependencies

  • Node.js 16+
  • Playwright 库
  • 浏览器引擎 (Chromium/Firefox/WebKit)

LiYe OS Integration

业务域引用

此技能被以下业务域引用:

  • 06_Technical_Development: Web 自动化(主域)
  • 02_Operation_Intelligence: 竞品页面监控

与其他技能的配合

  • artifacts-builder: 测试构建的前端组件
  • mcp-builder: 为 MCP 工具提供浏览器能力

三层架构位置

  • 物理层 (本文件): Skills/00_Core_Utilities/development-tools/playwright/
  • 逻辑层索引: Skills/{domain}/index.yaml
  • L3 指令层: .claude/skills/{domain}/playwright/

Read the full file on GitHub · 157 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 157 lines · 11 tokens per session scan A dd8f247440ee

Subscribe to this mod's changes

playwright is a skill published in the GitHub repository liyecom/liye-ai (33 stars, last pushed 27d ago), licensed Apache-2.0. It adds 11 tokens to every session and 1,052 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.