dev-tools-skill
Use when the user says "use the DevTools skill" or when they need help debugging a web app with Chrome DevTools MCP (UI bugs, incorrect behavior, console errors, network/API failures, or performance/lag), especially if the user seems inexperienced and needs guided, step-by-step diagnosis.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Dev Tools Skill
Overview
Use the Chrome DevTools MCP server to diagnose and fix frontend issues by observing the live page, gathering evidence (console, network, performance), and proposing targeted code changes.
Quick Start
- Confirm the user wants DevTools used (or they already asked).
- Open the target page, then take an a11y snapshot.
- Triage via console + network + quick DOM inspection.
- Choose the appropriate workflow below and follow it end-to-end.
- Summarize findings + propose the smallest safe fix.
Workflow Decision Tree
- UI/interaction bug (layout, hover/click, missing text): use UI/Interaction Workflow.
- Performance/lag (slow load, jank, long TTI): use Performance Workflow.
- API/network issue (failed fetch, wrong data): use Network Workflow.
- Runtime error (crash, blank screen, stack trace): use Console/Error Workflow.
Core Workflows
1) Triage (always first)
- Capture state:
list_pages→select_page→take_snapshot. - Scan for visible errors (missing sections, broken layout) in snapshot text.
- Check console messages (
list_console_messages, thenget_console_messagefor details). - Check network requests (
list_network_requests, thenget_network_requestfor errors/slow calls). - Form a hypothesis and select a workflow below.
2) UI/Interaction Workflow
- Use
take_snapshotto locate the target element; if unclear,take_screenshot. - Inspect element text/attributes via
evaluate_script(read-only DOM queries). - Reproduce the issue with
click,hover, orpress_key. - If layout is involved, measure box sizes/positions via
evaluate_script. - Propose minimal CSS/JS fixes; if unsure, ask 1 targeted question.
3) Performance Workflow
- Run a trace:
performance_start_trace(reload=true) → reproduce →performance_stop_trace. - Identify top issue via
performance_analyze_insight. - Correlate with network timings and large asset loads.
- Recommend fixes: reduce bundle size, defer non-critical JS, optimize images, avoid layout thrash.
4) Network Workflow
- List requests and find failures/slow endpoints.
- Open failing request details (
get_network_request), capture status, timing, payload. - Cross-check console for CORS or runtime fetch errors.
- Suggest fixes: endpoint URL, headers/auth, payload shape, caching, retries.
5) Console/Error Workflow
- Read console errors and stack traces in full.
- Identify the first failing module/function; map to code location if possible.
- Confirm if error is user-triggered vs load-time.
- Suggest smallest code change + safe rollback steps.
UX & Safety Rules
- Explain actions in plain language; assume the user is less experienced.
- Avoid submitting forms or destructive actions without explicit user confirmation.
- Keep fixes minimal and reversible; call out any risk.
References
- See
references/mcp-cheatsheet.mdfor MCP command usage. - See
references/debug-workflows.mdfor detailed steps and examples. - See
references/performance.mdfor perf triage patterns. - See
references/network.mdfor network debugging patterns. - See
references/ui-debug.mdfor DOM/layout debugging tips.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-28
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!