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

browser-debugger-cli

Skill3 starsChanged 5 months agoMITView on GitHub

Inspect and debug live web pages using the Chrome DevTools Protocol via the `bdg` CLI. Use for targeted DOM queries, computed style checks, layout debugging, and CDP method calls without loading a full page snapshot. Prefer over chrome-devtools-mcp for token efficiency. Trigger on: "inspect element", "check computed styles", "query the DOM", "what does the DOM look like", "debug layout", "check the CSS on", "run a DevTools query", "what's the rendered style of", "inspect the page".

  • Installs packages

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 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.

  • 2

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

    Use bdg status or bdg peek to inspect without stopping.

    line 37
  3. 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 213,895 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

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.