agentleFS
ChromeDevToolsChromeDevTools/chrome-devtools-mcp/AGENTS.md

chrome-devtools-mcp

AGENTS.md53k starsChanged 6 months agoApache-2.0View on GitHub

This repository contains an MCP server and CLI for Chrome DevTools.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about ChromeDevTools/chrome-devtools-mcp

The biggest 5 of 102 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 102

Talked about on GitHub, Bluesky and Hacker News (102 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 50

45 more on Bluesky
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository7 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

28 rules. About 0 are common, 5 are distinctive, and 23 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 23

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use only scripts from package.json to run commands.

    line 5
  2. Very specific:

    Use npm run build to run tsc and test build.

    line 6
  3. Very specific:

    Use npm run test to build and run tests, run all tests to verify correctness.

    line 7
  4. Very specific:

    Use npm run test path-to-test.ts to build and run a single test file, for example, npm run test tests/McpContext.test.ts.

    line 8
  5. Very specific:

    Use npm run format to fix formatting and get linting errors.

    line 9
  6. Very specific:

    Never modify third_party/devtools-frontend except for experimentation: it is a git submodule, a mirror of the actual codebase.

    line 10
  7. Very specific:

    Do not use any type.

    line 14
  8. Very specific:

    Do not use as keyword for type casting.

    line 15
  9. Very specific:

    Do not use ! operator for type assertion.

    line 16
  10. Very specific:

    Do not use // @ts-ignore comments.

    line 17
  11. Very specific:

    Prefer for..of instead of forEach.

    line 20
  12. Very specific:

    Never type-check types that are already type safe (e.g.

    line 21
  13. Very specific:

    Test that the tool handler parses/validates parameters and invokes the corresponding methods on page, context, or response with the exact …

    line 29
  14. Distinctive:

    Do not reimplement business logic or state tracking inside mocks (e.g., do not simulate state changes in mock methods).

    line 30
  15. Very specific:

    Test business logic by instantiating the real class under test with mocked dependencies (e.g., instantiate new McpPage(...) with a mocked …

    line 32
  16. Very specific:

    Centralize mocks in tests/mocks.ts: Keep all reusable mock factories in tests/mocks.ts.

    line 37
  17. Very specific:

    Use sinon.createStubInstance(Class): Do not hand-roll mock objects or define custom mock interfaces.

    line 38
  18. Very specific:

    Typing: Use sinon.SinonStubbedInstance<Class> for mock types (e.g., MockMcpPage, MockMcpContext, MockMcpResponse).

    line 39
  19. Distinctive:

    Keep mocks generic: Do not tailor mocks to a specific tool or test suite.

    line 41
  20. Very specific:

    Naming conventions: Use mock rather than fake in helper and variable names (e.g., createMockPuppeteerPage, createMockMcpPage).

    line 42
  21. Very specific:

    Use sinon.assert methods: Do not use Node's assert.ok(stub.calledOnce) or assert.deepStrictEqual(stub.firstCall.args[0], ...) to verify …

    line 46
  22. Very specific:

    Use sinon.assert.calledOnceWithExactly(stub, ...args) for single calls with exact arguments.

    line 48
  23. Very specific:

    Use sinon.assert.calledWithExactly(stub.secondCall, ...args) for subsequent calls.

    line 49
  24. Very specific:

    Use sinon.assert.notCalled(stub) to assert a method was not invoked.

    line 50
  25. Very specific:

    Clean up stubs: Always include afterEach(() => sinon.restore()).

    line 51
  26. Distinctive:

    Do not add redundant comments or verbose JSDoc for short, self-describing mock functions or tests.

    line 55
  27. Distinctive:

    Only test real scenarios; avoid testing redundant or artificial calls that cannot happen in real usage.

    line 56
  28. Distinctive:

    Use current year (2026) in copyright headers for new test files.

    line 57

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

This repository contains an MCP server and CLI for Chrome DevTools.

Instructions

  • Use only scripts from package.json to run commands.
  • Use npm run build to run tsc and test build.
  • Use npm run test to build and run tests, run all tests to verify correctness.
  • Use npm run test path-to-test.ts to build and run a single test file, for example, npm run test tests/McpContext.test.ts.
  • Use npm run format to fix formatting and get linting errors.
  • Never modify third_party/devtools-frontend except for experimentation: it is a git submodule, a mirror of the actual codebase.

Rules for TypeScript

  • Do not use any type.
  • Do not use as keyword for type casting.
  • Do not use ! operator for type assertion.
  • Do not use // @ts-ignore comments.
  • Do not use // @ts-nocheck comments.
  • Do not use // @ts-expect-error comments.
  • Prefer for..of instead of forEach.
  • Never type-check types that are already type safe (e.g. redundant typeof checks on statically typed variables).

Rules for Testing

Structure and Separation of Concerns

  • Prefer mock-based unit tests over real-browser tests: Do not use withMcpContext or launch a real browser unless the test genuinely requires real browser or DevTools protocol integration (e.g., live CDP events, browser lifecycle, secondary sessions). Puppeteer already tests browser behavior upstream; unit tests run faster and avoid browser overhead.
  • Tool handler tests (tests/tools/*.test.ts):
    • Test that the tool handler parses/validates parameters and invokes the corresponding methods on page, context, or response with the exact expected arguments.
    • Do not reimplement business logic or state tracking inside mocks (e.g., do not simulate state changes in mock methods).
  • Core class tests (e.g., tests/McpPage.test.ts):
    • Test business logic by instantiating the real class under test with mocked dependencies (e.g., instantiate new McpPage(...) with a mocked Puppeteer page from createMockPuppeteerPage()).
    • Assert that the class calls the underlying Puppeteer methods with the expected parameters.

Mocking Guidelines (tests/mocks.ts)

  • Centralize mocks in tests/mocks.ts: Keep all reusable mock factories in tests/mocks.ts. Import directly from tests/mocks.ts (do not re-export from tests/utils.ts).
  • Use sinon.createStubInstance(Class): Do not hand-roll mock objects or define custom mock interfaces. Use sinon.createStubInstance() so all prototype methods are automatically stubbed.
  • Typing: Use sinon.SinonStubbedInstance<Class> for mock types (e.g., MockMcpPage, MockMcpContext, MockMcpResponse).
  • Handler mocks helper: For tool handlers, use const {page, context, response} = createHandlerMocks(); from tests/mocks.ts to set up all three mocks in one call.
  • Keep mocks generic: Do not tailor mocks to a specific tool or test suite.
  • Naming conventions: Use mock rather than fake in helper and variable names (e.g., createMockPuppeteerPage, createMockMcpPage). Name the mocked Puppeteer page instance pptrPage.

Assertions and Sinon Best Practices

  • Use sinon.assert methods: Do not use Node's assert.ok(stub.calledOnce) or assert.deepStrictEqual(stub.firstCall.args[0], ...) to verify stub calls.
  • Verify exact arguments:
    • Use sinon.assert.calledOnceWithExactly(stub, ...args) for single calls with exact arguments.
    • Use sinon.assert.calledWithExactly(stub.secondCall, ...args) for subsequent calls.
    • Use sinon.assert.notCalled(stub) to assert a method was not invoked.
  • Clean up stubs: Always include afterEach(() => sinon.restore()); in test suites when using Sinon.

Test Cleanliness

  • Do not add redundant comments or verbose JSDoc for short, self-describing mock functions or tests.
  • Only test real scenarios; avoid testing redundant or artificial calls that cannot happen in real usage.
  • Use current year (2026) in copyright headers for new test files.

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.