lightpanda-browser
Skill5 starsChanged 2 days agoMITView on GitHub
Trigger: headless browser, Playwright, Puppeteer, E2E tests, scraping, browser automation, CDP, read a web page, screenshot, captura, PDF render. Pick Lightpanda (default) or Chromium (pixels only) and wire Playwright to it.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- alvaroofernaandez/avalword for word, first seen Nov 22, 2026
- Mathews-Tom/armorytheir own version, first seen Nov 1, 2026
Other versions2 projects use a version of this.
Word for word · 1
- alvaroofernaandez/aval★ 5100% same
Edited · 0
None found.
Wrote their own version · 1
- Mathews-Tom/armory★ 340same name
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 repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- aval-architectureSkill
- aval-docsSkill
- aval-release-notesSkill
- aval-releaseSkill
- aval-testingSkill
- accessibilitySkill
- ai-sdk-5Skill
- architecture-evidenceSkill
- branch-prSkill
- chained-prSkill
- cognitive-doc-designSkill
- design-pipelineSkill
- design-refactorSkill
- docker-build-optimizedSkill
- docker-space-optimizerSkill
- herdrSkill
- issue-creation-proSkill
- kiri-dockerSkill
- kiri-healthSkill
- laws-of-uxSkill
- mac-disk-cleanupSkill
- pdf-reportSkill
- plan-deckSkill
- prs-proSkill
- react-19Skill
- readme-guardianSkill
- readme-portalSkill
- repo-prepSkill
- skill-creatorSkill
- strict-tddSkill
- tailwind-4Skill
- typescriptSkill
- work-unit-commitsSkill
- zod-4Skill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 28
If a flow fails on Lightpanda because of a missing Web API (it is beta), rerun that one flow on Chromium and say so.
- Very specific: line 30
Always set LIGHTPANDA_DISABLE_TELEMETRY=true (telemetry is on by default).
- Very specific: line 46
Start the CDP server: LIGHTPANDA_DISABLE_TELEMETRY=true lightpanda serve --host 127.0.0.1 --port 9222
- Very specific: line 79
Read the ports from env (e.g.
- Very specific: line 87
Stop only what you started, by the PID you captured.
- Distinctive: line 96
Keep one Chromium headless shell per pinned Playwright revision, only for the pixel tasks above.
- Distinctive: line 118
Hydration probe first: Before moving any spec, load one client-rendered route on Lightpanda and check the app hydrates (a client-only …
≈ “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
Activation Contract
Load before launching any headless browser: Playwright or Puppeteer scripts, E2E tests, scraping, reading/extracting a page, form automation, or any screenshot, visual check or HTML-to-PDF render.
Hard Rules
- Lightpanda is the default headless browser. It is not Chromium-based, written in Zig, far lighter on RAM/CPU and built for agents.
- Lightpanda has no graphical rendering engine. It ignores CSS layout:
page.screenshot()andlightpanda fetch --dump png|pdfreturn a text-only render (verified: a centered 26em page comes out full-width, CJK glyphs missing). Never present that output as a screenshot. - Chromium only when pixels matter: real screenshots, visual regression,
aval design gaterender gates (contrast, overflow, target size, responsive, reduced motion),design-taste-frontendlook-and-fix loop, HTML-to-PDF (pdf-reportand any branded PDF/manual skill), and anything readinggetBoundingClientRect/computed layout. - If a flow fails on Lightpanda because of a missing Web API (it is beta), rerun that one flow on Chromium and say so; do not switch the whole suite.
- Always set
LIGHTPANDA_DISABLE_TELEMETRY=true(telemetry is on by default).
Decision Gates
| Task | Browser |
| E2E functional flow (navigate, click, fill, assert text/URL/DOM) | Lightpanda |
| Scraping, page → markdown/HTML/JSON-LD | Lightpanda (fetch --dump) |
| Agent reads/browses a page (no script needed) | Lightpanda fetch --dump markdown or lightpanda mcp — no Node at all |
| Screenshot, visual diff, layout/contrast gate | Chromium |
| PDF generation | Chromium |
| Lightpanda lacks an API the page needs | Chromium for that flow only |
Execution Steps
- Install if missing:
brew install lightpanda-io/browser/lightpanda(Docker:lightpanda/browser:nightly, CDP on 9222). - Start the CDP server:
LIGHTPANDA_DISABLE_TELEMETRY=true lightpanda serve --host 127.0.0.1 --port 9222 Connect Playwright over CDP (use
playwright-core; no bundled browser needed):import { chromium } from 'playwright-core'; const browser = await chromium.connectOverCDP('ws://127.0.0.1:9222'); const page = await (await browser.newContext()).newPage();Puppeteer:
puppeteer.connect({ browserWSEndpoint: 'ws://127.0.0.1:9222' }).Playwright Test (verified with 1.63.0 in three repos): add a
webServerentry{ command: 'lightpanda serve --host 127.0.0.1 --port 9222', url: 'http://127.0.0.1:9222/json/version', reuseExistingServer: true, env: { LIGHTPANDA_DISABLE_TELEMETRY: 'true' } }, alightpandaproject withuse: { cdpEndpoint: 'ws://127.0.0.1:9222' }, and achromiumproject limited (testMatch) to pixel specs. Overridebrowserin a shared fixture and make EVERY spec importtest/expectfrom it — a spec importing from@playwright/testsilently keeps launching Chromium:export const test = base.extend<{}, { cdpEndpoint: string | undefined }>({ cdpEndpoint: [undefined, { scope: 'worker', option: true }], browser: [async ({ cdpEndpoint, playwright, browserName, launchOptions }, use) => { const b = cdpEndpoint ? await playwright.chromium.connectOverCDP(cdpEndpoint) : await playwright[browserName].launch(launchOptions); await use(b); await b.close(); }, { scope: 'worker' }], });Read the ports from env (e.g.
E2E_LIGHTPANDA_PORT) — worktrees and dev servers collide on fixed ports. CI (Linux): downloadhttps://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux.- One-shot reads without a script:
lightpanda fetch --dump markdown --wait-until networkidle <url>(html,markdown,structured_data;--wait-selectorto wait for content). - Agent flows: prefer
lightpanda mcp(stdio MCP server;--portfor HTTP,--cdp-portto also expose CDP) orfetchover writing a Playwright script. - Stop only what you started, by the PID you captured. NEVER
pkill/killallby pattern (lightpanda serve,next dev,node): other sessions run dev servers and Lightpanda instances on this machine.
Install Footprint
- New projects:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm add -D playwright-core(13 MB library, no browser).@playwright/testonly when the runner is needed; keep the same env var so no Chromium lands per project. - Keep one Chromium headless shell per pinned Playwright revision, only for the
pixel tasks above. Before pruning
~/Library/Caches/ms-playwright, list whichplaywright-core/browsers.jsonpin each revision — a revision still pinned by a project is in use, not a duplicate.
Benchmark (2026-11-04, local page, fill + click + read, 20 runs)
| Setup | Browser RSS | Median per page |
| Playwright + Chromium headless shell | 284 MB | 82 ms |
| Playwright + Lightpanda | 39 MB | 38–44 ms |
| Puppeteer + Lightpanda | 39 MB | 54–57 ms |
lightpanda fetch --dump markdown | 31 MB | 240 ms per call, no Node |
Playwright stays the client: fastest per action and it keeps the test runner.
Verified on 1.0.2 (2026-11-04)
Works over CDP with Playwright: goto, title, content, evaluate, $eval,
locators (locator, getByRole, strict mode), click + navigation,
expect().toHaveText/toHaveCount.
Hydration probe first. Before moving any spec, load one client-rendered
route on Lightpanda and check the app hydrates (a client-only element appears,
or React fibers exist on the DOM). A Next 16 app (gdr) never hydrated: 0
fibers after 15 s, no errors — server-rendered headings pass, everything
interactive times out. If the probe fails, wire the lightpanda project but
leave it empty.
Measured on 13 repos (2026-11-04): Lightpanda paid off on pure functional suites (freak-hub auth specs 26 s vs 1.1 min on Chromium), and moved nothing in layout-heavy marketing sites or apps gated by Clerk.
Known gaps — keep these specs on Chromium:
- Clerk browser sign-up/sign-in does not complete (mir-platform onboarding
never renders). Use a pre-authenticated
storageStateor keep the spec on Chromium. - Hydration can fail silently on some React/Next apps (see probe above).
- No
navigator.serviceWorker: apps mocking with MSW in the browser cannot run. ReadableStream.teemissing (logged as a warning).- Anything using
setViewportSize,boundingBox,getComputedStyle,toHaveCSS,emulateMedia, hover/mouse.wheelgeometry, canvas/WebGL (maps, charts) or axe contrast. Split by file: one layout assertion keeps the whole spec file on Chromium.
Output Contract
State which browser ran each check. A screenshot or visual claim must come from Chromium; label any Lightpanda image as text-only.
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.

