xiaohongshu
xiaohongshu
chrome-browser-automation
Automates Chrome browser workflows for testing web apps, debugging with console/network logs, extracting data, filling forms, and interacting with authenticated web applications (Google Docs, Gmail, Notion). Use when testing local web apps, debugging frontend issues, automating data entry, scrapi...
Full skill instructions
Test a local web application with console monitoring:
User: "Open localhost:3000 and check for console errors when I submit the login form"
1. Get tab context: tabs_context_mcp(createIfEmpty=true)
2. Navigate to app: navigate(url="http://localhost:3000", tabId=<id>)
3. Monitor console: read_console_messages(tabId=<id>, onlyErrors=true)
4. Fill form: form_input(ref="email", value="[email protected]", tabId=<id>)
5. Submit: computer(action="left_click", ref="submit-btn", tabId=<id>)
6. Check errors: read_console_messages(tabId=<id>, onlyErrors=true)
7. Check network: read_network_requests(tabId=<id>, urlPattern="/api/")
8. Report findings with specific error messages and failed requests
Key advantage: Chain browser actions with terminal commands in a single workflow.
Explicit Triggers:
Implicit Triggers:
Debugging Triggers:
Chrome integration enables six core capabilities:
Required:
claude --version)Enable Chrome integration:
# Start with Chrome enabled
claude --chrome
# Or enable from within session
/chrome
Verify connection:
# Check status and manage settings
/chrome
# List available MCP tools
/mcp
# Click into 'claude-in-chrome' to see all tools
Enable by default (optional):
Run /chrome and select "Enabled by default" to avoid --chrome flag each time.
Note: Chrome integration requires a visible browser window. You'll see Chrome open and navigate in real time - there's no headless mode.
Pattern: Test local development server
Workflow:
1. tabs_context_mcp(createIfEmpty=true) → Get tabId
2. navigate(url="http://localhost:3000", tabId=<id>)
3. computer(action="screenshot", tabId=<id>) → Visual verification
4. form_input(ref="username", value="testuser", tabId=<id>)
5. computer(action="left_click", ref="submit", tabId=<id>)
6. read_console_messages(tabId=<id>, onlyErrors=true)
7. read_network_requests(tabId=<id>, urlPattern="/api/auth")
8. Report: Success/failure with specific errors or network issues
Common testing scenarios:
Example request:
"I just updated the signup form. Can you test it on localhost:3000?
Try submitting with invalid email, then valid data, and check if
the success message appears."
Pattern: Investigate frontend errors
Workflow:
1. tabs_context_mcp() → Get current tab
2. read_console_messages(
tabId=<id>,
pattern="error|exception|failed",
onlyErrors=true
)
3. read_network_requests(
tabId=<id>,
urlPattern="/api/",
filterStatus=[400, 401, 403, 404, 500, 502, 503]
)
4. Analyze errors:
- Console: TypeError, ReferenceError, network failures
- Network: Failed requests, 401 unauthorized, 500 server errors
5. Identify root cause (missing API endpoint, CORS issue, auth token expired)
6. Suggest fix in codebase (update API call, add error handling, fix endpoint)
Example request:
"The dashboard page is throwing errors. Can you check what's failing?"
Common debugging patterns:
See references/debugging-patterns.md for comprehensive error analysis workflows.
Pattern: Scrape structured data from web pages
Workflow:
1. tabs_context_mcp(createIfEmpty=true)
2. navigate(url="https://example.com/products", tabId=<id>)
3. get_page_text(tabId=<id>) → Full page text
4. Parse structured data:
- Product names
- Prices
- Availability
- URLs
5. Save to CSV/JSON:
Write(file_path="products.csv", content=<data>)
6. Report: "Extracted 47 products to products.csv"
Example request:
"Go to the product listings page and extract the name, price, and
availability for each item. Save as CSV."
Advanced extraction:
See examples/data-extraction-examples.md for complex scraping workflows.
Pattern: Automate repetitive data entry
Workflow:
1. Read local data: Read(file_path="contacts.csv")
2. Parse CSV rows
3. For each row:
a. tabs_context_mcp()
b. navigate(url="https://crm.example.com/add-contact", tabId=<id>)
c. form_input(ref="name", value=row.name, tabId=<id>)
d. form_input(ref="email", value=row.email, tabId=<id>)
e. form_input(ref="phone", value=row.phone, tabId=<id>)
f. computer(action="left_click", ref="submit", tabId=<id>)
g. Wait for confirmation
4. Report: "Processed 15 contacts successfully"
Example request:
"I have customer contacts in contacts.csv. For each row, go to
our CRM and fill in the contact form."
Form filling tips:
form_input for text fields (faster than typing)computer(action="left_click") for buttonscomputer(action="type") for rich text editorsPattern: Interact with Google Docs, Gmail, Notion
Workflow:
1. tabs_context_mcp() → Access existing logged-in session
2. navigate(url="https://docs.google.com/document/d/abc123", tabId=<id>)
3. computer(action="left_click", coordinate=[400, 300], tabId=<id>) → Click into editor
4. computer(action="type", text="Meeting notes:\n- Discussed Q1 roadmap", tabId=<id>)
5. Verify: get_page_text(tabId=<id>) → Check content saved
6. Report: "Added meeting notes to Google Doc"
Example request:
"Draft a project update based on recent commits and add it to my
Google Doc at docs.google.com/document/d/abc123"
Supported authenticated apps:
Authentication handling:
Pattern: Coordinate tasks across multiple websites
Workflow:
1. Check calendar for meetings tomorrow
- navigate(url="https://calendar.google.com", tabId=<id>)
- get_page_text(tabId=<id>)
- Extract meeting attendees
2. For each external attendee:
- tabs_create_mcp() → New tab
- navigate(url="https://linkedin.com/in/{name}", tabId=<new-id>)
- get_page_text(tabId=<new-id>)
- Extract company info
3. Return to calendar tab
- navigate(url="https://calendar.google.com/event/{id}", tabId=<id>)
- Add note about attendee's company
4. Report: "Added context notes for 3 external meetings"
Example request:
"Check my calendar for meetings tomorrow, then for each meeting with
an external attendee, look up their company on LinkedIn and add a
note about what they do."
Tab management:
tabs_context_mcp() - Get current tab infotabs_create_mcp() - Create new tabCore Navigation:
navigate(url, tabId) - Navigate to URLcomputer(action="left_click", coordinate/ref, tabId) - Click elementcomputer(action="type", text, tabId) - Type textform_input(ref, value, tabId) - Fill form field (faster than typing)Data Retrieval:
get_page_text(tabId) - Get full page textread_page(tabId) - Get page content with structurefind(selector, tabId) - Find elements matching selectorDebugging:
read_console_messages(tabId, pattern, onlyErrors) - Get console logsread_network_requests(tabId, urlPattern, filterStatus) - Get network requestsTab Management:
tabs_context_mcp(createIfEmpty) - Get current tab info (always call first)tabs_create_mcp() - Create new tabbrowser_close(tabId) - Close tabRecording:
gif_creator(action="start_recording", tabId) - Start GIF recordinggif_creator(action="stop_recording", tabId) - Stop recordinggif_creator(action="export", tabId, filename, options) - Export GIFVisual:
computer(action="screenshot", tabId) - Take screenshotbrowser_resize(width, height, tabId) - Resize browser windowFor detailed parameter schemas, run:
mcp-cli info claude-in-chrome/<tool-name>
See references/mcp-tool-reference.md for comprehensive parameter documentation.
Always start with tab context:
tabs_context_mcp(createIfEmpty=true) → Get tabId
Without this, you won't have a valid tabId for subsequent operations.
Handle authentication gracefully:
Monitor console and network during testing:
read_console_messages(tabId=<id>, onlyErrors=true)
read_network_requests(tabId=<id>, urlPattern="/api/")
Report specific errors, not generic "something failed".
Use appropriate input methods:
form_input - Text fields (fast, reliable)computer(action="type") - Rich text editors, contenteditablecomputer(action="left_click") - Buttons, links, dropdownsWait for page loads:
navigate(url="...", tabId=<id>)
computer(action="wait", duration=2, tabId=<id>) → Let page load
Dynamic content (AJAX, React) needs time to render.
Filter console output:
read_console_messages(
tabId=<id>,
pattern="error|exception|failed",
onlyErrors=true
)
Console logs can be verbose - focus on errors.
Dismiss modal dialogs manually: JavaScript alerts/confirms block browser events. If a dialog appears, ask user to dismiss it and tell Claude to continue.
Fresh tabs for unresponsive sessions: If a tab becomes unresponsive, create a new tab:
tabs_create_mcp() → New tabId
Extension not detected:
claude --version)/chrome → "Reconnect extension"Browser not responding:
First-time setup issues: First use installs native messaging host. If permission errors occur, restart Chrome.
Console/network requests not appearing:
Form input not working:
find to locate)computer(action="type") instead of form_inputcomputer(action="left_click", ref=<field>)See references/troubleshooting.md for detailed diagnostic workflows.
With chrome-gif-recorder: Record visual tutorials of web workflows with annotations.
With quality-code-review: Test changes in browser before committing (verify UI works correctly).
With observability-analyze-logs: Combine application logs with browser console for full-stack debugging.
With create-adr-spike: Research libraries by navigating documentation sites and extracting examples.
Example integrated workflow:
1. Make code changes (terminal)
2. Test in browser with console monitoring (chrome-browser-automation)
3. Record successful demo as GIF (chrome-gif-recorder)
4. Run quality gates (quality-run-quality-gates)
5. Commit with proof-of-work GIF (git commit)
references/
mcp-tool-reference.md - Detailed MCP tool parameters and schemasdebugging-patterns.md - Console/network error analysis workflowstroubleshooting.md - Common issues and diagnostic proceduresexamples/
testing-examples.md - Web app testing patterns (form validation, user flows)data-extraction-examples.md - Scraping workflows (pagination, dynamic content)authenticated-app-examples.md - Google Docs, Gmail, Notion workflowsmulti-site-examples.md - Complex multi-tab coordination patternsSuccessful web app test:
✅ Web App Tested Successfully
URL: http://localhost:3000/login
Test: Form validation with invalid/valid data
Console: 0 errors
Network: POST /api/auth → 200 OK (token received)
Result: Success message displayed correctly
All validations passed!
Debugging with errors found:
⚠️ Frontend Issues Detected
Console Errors:
1. TypeError: Cannot read property 'name' of undefined
- File: dashboard.js:42
- Cause: API response missing 'user' object
Network Failures:
1. GET /api/user/preferences → 401 Unauthorized
- Cause: Auth token expired
Recommendations:
1. Add null check: user?.name || 'Unknown'
2. Refresh auth token before API call
Data extraction success:
✅ Data Extracted Successfully
Source: https://example.com/products
Extracted: 47 products
Fields: name, price, availability, url
Output: products.csv (8KB)
Sample data:
- Widget Pro, $49.99, In Stock, /products/widget-pro
- Gadget Plus, $79.99, Backordered, /products/gadget-plus
| Metric | Before | After | Improvement |
|---|---|---|---|
| Frontend debugging time | 15-30 min | 3-5 min | 80% faster |
| Form automation (50 entries) | 60 min manual | 5 min automated | 90% faster |
| Multi-site data gathering | 30 min | 5 min | 83% faster |
| Test coverage (manual check) | Ad-hoc | Systematic | 100% reliability |
A successful browser automation workflow meets these criteria:
✅ Tab context retrieved before operations ✅ Navigation completed successfully ✅ Console/network monitoring included for testing ✅ Specific errors reported (not generic failures) ✅ Data extraction validated (row counts, field completeness) ✅ Form submissions confirmed (success messages visible) ✅ Authentication handled gracefully (no credential exposure) ✅ Results saved locally (CSV, JSON, screenshots)
Browser: Chrome with Claude in Chrome extension v1.0.36+, visible window required
CLI: Claude Code v2.0.73+, started with --chrome flag or /chrome enabled
Permissions: Chrome extension permissions for target sites (manage in extension settings)
Network: Internet access for web navigation, local server access for development testing
tabs_context_mcp() firstform_input for fields, type for rich textArchitecture:
Privacy:
Performance:
Limitations:
Context usage:
--chrome by default increases context usage (all tools loaded)/chrome to check current settingsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience