agentleFS
jerseycheesejerseycheese/agent-skills/skills/browser-debugger-cli/SKILL.md

browser-debugger-cli

Skill4 starsChanged 15 days agoMITView on GitHub

Inspects live web pages through the Chrome DevTools Protocol with the `bdg` CLI: targeted DOM queries, computed styles, layout debugging, and raw CDP calls, without loading a full page snapshot. Trigger on: "inspect element", "check computed styles", "query the DOM", "debug layout".

  • Installs packages

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run targeted CDP methods without full page snapshots

    line 14
  2. Very specific:

    Prefer it over chrome-devtools-mcp for token efficiency.

    line 16
  3. Very specific:

    Use bdg status or bdg peek to inspect without stopping.

    line 37
  4. Very specific:

    Use bdg --no-headless when you need a visible browser window.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

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

browser-debugger-cli (bdg)

When to use

  • Query specific DOM elements or attributes
  • Run targeted CDP methods without full page snapshots
  • Debug with minimal token overhead
  • Prefer it over chrome-devtools-mcp for token efficiency; fall back to the MCP when bdg can't do the job

Prerequisites

  • Install: npm install -g browser-debugger-cli@alpha
  • Chrome available locally, or connect via --chrome-ws-url

Common workflow

  1. Start a session:
    • bdg http://localhost:3000
  2. Query DOM:
    • bdg dom query "button"
    • bdg dom query "[data-testid='x']"
  3. Discover CDP methods:
    • bdg cdp --list
    • bdg cdp --search dom
  4. Evaluate JS:
    • bdg cdp Runtime.evaluate --params '{"expression":"document.title"}'
  5. Stop the session:
    • bdg stop

Notes

  • Use bdg status or bdg peek to inspect without stopping.
  • Use bdg --no-headless when you need a visible browser window.
  • macOS tiling window managers: When using --no-headless, tiling window managers (AeroSpace, yabai, Amethyst, etc.) will constrain the browser window's viewport to whatever space the layout assigns. Float the window after it appears using the WM's float command. Without this, viewport-dependent CSS (media queries, responsive layouts) may not match expected breakpoints.
  • For full page snapshots or complex automation, use Chrome DevTools MCP.

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.