playwright-skill
Automate browser tasks with Playwright
Également disponible depuis: lackeyjb
This skill enables Claude Code to automate browser interactions using Playwright, handling dev server detection, test script execution, and comprehensive web testing capabilities.
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez à utiliser
Tester
Utilisation de "playwright-skill". Test my local app at localhost:3000
Résultat attendu:
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
Utilisation de "playwright-skill". Check responsive design
Résultat attendu:
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/
Audit de sécurité
Risque faibleThis 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.
Problèmes à risque moyen (1)
Problèmes à risque faible (2)
Facteurs de risque
⚙️ Commandes externes (1)
🌐 Accès réseau (1)
📁 Accès au système de fichiers (1)
🔑 Variables d’environnement (1)
⚡ Contient des scripts (1)
Score de qualité
Ce que vous pouvez construire
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.
Essayez ces prompts
Test my local web application. First detect any running dev servers, then verify the main page loads correctly and check for console errors.
Check if my web application looks good on mobile, tablet, and desktop viewports. Take screenshots at each size and report any layout issues.
Test the login flow on [URL]. Fill in the credentials, click login, and verify successful authentication by checking for dashboard or user menu.
Fill out and submit the contact form on [URL] with test data. Verify the form submits successfully and check for any validation errors.
Bonnes pratiques
- 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
Éviter
- 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