Community程式設計與開發github.com

sickn33/playwright-skill

一個整合 Playwright 技能,協助 AI 代理在瀏覽器自動化任務中執行端到端測試與網頁互動。

playwright-skill 是什麼?

這個技能為 AI 代理(例如 Claude Code、Cursor、Codex)提供了完整的 Playwright 整合能力,使其能夠自動執行瀏覽器操作、建立端對端測試、以及與網頁元素互動。它支援所有主要平台,包含 Linux、macOS 與 Windows,並可透過外掛系統、手動安裝、全域或專案特定方式進行部署。技能運作方式為從 SKILL.md 檔案解析路徑,並利用該路徑執行 Playwright 指令及腳本,例如啟動瀏覽器、導航至網頁、點擊按鈕或填寫表單,同時確保路徑解析正確以避免執行錯誤。這對於需要可靠網頁自動化的開發者工具與 CI/CD 流程特別實用。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/playwright-skill

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

playwright-skill 是做什麼的?

重要 - 路徑解析: 此技能可安裝於不同位置(外掛系統、手動安裝、全域或專案特定)。在執行任何指令前,請根據載入此 SKILL.md 檔案的位置判斷技能目錄,並於以下所有指令中使用該路徑。


概述

sickn33/playwright-skill 提供 Playwright 瀏覽器自動化功能,讓 AI 代理能夠在開發與測試流程中執行端對端測試及網頁互動。

功能

  • 瀏覽器控制 – 啟動 Chromium、Firefox 或 WebKit 瀏覽器。
  • 網頁導航 – 造訪 URL 並等待頁面載入。
  • 元素互動 – 點擊、輸入文字、選取選項及更多操作。
  • 測試撰寫 – 建立可重複使用的端對端測試案例。
  • 螢幕擷取 – 擷取頁面或元素截圖。

安裝

使用外掛系統(若受支援)

# 路徑範例:~/.claude/skills/sickn33-playwright-skill/

手動安裝

git clone https://github.com/sickn33/playwright-skill.git
cd playwright-skill
npm install
npx playwright install

全域安裝(位於系統層級)

# 路徑範例:/usr/local/share/skills/sickn33-playwright-skill/

專案特定安裝

# 將技能置於專案目錄中,例如 ./skills/

設定

建立 .env 檔案或設定環境變數:

PLAYWRIGHT_SKILL_DIR=/path/to/skill/directory

若未指定,技能會嘗試自動偵測路徑,但顯式設定可確保可靠性。

使用方式

基本瀏覽器測試

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=False)
    page = browser.new_page()
    page.goto("https://example.com")
    print(page.title())
    browser.close()

CLI 快速執行

cd /path/to/skill
npx playwright test --headed

專案結構

playwright-skill/
├── SKILL.md
├── package.json
├── tests/
│   └── example.spec.js
├── scripts/
│   └── run.js
└── README.md

疑難排解

  • 路徑錯誤 – 確認 PLAYWRIGHT_SKILL_DIR 環境變數已設定,或根據載入 SKILL.md 的位置手動提供正確路徑。
  • 瀏覽器遺失 – 執行 npx playwright install 以下載所需瀏覽器。
  • 權限問題 – 確保技能目錄對執行使用者具有讀寫權限。

授權

MIT

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

sickn33/3d-web-experience

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences.

sickn33/agent-memory-mcp

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

sickn33/agent-memory-systems

Memory is the cornerstone of intelligent agents. Without it, every interaction starts from zero. This skill covers the architecture of agent memory: short-term (context window), long-term (vector stores), and the cognitive architectures that organize them.

sickn33/ai-agents-architect

Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration.

sickn33/api-documentation-generator

Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices

sickn33/api-patterns

API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.

sickn33/api-security-best-practices

Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities

sickn33/app-store-optimization

Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

sickn33/architecture

Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.

sickn33/audio-transcriber

Transform audio recordings into professional Markdown documentation with intelligent summaries using LLM integration

sickn33/aws-serverless

Specialized skill for building production-ready serverless applications on AWS. Covers Lambda functions, API Gateway, DynamoDB, SQS/SNS event-driven patterns, SAM/CDK deployment, and cold start optimization.

sickn33/backend-architect

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems.

sickn33/backend-dev-guidelines

You are a senior backend engineer operating production-grade services under strict architectural and reliability constraints. Use when routes, controllers, services, repositories, express middleware, or prisma database access.

sickn33/bash-linux

Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

sickn33/bash-scripting

Bash scripting workflow for creating production-ready shell scripts with defensive patterns, error handling, and testing.

sickn33/brainstorming

Use before creative or constructive work (features, architecture, behavior). Transforms vague ideas into validated designs through disciplined reasoning and collaboration.

sickn33/browser-automation

Browser automation powers web testing, scraping, and AI agent interactions. The difference between a flaky script and a reliable system comes down to understanding selectors, waiting strategies, and anti-detection patterns.

sickn33/browser-extension-builder

Expert in building browser extensions that solve real problems - Chrome, Firefox, and cross-browser extensions. Covers extension architecture, manifest v3, content scripts, popup UIs, monetization strategies, and Chrome Web Store publishing.

sickn33/bullmq-specialist

BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications.

sickn33/bun-development

Fast, modern JavaScript/TypeScript development with the Bun runtime, inspired by [oven-sh/bun](https://github.com/oven-sh/bun).

相關技能