Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add terry-li-hm/skills --skill "chrome-automation"
Install specific skill from multi-skill repository
# Description
Reference skill for Claude in Chrome browser automation best practices. Not user-invocable β use as internal guidance when automating Chrome.
# SKILL.md
name: chrome-automation
description: Reference skill for Claude in Chrome browser automation best practices. Not user-invocable β use as internal guidance when automating Chrome.
user_invocable: false
platform: claude-code
platform_note: Reference for Claude in Chrome MCP tools. OpenClaw has equivalent browser tools with different API.
Chrome Automation Best Practices
Reference for Claude in Chrome MCP tools. Consult when doing browser automation.
Session Startup
- Always create a new tab at session start using
tabs_create_mcp - Only use tabs you created in this session β never reuse tab IDs from previous sessions
- If a tool returns "tab doesn't exist", call
tabs_context_mcpto get fresh tab IDs
Reading Page Content
read_pagecaptures the full accessibility tree including content below the viewport- No scrolling needed to get below-fold content
- Workflow: navigate β wait 2 seconds β
read_pageonce - Use
max_charsparameter if page is large (default 50000)
Window Sizing
- Resize window before
read_pageto reduce tokens - 800x600 for chat apps (WhatsApp, messaging)
- 1024x768 for general browsing
- Large viewports waste context on empty space
Page Load
- Always wait 2 seconds after navigation before reading
- If content shows loading placeholders, wait longer or refresh
- LinkedIn job pages may need extra time to hydrate
Common Gotchas
| Issue | Solution |
|---|---|
| Tab ID invalid | Call tabs_context_mcp to refresh |
| Content not loading | Wait longer, or navigate directly to URL |
| Screenshot from wrong tab | Verify tabId in tool response matches intended tab |
| LinkedIn "Saved" toggles | Clicking "Saved" unsaves β use three-dot menu for actions |
| WhatsApp message direction | Left/white = incoming, right/green = outgoing |
| Gmail contenteditable | form_input unreliable on Gmail compose β write draft to file instead |
Tool Selection
| Task | Tool |
|---|---|
| Get page structure/content | read_page |
| Extract article text | get_page_text |
| Click elements | computer with ref parameter |
| Type text | computer action=type |
| Navigate | navigate |
| Screenshot for debugging | computer action=screenshot |
| Create new tab | tabs_create_mcp |
| List available tabs | tabs_context_mcp |
Login-Required Sites
These sites return login walls via web scraping tools β must use browser automation:
- LinkedIn
- X/Twitter
- WhatsApp Web
- Gmail (for some operations)
Alerts and Dialogs
Avoid triggering JavaScript alerts, confirms, or prompts β they block all further browser events. If you must interact with dialog-triggering elements, warn the user first.
Session Cleanup
Always navigate to the idle page after completing browser automation tasks:
https://terry-li-hm.github.io/claude-home/
This keeps the browser in a clean, non-distracting state instead of leaving it on a logged-in dashboard or sensitive page. The idle page shows a minimal dark background with subtle day/time in the corner.
Related Skills
/evaluate-jobβ Uses Chrome for LinkedIn job extraction/review-saved-jobsβ Batch processes LinkedIn saved jobs
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.