Repository navigation
docs: add skill and mcp for chrome-devtools - #8788
Conversation
|
There was a problem hiding this comment.
🟡 Changes recommended
The viewport checks can misclassify hidden or offscreen images, producing harmful loading recommendations; both checks need nonzero rectangles intersecting the viewport on both axes while preserving the priority check’s size threshold.
1 open issue
What changed in this PR
This PR adds Chrome DevTools tooling and agent guidance for profiling and debugging Primer React, without changing package runtime behavior.
Changes:
- Configure Chrome DevTools MCP with memory debugging enabled and usage statistics and CrUX lookups disabled.
- Add browser, performance, memory, accessibility, and LCP investigation skills and references.
- Rename
write-skilltoskilland document external skill installation.
| File | Description |
|---|---|
.mcp.json |
Register the Chrome DevTools MCP server. |
.agents/skills/skill/SKILL.md |
Rename the skill and add installation guidance. |
.agents/skills/performance/SKILL.md |
Define a measurement-driven performance workflow. |
.agents/skills/performance/references/browser.md |
Document browser profiling and evidence collection. |
.agents/skills/memory-leak-debugging/SKILL.md |
Add heap comparison and retention analysis guidance. |
.agents/skills/memory-leak-debugging/references/common-leaks.md |
Describe common memory leaks and remedies. |
.agents/skills/debug-optimize-lcp/SKILL.md |
Add an LCP investigation workflow. |
.agents/skills/debug-optimize-lcp/references/optimization-strategies.md |
Describe optimization options by LCP subpart. |
.agents/skills/debug-optimize-lcp/references/lcp-snippets.md |
Add LCP identification and image-loading audit snippets. |
.agents/skills/debug-optimize-lcp/references/lcp-breakdown.md |
Explain LCP timing subparts. |
.agents/skills/debug-optimize-lcp/references/elements-and-size.md |
Document LCP element eligibility and sizing. |
.agents/skills/chrome-devtools/SKILL.md |
Add MCP inspection and interaction guidance. |
.agents/skills/chrome-devtools/LICENSE |
Include the upstream Apache 2.0 license. |
.agents/skills/chrome-devtools-cli/SKILL.md |
Document CLI commands and browser automation. |
.agents/skills/chrome-devtools-cli/references/installation.md |
Explain CLI installation and troubleshooting. |
.agents/skills/a11y-debugging/SKILL.md |
Add accessibility auditing workflows. |
.agents/skills/a11y-debugging/references/a11y-snippets.md |
Provide accessibility inspection snippets. |
Review effort: Balanced
| if (rect.top < window.innerHeight) { | ||
| issues.push({ | ||
| issue: 'lazy-loaded image in viewport', | ||
| element: img.outerHTML.substring(0, 200), | ||
| fix: 'Remove loading="lazy" from this image — it is in the initial viewport and may be the LCP element', | ||
| }); | ||
| } | ||
| }); | ||
|
|
||
| // Check for LCP-candidate images missing fetchpriority | ||
| document.querySelectorAll('img:not([fetchpriority])').forEach(img => { | ||
| const rect = img.getBoundingClientRect(); | ||
| if (rect.top < window.innerHeight && rect.width * rect.height > 50000) { |

Add the MCP config and skills for chrome-devtools to help with profiling 👀
Changelog
New
chrome-devtoolsChanged
write-skillskill to justskillRemoved
Rollout strategy
This is a change to skills only