agentleFS
nurmdrafinurmdrafi/pi-native/skills/browser-tools/SKILL.md

browser-tools

Skill4 starsChanged 5 days agoMITView on GitHub

Playwright/e2e testing ONLY via CDP :9222: verify UI fixes in the running app, live replay of failing specs, DOM inspection, screenshots, storageState for e2e work. NOT research/web content (→ web-search), NOT manual QA, NOT general debugging (→ systematic-debugging), NOT frontend design (→ refactoring-ui).

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use skill-creator.

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.
  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 1

    Distinctive

    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
  1. Very specific:

    No browser when filesystem/shell/static-code inspection answers the question.

    line 12
  2. Very specific:

    Verify tab targeting before trusting eval output: after browser-nav (especially --new), confirm next eval lands in intended tab — standard …

    line 16
  3. Very specific:

    Never expose debugging port beyond localhost (no 0.0.0.0 binding, no public port-forward for :9222).

    line 18
  4. Distinctive:

    After each session, record evidence: URL, title, console errors, network errors, screenshot paths — in reply or task report.

    line 19
  5. Very specific:

    Read-only research / web content → web-search skill (tvly search, tvly extract).

    line 26

“Common” is measured: kept by at least 6 in 10 of the 11 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Browser Tools

Invocation + reuse rules (mandatory)

  • Load this skill before ANY live-browser interaction (navigation, eval, screenshots, DOM inspection of running page, replaying failing specs).
  • No browser when filesystem/shell/static-code inspection answers the question; state briefly (internal workflow) what the browser is for before starting.
  • Reproducible automated E2E → playwright-tester skill (Playwright Test fixtures), not ad-hoc scripting here. This skill = interactive/live work; rules complement, never duplicate, that skill.
  • Reuse: never launch second Chrome when existing debug session on :9222 alive + safe — connect.
  • Reuse existing tabs/contexts when safe (--new only when current tab must not be disturbed).
  • Verify tab targeting before trusting eval output: after browser-nav (especially --new), confirm next eval lands in intended tab — standard recon reports URL + title first; they must match target. An eval once ran in stale "New Tab", read as blank page, sent investigation down false path.
  • Close only resources current task created; leave developer's browser/tabs as found.
  • Never expose debugging port beyond localhost (no 0.0.0.0 binding, no public port-forward for :9222).
  • After each session, record evidence: URL, title, console errors, network errors, screenshot paths — in reply or task report.
  • Record whether browser launched fresh, reused, or attached via CDP in any timing-related report.

Routing

This skill exists for Playwright/e2e testing only. Anything else routes elsewhere:

  • Read-only research / web content → web-search skill (tvly search, tvly extract); static pages {baseDir}/scripts/web-fetch.mjs <url> <maxChars> = cheapest extractor (headless, capped, no quota). Never this skill for research.
  • Manual QA / visual review → refactoring-ui or user-driven, not agent browser driving.
  • General debugging (runtime errors, wrong data) → systematic-debugging; go live only when failing spec needs it.
  • Failing e2e/browser-mode spec the runner log doesn't explain → live replay: references/debugging.md (go live after ONE unexplained failure).
  • Out of scope:
    • frontend feature testing outside e2e specs
    • visual inspection for design review
    • scraping for research
    • auth debugging outside e2e sessions
    • one-off DOM poking.
  • Task not part of Playwright/e2e effort → doesn't need this skill's Chrome.

Tools

CDP tools against Chrome on :9222 (macOS + Linux): per-script usage, setup (npm install once), pre-flight, fresh-vs---profile guidance: references/tools.md.

References

  • references/tools.md — per-script usage, setup, pre-flight, profile trade-offs, slow-startup attribution.
  • references/debugging.md — live replay of failing specs: procedure, error/console/network collector, canary probe, engine-source-as-ground-truth.
  • references/efficiency.md — eval patterns: standard recon, DOM-over-screenshots, single-call IIFEs, batching, polling.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.