agentleFS
Kevin-Liu-01Kevin-Liu-01/Loop/.cursor/rules/frontend-10x-browser-debugging.mdc

Loop / rules

Cursor rule18 starsChanged 8 months agoMITView on GitHub

Prefer live-browser Chrome DevTools MCP for localhost and manual debugging; keep Playwright as deterministic fallback.

The file

We split this frontend-10x-browser-debugging.mdc into the rules it gives an agent

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

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When browser automation or debugging is needed:

    line 9
  2. Very specific:

    Prefer chrome-devtools-live when the user already has Chrome open, is logged in, or wants the agent to inspect the current browser state.

    line 11
  3. Very specific:

    Prefer chrome-devtools-port when testing localhost repeatedly or when a reusable dedicated debug browser is better than the user’s normal …

    line 12
  4. Distinctive:

    Use Playwright when isolation, deterministic repro, or fresh auth state is the actual goal.

    line 13
  5. Distinctive:

    Do not default to Playwright if the user clearly wants the current browser session or selected DevTools state.

    line 14
  6. Very specific:

    Verify nothing remains: ps aux | grep -iE "chrome-devtools-mcp|playwright-mcp|ms-playwright" | grep -v grep | wc -l

    line 29
  7. Distinctive:

    Never kill the user's normal Chrome browser or Cursor processes.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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
frontend-10x-browser-debugging.mdc
---
description: Prefer live-browser Chrome DevTools MCP for localhost and manual debugging; keep Playwright as deterministic fallback.
globs: ["**/*.{ts,tsx,js,jsx,md,mdx}"]
alwaysApply: true
---

# Browser Debugging Preference

When browser automation or debugging is needed:

- Prefer `chrome-devtools-live` when the user already has Chrome open, is logged in, or wants the agent to inspect the current browser state.
- Prefer `chrome-devtools-port` when testing localhost repeatedly or when a reusable dedicated debug browser is better than the user’s normal browsing session.
- Use Playwright when isolation, deterministic repro, or fresh auth state is the actual goal.
- Do not default to Playwright if the user clearly wants the current browser session or selected DevTools state.
- For localhost work, favor going straight into the browser via Chrome DevTools MCP before spinning up a fresh browser automation lane.

Operational rules:

- `chrome-devtools-live` requires remote debugging enabled at `chrome://inspect/#remote-debugging` and a user approval prompt.
- `chrome-devtools-port` assumes Chrome was launched with a remote debug port, for example via `/Users/kevinliu/.codex/bin/open-chrome-debug.sh http://localhost:3000`.
- Playwright is fallback, not the first move, for manual browser debugging.

Cleanup rules:

MCP processes (chrome-devtools-mcp, playwright-mcp) and Playwright-managed Chrome instances accumulate across sessions and waste memory. When the user asks to clean up, shut down, or wrap up:

- Kill stale MCP processes: `pkill -f "chrome-devtools-mcp"` and `pkill -f "playwright-mcp"`
- Kill Playwright-managed Chrome: `pkill -f "ms-playwright/mcp-chrome"`
- Verify nothing remains: `ps aux | grep -iE "chrome-devtools-mcp|playwright-mcp|ms-playwright" | grep -v grep | wc -l`
- Never kill the user's normal Chrome browser or Cursor processes.
- Report what was cleaned up and confirm zero remaining.

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.