playwright
Skill2 starsChanged 9 months agoMITView on GitHub
Render web pages with JavaScript using Playwright for sites that need browser rendering or have issues with simple HTTP fetching.
94 other projects use a version of this.
Adopted by
Most recently taken up by
- Pamir-AI/skillstheir own version, first seen Nov 8, 2026
- shetengteng/skillix-hubtheir own version, first seen Nov 8, 2026
- LuisSambrano/antigravity-configtheir own version, first seen Nov 8, 2026
- fmind/dottheir own version, first seen Nov 8, 2026
- fmind/dotfilestheir own version, first seen Nov 8, 2026
- miminashi/pvesetheir own version, first seen Nov 4, 2026
Used with
Projects with it also use develop-web-game, msw and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hebertzhuSkilldevelop-web-game
Use when building or iterating on a web game and you need a tight implement-test-observe loop; prefer the bundled Playwright client, inspect screenshots and text state, and validate every meaningful change before moving on.
Also in 4 projects that use this
thongdn-itSkillmsw
MSW (Mock Service Worker) best practices for API mocking in tests (formerly test-msw). This skill should be used when setting up MSW, writing request handlers, or mocking HTTP APIs. This skill does NOT cover general testing patterns (use test-vitest or test-tdd skills) or test methodology.
Also in 3 projects that use this
SupabaseSkillreact-hook-form
Correct React Hook Form usage anywhere in the monorepo — data flow, subscriptions,
Also in 3 projects that use this
thongdn-itSkilltailwind
Tailwind CSS v4 performance optimization and best practices guidelines (formerly tailwindcss-v4-style). This skill should be used when writing, reviewing, or refactoring Tailwind CSS v4 code to ensure optimal build performance, minimal CSS output, and correct usage of v4 features. Triggers on tasks involving Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.
Also in 5 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 6 projects that use this
OpenAISkillweb-perf
Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.
Also in 5 projects that use this
- +1 more from thongdn-it
Other versions94 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 94
- openai/openai-agents-python★ 31ksame name
- openai/skills★ 27ksame name
- prowler-cloud/prowler★ 15ksame name
- hyperdxio/hyperdx★ 10ksame name
- bluesky-social/atproto★ 9.7ksame name
- netease-youdao/LobsterAI★ 6.2ksame name
- Kiln-AI/Kiln★ 5.3ksame name
- freestylefly/wesight★ 969same name
- Gram-ax/gramax★ 609same name
- JetBrains/skills★ 386same name
84 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 81 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use Playwright to render JavaScript-heavy websites, take screenshots, and extract content that regular HTTP fetching can't handle.
- Distinctive: line 137
If a method call fails or you're unsure what's available on the page object, introspect it:
- Distinctive: line 151
When webfetch fails: Use basic rendering for JavaScript sites
- Very specific: line 153
Dynamic content: Add page.wait_for_timeout(ms) for slow-rendering JS
- Very specific: line 155
Use this when the built-in webfetch tool encounters:
“Common” is measured: kept by at least 6 in 10 of the 81 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Playwright Skill
Use Playwright to render JavaScript-heavy websites, take screenshots, and extract content that regular HTTP fetching can't handle.
Installation
Playwright will be installed automatically via uv dependencies, but you may need to install browsers:
# Install browsers (run once)
playwright install chromium
# Or for all browsers
playwright installCore Operations
Basic Page Rendering
uv run - "https://example.com" <<'EOF'
# /// script
# requires-python = ">=3.12"
# dependencies = ["playwright>=1.0", "beautifulsoup4>=4.0"]
# ///
import sys
from playwright.sync_api import sync_playwright
if len(sys.argv) < 2:
print("Usage: script <url>")
sys.exit(1)
url = sys.argv[1]
print(f"🎭 Rendering: {url}")
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
try:
# Navigate and wait for page to load
page.goto(url, wait_until='networkidle')
# Get basic info
title = page.title()
content = page.content()
print(f"✅ Page loaded successfully")
print(f"📄 Title: {title}")
print(f"📏 Content length: {len(content)} characters")
print(f"🔗 Final URL: {page.url}")
# Extract and clean text content
text_content = page.evaluate("""
() => {
// Remove script and style elements
const scripts = document.querySelectorAll('script, style, nav, header, footer');
scripts.forEach(el => el.remove());
// Get main content
const main = document.querySelector('main, article, .content, .post, .entry') || document.body;
return main.innerText || document.body.innerText;
}
""")
# Clean and limit output
clean_text = '\n'.join(line.strip() for line in text_content.split('\n') if line.strip())
print(f"\n📝 EXTRACTED CONTENT:")
print("=" * 80)
print(clean_text[:3000]) # First 3000 chars
if len(clean_text) > 3000:
print(f"\n... (truncated, full content is {len(clean_text)} characters)")
except Exception as e:
print(f"❌ Error loading page: {e}")
finally:
browser.close()
EOFTake Screenshot
uv run - "https://example.com" "screenshot.png" <<'EOF'
# /// script
# requires-python = ">=3.12"
# dependencies = ["playwright>=1.0"]
# ///
import sys
from playwright.sync_api import sync_playwright
from pathlib import Path
if len(sys.argv) < 2:
print("Usage: script <url> [output_file]")
sys.exit(1)
url = sys.argv[1]
output_file = sys.argv[2] if len(sys.argv) > 2 else "screenshot.png"
print(f"📸 Taking screenshot of: {url}")
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
# Set viewport size
page.set_viewport_size({"width": 1280, "height": 720})
try:
page.goto(url, wait_until='networkidle')
# Take full page screenshot
page.screenshot(path=output_file, full_page=True)
# Get file size
file_size = Path(output_file).stat().st_size
print(f"✅ Screenshot saved: {output_file} ({file_size:,} bytes)")
print(f"📄 Page title: {page.title()}")
except Exception as e:
print(f"❌ Error taking screenshot: {e}")
finally:
browser.close()
EOFDebugging
If a method call fails or you're unsure what's available on the page object, introspect it:
uv run -c "from playwright.sync_api import Page; print([m for m in dir(Page) if not m.startswith('_')])"For full library docs, fetch the README:
webfetch https://github.com/microsoft/playwright-pythonUsage Patterns
- When webfetch fails: Use basic rendering for JavaScript sites
- Screenshots: Visual documentation or debugging
- Dynamic content: Add
page.wait_for_timeout(ms)for slow-rendering JS
Use this when the built-in webfetch tool encounters:
- JavaScript-only content
- Dynamic loading
- Complex single-page applications
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

