secondsky/claude-skills / plugins/playwright/skills/playwright
playwright
VerifiedBrowser automation and E2E testing with Playwright. Auto-detects dev servers, writes clean test scripts. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use for cross-browser testing, visual regression, API testing, component testing in TypeScript/JavaScript and Python projects.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.4 KB |
| examples/form-test.js | script | 876 B |
| examples/link-checker.js | script | 1.8 KB |
| examples/responsive-test.js | script | 1.1 KB |
| lib/helpers.js | script | 13.2 KB |
| package.json | manifest | 1.0 KB |
| references/API_REFERENCE.md | markdown | 14.6 KB |
| run.js | script | 7.1 KB |
examples/link-checker.js
View on GitHub// Example: Check for broken links on a page
const { chromium } = require('playwright');
const TARGET_URL = 'http://localhost:3000'; // Change as needed
(async () => {
const browser = await chromium.launch({ headless: false });
const page = await browser.newPage();
console.log(`Checking links on: ${TARGET_URL}\n`);
await page.goto(TARGET_URL);
// Get all links, then filter to http(s) only
// Note: This excludes relative links (/about), mailto:, tel:, and #anchors
const allLinks = await page.locator('a[href]').all();
const httpLinks = [];
for (const link of allLinks) {
const href = await link.getAttribute('href');
// Filter to only http(s) and protocol-relative links
if (href && (href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//'))) {
httpLinks.push({ locator: link, href });
}
}
console.log(`Found ${httpLinks.length} external http(s) links to check\n`);
const results = { working: 0, broken: [] };
for (const { locator: link, href } of httpLinks) {
try {
const response = await page.request.head(href);
if (response.ok()) {
results.working++;
console.log(`✅ ${href}`);
} else {
results.broken.push({ url: href, status: response.status() });
console.log(`❌ ${href} (Status: ${response.status()})`);
}
} catch (e) {
results.broken.push({ url: href, error: e.message });
console.log(`❌ ${href} (Error: ${e.message})`);
}
}
console.log(`\n\n=== RESULTS ===`);
console.log(`✅ Working links: ${results.working}`);
console.log(`❌ Broken links: ${results.broken.length}`);
if (results.broken.length > 0) {
console.log('\nBroken link details:');
console.log(JSON.stringify(results.broken, null, 2));
}
await browser.close();
})();
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |