المهارات playwright-skill
🎭

playwright-skill

مخاطر منخفضة ⚙️ الأوامر الخارجية🌐 الوصول إلى الشبكة📁 الوصول إلى نظام الملفات🔑 متغيرات البيئة⚡ يحتوي على سكربتات

Automate browser tasks with Playwright

متاح أيضًا من: lackeyjb

This skill enables Claude Code to automate browser interactions using Playwright, handling dev server detection, test script execution, and comprehensive web testing capabilities.

يدعم: Claude Codex Code(CC)
📊 71 كافٍ
1

تنزيل ZIP المهارة

2

رفع في Claude

اذهب إلى Settings → Capabilities → Skills → Upload skill

3

فعّل وابدأ الاستخدام

اختبرها

استخدام "playwright-skill". Test my local app at localhost:3000

النتيجة المتوقعة:

Auto-detected dev server on port 3000. Launching browser to test...

Page title: My Web App
Viewport: 1280x720
✓ Page loaded successfully
✓ No console errors detected
✓ Screenshot saved to /tmp/screenshot-2024-01-15.png

استخدام "playwright-skill". Check responsive design

النتيجة المتوقعة:

Testing across viewports:
- Mobile (375x667): ✓ No layout issues
- Tablet (768x1024): ✓ No layout issues
- Desktop (1280x720): ✓ No layout issues

All viewport tests passed. Screenshots saved to /tmp/

التدقيق الأمني

مخاطر منخفضة
v1 • 2/24/2026

This is a legitimate browser automation skill using the Playwright library. The static analyzer flagged many patterns but most are false positives: shell commands in documentation are usage examples, not dangerous execution; network access is required for browser automation; filesystem access is for writing test scripts to /tmp; environment variables are for configuration. No malicious intent detected.

5
الملفات التي تم فحصها
1,811
الأسطر التي تم تحليلها
8
النتائج
1
إجمالي عمليات التدقيق
مشكلات متوسطة المخاطر (1)
Shell Command Execution in Documentation
Documentation files contain shell command examples using backticks. These are usage examples for users, not dangerous code execution within the skill itself.
مشكلات منخفضة المخاطر (2)
Environment Variable Configuration
Skill reads configuration from environment variables (PW_HEADER_NAME, HEADLESS, etc.). This is legitimate configuration, not credential access.
Dynamic Script Loading
Skill uses require() to load Playwright and user test scripts. This is the expected mechanism for a scripting skill.

عوامل الخطر

⚙️ الأوامر الخارجية (1)
🌐 الوصول إلى الشبكة (1)
📁 الوصول إلى نظام الملفات (1)
🔑 متغيرات البيئة (1)
⚡ يحتوي على سكربتات (1)
تم تدقيقه بواسطة: claude

درجة الجودة

38
الهندسة المعمارية
100
قابلية الصيانة
87
المحتوى
50
المجتمع
81
الأمان
91
الامتثال للمواصفات

ماذا يمكنك بناءه

Web Developer Testing

Test web applications locally by auto-detecting dev servers and running automated browser tests across multiple viewport sizes.

QA Automation

Create end-to-end tests for web applications, validate login flows, and check responsive design across different devices.

Web Scraping

Extract content from websites that require JavaScript rendering, including screenshots and structured data extraction.

جرّب هذه الموجهات

Test Local Web App
Test my local web application. First detect any running dev servers, then verify the main page loads correctly and check for console errors.
Responsive Design Check
Check if my web application looks good on mobile, tablet, and desktop viewports. Take screenshots at each size and report any layout issues.
Login Flow Test
Test the login flow on [URL]. Fill in the credentials, click login, and verify successful authentication by checking for dashboard or user menu.
Form Submission Test
Fill out and submit the contact form on [URL] with test data. Verify the form submits successfully and check for any validation errors.

أفضل الممارسات

  • Always use parameterized URLs via constants or environment variables for maintainability
  • Write test scripts to /tmp to keep project directories clean
  • Use visible browser mode (headless: false) for debugging, switch to headless for CI
  • Handle async operations properly with waitForSelector and waitForNavigation

تجنب

  • Do not hardcode credentials in test scripts - use environment variables instead
  • Avoid testing against production websites without authorization
  • Do not rely solely on sleep/timers - use proper wait conditions for reliable tests
  • Avoid writing test files to the skill directory - always use /tmp

الأسئلة المتكررة

How do I set up Playwright?
Run 'npm run setup' in the skill directory, or the skill will prompt you to install on first use.
Can I test external websites?
Yes, but some sites may block automated browsers. Always respect robots.txt and website terms of service.
How do I pass custom headers?
Set PW_HEADER_NAME and PW_HEADER_VALUE environment variables, or PW_EXTRA_HEADERS for multiple headers in JSON format.
Can I run in headless mode?
Set HEADLESS=false environment variable for visible browser mode. Default is headless for CI environments.
Where do test scripts get saved?
Test scripts are written to /tmp/playwright-test-*.js to avoid cluttering your project directory.
Does this work with Firefox and WebKit?
Yes, the skill supports chromium, firefox, and webkit browsers. Install additional browsers with 'npx playwright install firefox'.

تفاصيل المطور

المؤلف

sickn33

الترخيص

MIT

مرجع

main

بنية الملفات