wpt
Skill2 starsChanged 44 days agoMITView on GitHub
Use when writing, running, or debugging web-platform-tests (wpt), or when measuring how browsers actually behave (event and task ordering, timing, loading) with a throwaway test or by loading a page in Firefox, Chrome, or Safari, including before using the `firefox-nightly-mcp`, `chrome-canary-mcp`, or `safari-tp-mcp` browser tools. Triggers on "wpt", "web-platform-tests", "write a test", "./wpt run", "what do browsers do", "test this in Firefox/Chrome/Safari".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- zcorpan/web-platform-skillsword for word, first seen Nov 22, 2026
Other versions1 project uses a version of this.
Word for word · 1
- zcorpan/web-platform-skills★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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.
In this repository2 other files it gives its agents.
- browser-sourceSkill
- file-issueSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
When many failures exist, baseline before attributing them to the change: git stash, run, git stash pop.
- Very specific: line 18
Write a throwaway test in a scratch dir and dump observations with assert_true(false, '\n' + log.join('\n')).
- Very specific: line 25
If browser MCP servers are configured, use them for interactive exploration only, and report results from ./wpt run:
- Very specific: line 32
Before the reply that reports results, stop everything you started: ./wpt serve, background ./wpt run, WebDriver servers (geckodriver, …
- Distinctive: line 37
If the user may want to test manually (e.g.
- Distinctive: line 42
Prefer a sync point tied to the spec step over events (events are queued at a different step, and engines disagree on order).
- Very specific: line 47
Don't listen for load on a parser-inserted iframe/img from a later script.
- Very specific: line 48
Don't rely on named access on the global (iframe for id=iframe).
- Distinctive: line 49
Don't add code comments unless really necessary for understanding.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
wpt
Running tests
./wpt run --no-pause --yes --binary "<path>" <product> <paths>(--yesskips the webdriver prompt,--no-pausestops hanging).- Local browsers on macOS:
/Applications/Firefox Nightly.app/Contents/MacOS/firefox(firefox),/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary(chrome),--webkit-port=safari safari(Safari release),--webkit-port=safari --channel preview safari(Safari TP). Check the "Starting WebDriver:" line if unsure which channel ran. - Re-run timing-sensitive results ~3 times before reporting them as stable.
- When many failures exist, baseline before attributing them to the change:
git stash, run,git stash pop. - Re-run with an added settle delay to rule out artifacts from the load event or queued tasks.
Measuring browser behavior
- Write a throwaway test in a scratch dir and dump observations with
assert_true(false, '\n' + log.join('\n')). Record sync, microtask, task, rAF, and event handler timing in one run. - Afterwards, delete the scratch dir and verify with
git status.
Driving a browser at an external URL
- Chrome:
chrome --headless --disable-gpu --virtual-time-budget=8000 --dump-dom "<url>". - Firefox/Safari: raw W3C WebDriver over HTTP (POST
/session,/session/{id}/url,/session/{id}/execute/sync, DELETE/session/{id}). geckodriver is at_venv3/bin/geckodriverin a bootstrapped wpt checkout. If safaridriver hangs, fall back to./wpt run --channel previewon a local equivalent. - If browser MCP servers are configured, use them for interactive exploration only, and report results from
./wpt run:safari-tp-mcp:create_tab,navigate_to_url,evaluate_javascript,browser_console_messages,screenshot.evaluate_javascripttakes a function body: use an explicitreturnor getnull.chrome-canary-mcp(isolated profile):new_page,evaluate_script,list_console_messages,take_screenshot. Every page tool needspageId(fromnew_page/list_pages);evaluate_scripttakes a function (() => ...).firefox-nightly-mcp(temp profile):new_page,evaluate_script,screenshot_page,close_firefox_session.evaluate_scripttakes a function (() => ...). No console tool by default.
Cleaning up
- Before the reply that reports results, stop everything you started:
./wpt serve, background./wpt run, WebDriver servers (geckodriver, chromedriver, safaridriver), and browsers. Quit each browser; closing tabs or pages leaves it running:- Firefox Nightly (
firefox-nightly-mcp):close_firefox_session. - Chrome Canary (
chrome-canary-mcp):killthe Canary main process that is a child of this session'schrome-devtools-mcp. - Safari TP (
safari-tp-mcp, safaridriver):killthe--automationSafari TP process started (ps -o lstart) inside your test window; it's reparented to pid 1.
- Firefox Nightly (
- Other sessions' browsers and MCP servers may be running: kill only yours. This session's MCP servers are children of the agent's process (under Claude Code,
claude) that is an ancestor of your shell. Checkpsfor leftovers afterwards. - If the user may want to test manually (e.g. you gave them a URL on a local server), leave it running and offer to stop it later.
Writing tests
- Await events/callbacks (wrap in a promise) rather than polling. Poll with
await t.step_wait(() => video.currentSrc == source.src, 'desc', 3000, 5)(adjust the 100ms default as needed) only for spec steps with no observable event, e.g. an algorithm resuming at a microtask checkpoint; don't sync those on a parse-time inline script (engines don't resume there). - Prefer a sync point tied to the spec step over events (events are queued at a different step, and engines disagree on order).
- Sanity-check the sync point: assert the expected work is still pending, so the test fails loudly if the state is wrong.
- New
resources/handler knobs: add an optional query param behind a presence check, so existing callers are unaffected. - A test that fails identically in all browsers for an unrelated reason is worse than no test. Verify it would pass if the feature were implemented correctly.
- Give each media/image resource in a test a distinct URL (add a query string) so a cached copy can't make a lazy resource load eagerly.
- Don't listen for
loadon a parser-inserted iframe/img from a later script; it may already have fired. Await the windowloadevent instead (such elements delay it). - Don't rely on named access on the global (
iframeforid=iframe); usedocument.querySelector()/getElementById(). - Don't add code comments unless really necessary for understanding.
- Opening a wpt PR together with a spec PR: follow
file-issue's "Items that link to each other".
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.

