AgentSkillsCN

general-chrome-validation

当用户在提示中提供 URL,或当您正在处理带有 Chrome 验证标签页 URL 的 /p 规范文档时,可使用此技能。

SKILL.md
--- frontmatter
name: general-chrome-validation
description: Use when user provides a URL in their prompt OR when working with a /p spec doc that has a Chrome Validation Tab URL

General: Chrome Browser Validation

Chrome browser automation via mcp__claude-in-chrome__* tools for visual validation.

When to Use

ConditionAction
/p spec doc has Chrome Validation Tab URLUse that URL after completing tasks
User provides URL in promptUse that URL after completing task
User says "check chrome" but no URLAsk user for the URL
No URL mentionedDo NOT offer Chrome validation

Mandatory Workflow

1. Get Tab Context (Always First)

code
mcp__claude-in-chrome__tabs_context_mcp

2. Get URL

Priority: 1) /p spec doc URL, 2) User prompt URL, 3) Ask user

3. Navigate and Validate

code
mcp__claude-in-chrome__navigate (url, tabId)
mcp__claude-in-chrome__computer (action: "screenshot", tabId)

4. Report Findings

  • What you observed
  • Whether implementation matches expectations
  • Any issues found

Available Tools

ToolPurpose
tabs_context_mcpGet available tabs (call first)
tabs_create_mcpCreate new tab
navigateNavigate to URL
computerScreenshot, click, type, scroll
read_pageGet accessibility tree
findFind elements by description
form_inputSet form field values
javascript_toolExecute JS in page
read_console_messagesRead browser console
get_page_textExtract text content

Base URL

App runs at: http://localhost:5173/ - assume dev server is always running.

Common Mistakes

  • ❌ Validate without URL trigger → ✅ Only validate when URL provided
  • ❌ Skip tabs_context_mcp → ✅ Always call it first
  • ❌ Guess URLs → ✅ Use exactly what user/spec provides
  • ❌ Attempt login → ✅ Assume tabs are authenticated
  • ❌ Reuse old tab IDs → ✅ Tab IDs change between sessions

When NOT to Use

  • User didn't provide URL and didn't mention Chrome
  • Backend-only changes
  • Changes verifiable via type checking alone
<!-- Last compacted: 2026-01-15 -->