[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EFXMX8EMRTXWTRS4SJKPBK":3,"skill-same:01M7EFXMX8EMRTXWTRS4SJKPBK":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7EFXMX8EMRTXWTRS4SJKPBK","claude-in-chrome-troubleshooting",null,"Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return \"Browser extension is not connected\", or behave erratically.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fclaude-in-chrome-troubleshooting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: claude-in-chrome-troubleshooting\ndescription: Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return \"Browser extension is not connected\", or behave erratically.\nrisk: critical\nsource: community\n---\n\n# Claude in Chrome MCP Troubleshooting\n\nUse this skill when Claude in Chrome MCP tools fail to connect or work unreliably.\n\n## When to Use\n- `mcp__claude-in-chrome__*` tools fail with \"Browser extension is not connected\"\n- Browser automation works erratically or times out\n- After updating Claude Code or Claude.app\n- When switching between Claude Code CLI and Claude.app (Cowork)\n- Native host process is running but MCP tools still fail\n\n## When NOT to Use\n\n- **Linux or Windows users** - This skill covers macOS-specific paths and tools (`~\u002FLibrary\u002FApplication Support\u002F`, `osascript`)\n- General Chrome automation issues unrelated to the Claude extension\n- Claude.app desktop issues (not browser-related)\n- Network connectivity problems\n- Chrome extension installation issues (use Chrome Web Store support)\n\n## The Claude.app vs Claude Code Conflict (Primary Issue)\n\n**Background:** When Claude.app added Cowork support (browser automation from the desktop app), it introduced a competing native messaging host that conflicts with Claude Code CLI.\n\n### Two Native Hosts, Two Socket Formats\n\n| Component | Native Host Binary | Socket Location |\n|-----------|-------------------|-----------------|\n| **Claude.app (Cowork)** | `\u002FApplications\u002FClaude.app\u002FContents\u002FHelpers\u002Fchrome-native-host` | `\u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F\u003CPID>.sock` |\n| **Claude Code CLI** | `~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F\u003Cversion> --chrome-native-host` | `$TMPDIR\u002Fclaude-mcp-browser-bridge-$USER` (single file) |\n\n### Why They Conflict\n\n1. Both register native messaging configs in Chrome:\n   - `com.anthropic.claude_browser_extension.json` → Claude.app helper\n   - `com.anthropic.claude_code_browser_extension.json` → Claude Code wrapper\n\n2. Chrome extension requests a native host by name\n3. If the wrong config is active, the wrong binary runs\n4. The wrong binary creates sockets in a format\u002Flocation the MCP client doesn't expect\n5. Result: \"Browser extension is not connected\" even though everything appears to be running\n\n### The Fix: Disable Claude.app's Native Host\n\n**If you use Claude Code CLI for browser automation (not Cowork):**\n\n```bash\n# Disable the Claude.app native messaging config\nmv ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json \\\n   ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json.disabled\n\n# Ensure the Claude Code config exists and points to the wrapper\ncat ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_code_browser_extension.json\n```\n\n**If you use Cowork (Claude.app) for browser automation:**\n\n```bash\n# Disable the Claude Code native messaging config\nmv ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_code_browser_extension.json \\\n   ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_code_browser_extension.json.disabled\n```\n\n**You cannot use both simultaneously.** Pick one and disable the other.\n\n### Toggle Script\n\nAdd this to `~\u002F.zshrc` or run directly:\n\n```bash\nchrome-mcp-toggle() {\n    local CONFIG_DIR=~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\n    local CLAUDE_APP=\"$CONFIG_DIR\u002Fcom.anthropic.claude_browser_extension.json\"\n    local CLAUDE_CODE=\"$CONFIG_DIR\u002Fcom.anthropic.claude_code_browser_extension.json\"\n\n    if [[ -f \"$CLAUDE_APP\" && ! -f \"$CLAUDE_APP.disabled\" ]]; then\n        # Currently using Claude.app, switch to Claude Code\n        mv \"$CLAUDE_APP\" \"$CLAUDE_APP.disabled\"\n        [[ -f \"$CLAUDE_CODE.disabled\" ]] && mv \"$CLAUDE_CODE.disabled\" \"$CLAUDE_CODE\"\n        echo \"Switched to Claude Code CLI\"\n        echo \"Restart Chrome and Claude Code to apply\"\n    elif [[ -f \"$CLAUDE_CODE\" && ! -f \"$CLAUDE_CODE.disabled\" ]]; then\n        # Currently using Claude Code, switch to Claude.app\n        mv \"$CLAUDE_CODE\" \"$CLAUDE_CODE.disabled\"\n        [[ -f \"$CLAUDE_APP.disabled\" ]] && mv \"$CLAUDE_APP.disabled\" \"$CLAUDE_APP\"\n        echo \"Switched to Claude.app (Cowork)\"\n        echo \"Restart Chrome to apply\"\n    else\n        echo \"Current state unclear. Check configs:\"\n        ls -la \"$CONFIG_DIR\"\u002Fcom.anthropic*.json* 2>\u002Fdev\u002Fnull\n    fi\n}\n```\n\nUsage: `chrome-mcp-toggle` then restart Chrome (and Claude Code if switching to CLI).\n\n## Quick Diagnosis\n\n```bash\n# 1. Which native host binary is running?\nps aux | grep chrome-native-host | grep -v grep\n# Claude.app: \u002FApplications\u002FClaude.app\u002FContents\u002FHelpers\u002Fchrome-native-host\n# Claude Code: ~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002FX.X.X --chrome-native-host\n\n# 2. Where is the socket?\n# For Claude Code (single file in TMPDIR):\nls -la \"$(getconf DARWIN_USER_TEMP_DIR)\u002Fclaude-mcp-browser-bridge-$USER\" 2>&1\n\n# For Claude.app (directory with PID files):\nls -la \u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F 2>&1\n\n# 3. What's the native host connected to?\nlsof -U 2>&1 | grep claude-mcp-browser-bridge\n\n# 4. Which configs are active?\nls ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic*.json\n```\n\n## Critical Insight\n\n**MCP connects at startup.** If the browser bridge wasn't ready when Claude Code started, the connection will fail for the entire session. The fix is usually: ensure Chrome + extension are running with correct config, THEN restart Claude Code.\n\n## Full Reset Procedure (Claude Code CLI)\n\n```bash\n# 1. Ensure correct config is active\nmv ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json \\\n   ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json.disabled 2>\u002Fdev\u002Fnull\n\n# 2. Update the wrapper to use latest Claude Code version\ncat > ~\u002F.claude\u002Fchrome\u002Fchrome-native-host \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fbash\nLATEST=$(ls -t ~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F 2>\u002Fdev\u002Fnull | head -1)\nexec \"$HOME\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F$LATEST\" --chrome-native-host\nEOF\nchmod +x ~\u002F.claude\u002Fchrome\u002Fchrome-native-host\n\n# 3. Kill existing native host and clean sockets\npkill -f chrome-native-host\nrm -rf \u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F\nrm -f \"$(getconf DARWIN_USER_TEMP_DIR)\u002Fclaude-mcp-browser-bridge-$USER\"\n\n# 4. Restart Chrome\nosascript -e 'quit app \"Google Chrome\"' && sleep 2 && open -a \"Google Chrome\"\n\n# 5. Wait for Chrome, click Claude extension icon\n\n# 6. Verify correct native host is running\nps aux | grep chrome-native-host | grep -v grep\n# Should show: ~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002FX.X.X --chrome-native-host\n\n# 7. Verify socket exists\nls -la \"$(getconf DARWIN_USER_TEMP_DIR)\u002Fclaude-mcp-browser-bridge-$USER\"\n\n# 8. Restart Claude Code\n```\n\n## Other Common Causes\n\n### Multiple Chrome Profiles\n\nIf you have the Claude extension installed in multiple Chrome profiles, each spawns its own native host and socket. This can cause confusion.\n\n**Fix:** Only enable the Claude extension in ONE Chrome profile.\n\n### Multiple Claude Code Sessions\n\nRunning multiple Claude Code instances can cause socket conflicts.\n\n**Fix:** Only run one Claude Code session at a time, or use `\u002Fmcp` to reconnect after closing other sessions.\n\n### Hardcoded Version in Wrapper\n\nThe wrapper at `~\u002F.claude\u002Fchrome\u002Fchrome-native-host` may have a hardcoded version that becomes stale after updates.\n\n**Diagnosis:**\n```bash\ncat ~\u002F.claude\u002Fchrome\u002Fchrome-native-host\n# Bad: exec \"\u002FUsers\u002F...\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F2.0.76\" --chrome-native-host\n# Good: Uses $(ls -t ...) to find latest\n```\n\n**Fix:** Use the dynamic version wrapper shown in the Full Reset Procedure above.\n\n### TMPDIR Not Set\n\nClaude Code expects `TMPDIR` to be set to find the socket.\n\n```bash\n# Check\necho $TMPDIR\n# Should show: \u002Fvar\u002Ffolders\u002FXX\u002F...\u002FT\u002F\n\n# Fix: Add to ~\u002F.zshrc\nexport TMPDIR=\"${TMPDIR:-$(getconf DARWIN_USER_TEMP_DIR)}\"\n```\n\n## Diagnostic Deep Dive\n\n```bash\necho \"=== Native Host Binary ===\"\nps aux | grep chrome-native-host | grep -v grep\n\necho -e \"\\n=== Socket (Claude Code location) ===\"\nls -la \"$(getconf DARWIN_USER_TEMP_DIR)\u002Fclaude-mcp-browser-bridge-$USER\" 2>&1\n\necho -e \"\\n=== Socket (Claude.app location) ===\"\nls -la \u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F 2>&1\n\necho -e \"\\n=== Native Host Open Files ===\"\npgrep -f chrome-native-host | xargs -I {} lsof -p {} 2>\u002Fdev\u002Fnull | grep -E \"(sock|claude-mcp)\"\n\necho -e \"\\n=== Active Native Messaging Configs ===\"\nls ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic*.json 2>\u002Fdev\u002Fnull\n\necho -e \"\\n=== Custom Wrapper Contents ===\"\ncat ~\u002F.claude\u002Fchrome\u002Fchrome-native-host 2>\u002Fdev\u002Fnull || echo \"No custom wrapper\"\n\necho -e \"\\n=== TMPDIR ===\"\necho \"TMPDIR=$TMPDIR\"\necho \"Expected: $(getconf DARWIN_USER_TEMP_DIR)\"\n```\n\n## File Reference\n\n| File | Purpose |\n|------|---------|\n| `~\u002F.claude\u002Fchrome\u002Fchrome-native-host` | Custom wrapper script for Claude Code |\n| `\u002FApplications\u002FClaude.app\u002FContents\u002FHelpers\u002Fchrome-native-host` | Claude.app (Cowork) native host |\n| `~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F\u003Cversion>` | Claude Code binary (run with `--chrome-native-host`) |\n| `~\u002FLibrary\u002FApplication Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json` | Config for Claude.app native host |\n| `~\u002FLibrary\u002FApplication Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_code_browser_extension.json` | Config for Claude Code native host |\n| `$TMPDIR\u002Fclaude-mcp-browser-bridge-$USER` | Socket file (Claude Code) |\n| `\u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F\u003CPID>.sock` | Socket files (Claude.app) |\n\n## Summary\n\n1. **Primary issue:** Claude.app (Cowork) and Claude Code use different native hosts with incompatible socket formats\n2. **Fix:** Disable the native messaging config for whichever one you're NOT using\n3. **After any fix:** Must restart Chrome AND Claude Code (MCP connects at startup)\n4. **One profile:** Only have Claude extension in one Chrome profile\n5. **One session:** Only run one Claude Code instance\n\n---\n\n*Original skill by [@jeffzwang](https:\u002F\u002Fgithub.com\u002Fjeffzwang) from [@ExaAILabs](https:\u002F\u002Fgithub.com\u002FExaAILabs). Enhanced and updated for current versions of Claude Desktop and Claude Code.*\n","# Claude in Chrome MCP Troubleshooting\n\nUse this skill when Claude in Chrome MCP tools fail to connect or work unreliably.\n\n## When to Use\n- `mcp__claude-in-chrome__*` tools fail with \"Browser extension is not connected\"\n- Browser automation works erratically or times out\n- After updating Claude Code or Claude.app\n- When switching between Claude Code CLI and Claude.app (Cowork)\n- Native host process is running but MCP tools still fail\n\n## When NOT to Use\n\n- **Linux or Windows users** - This skill covers macOS-specific paths and tools (`~\u002FLibrary\u002FApplication Support\u002F`, `osascript`)\n- General Chrome automation issues unrelated to the Claude extension\n- Claude.app desktop issues (not browser-related)\n- Network connectivity problems\n- Chrome extension installation issues (use Chrome Web Store support)\n\n## The Claude.app vs Claude Code Conflict (Primary Issue)\n\n**Background:** When Claude.app added Cowork support (browser automation from the desktop app), it introduced a competing native messaging host that conflicts with Claude Code CLI.\n\n### Two Native Hosts, Two Socket Formats\n\n| Component | Native Host Binary | Socket Location |\n|-----------|-------------------|-----------------|\n| **Claude.app (Cowork)** | `\u002FApplications\u002FClaude.app\u002FContents\u002FHelpers\u002Fchrome-native-host` | `\u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F\u003CPID>.sock` |\n| **Claude Code CLI** | `~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F\u003Cversion> --chrome-native-host` | `$TMPDIR\u002Fclaude-mcp-browser-bridge-$USER` (single file) |\n\n### Why They Conflict\n\n1. Both register native messaging configs in Chrome:\n   - `com.anthropic.claude_browser_extension.json` → Claude.app helper\n   - `com.anthropic.claude_code_browser_extension.json` → Claude Code wrapper\n\n2. Chrome extension requests a native host by name\n3. If the wrong config is active, the wrong binary runs\n4. The wrong binary creates sockets in a format\u002Flocation the MCP client doesn't expect\n5. Result: \"Browser extension is not connected\" even though everything appears to be running\n\n### The Fix: Disable Claude.app's Native Host\n\n**If you use Claude Code CLI for browser automation (not Cowork):**\n\n```bash\n# Disable the Claude.app native messaging config\nmv ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json \\\n   ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json.disabled\n\n# Ensure the Claude Code config exists and points to the wrapper\ncat ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_code_browser_extension.json\n```\n\n**If you use Cowork (Claude.app) for browser automation:**\n\n```bash\n# Disable the Claude Code native messaging config\nmv ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_code_browser_extension.json \\\n   ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_code_browser_extension.json.disabled\n```\n\n**You cannot use both simultaneously.** Pick one and disable the other.\n\n### Toggle Script\n\nAdd this to `~\u002F.zshrc` or run directly:\n\n```bash\nchrome-mcp-toggle() {\n    local CONFIG_DIR=~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\n    local CLAUDE_APP=\"$CONFIG_DIR\u002Fcom.anthropic.claude_browser_extension.json\"\n    local CLAUDE_CODE=\"$CONFIG_DIR\u002Fcom.anthropic.claude_code_browser_extension.json\"\n\n    if [[ -f \"$CLAUDE_APP\" && ! -f \"$CLAUDE_APP.disabled\" ]]; then\n        # Currently using Claude.app, switch to Claude Code\n        mv \"$CLAUDE_APP\" \"$CLAUDE_APP.disabled\"\n        [[ -f \"$CLAUDE_CODE.disabled\" ]] && mv \"$CLAUDE_CODE.disabled\" \"$CLAUDE_CODE\"\n        echo \"Switched to Claude Code CLI\"\n        echo \"Restart Chrome and Claude Code to apply\"\n    elif [[ -f \"$CLAUDE_CODE\" && ! -f \"$CLAUDE_CODE.disabled\" ]]; then\n        # Currently using Claude Code, switch to Claude.app\n        mv \"$CLAUDE_CODE\" \"$CLAUDE_CODE.disabled\"\n        [[ -f \"$CLAUDE_APP.disabled\" ]] && mv \"$CLAUDE_APP.disabled\" \"$CLAUDE_APP\"\n        echo \"Switched to Claude.app (Cowork)\"\n        echo \"Restart Chrome to apply\"\n    else\n        echo \"Current state unclear. Check configs:\"\n        ls -la \"$CONFIG_DIR\"\u002Fcom.anthropic*.json* 2>\u002Fdev\u002Fnull\n    fi\n}\n```\n\nUsage: `chrome-mcp-toggle` then restart Chrome (and Claude Code if switching to CLI).\n\n## Quick Diagnosis\n\n```bash\n# 1. Which native host binary is running?\nps aux | grep chrome-native-host | grep -v grep\n# Claude.app: \u002FApplications\u002FClaude.app\u002FContents\u002FHelpers\u002Fchrome-native-host\n# Claude Code: ~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002FX.X.X --chrome-native-host\n\n# 2. Where is the socket?\n# For Claude Code (single file in TMPDIR):\nls -la \"$(getconf DARWIN_USER_TEMP_DIR)\u002Fclaude-mcp-browser-bridge-$USER\" 2>&1\n\n# For Claude.app (directory with PID files):\nls -la \u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F 2>&1\n\n# 3. What's the native host connected to?\nlsof -U 2>&1 | grep claude-mcp-browser-bridge\n\n# 4. Which configs are active?\nls ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic*.json\n```\n\n## Critical Insight\n\n**MCP connects at startup.** If the browser bridge wasn't ready when Claude Code started, the connection will fail for the entire session. The fix is usually: ensure Chrome + extension are running with correct config, THEN restart Claude Code.\n\n## Full Reset Procedure (Claude Code CLI)\n\n```bash\n# 1. Ensure correct config is active\nmv ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json \\\n   ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json.disabled 2>\u002Fdev\u002Fnull\n\n# 2. Update the wrapper to use latest Claude Code version\ncat > ~\u002F.claude\u002Fchrome\u002Fchrome-native-host \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fbash\nLATEST=$(ls -t ~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F 2>\u002Fdev\u002Fnull | head -1)\nexec \"$HOME\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F$LATEST\" --chrome-native-host\nEOF\nchmod +x ~\u002F.claude\u002Fchrome\u002Fchrome-native-host\n\n# 3. Kill existing native host and clean sockets\npkill -f chrome-native-host\nrm -rf \u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F\nrm -f \"$(getconf DARWIN_USER_TEMP_DIR)\u002Fclaude-mcp-browser-bridge-$USER\"\n\n# 4. Restart Chrome\nosascript -e 'quit app \"Google Chrome\"' && sleep 2 && open -a \"Google Chrome\"\n\n# 5. Wait for Chrome, click Claude extension icon\n\n# 6. Verify correct native host is running\nps aux | grep chrome-native-host | grep -v grep\n# Should show: ~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002FX.X.X --chrome-native-host\n\n# 7. Verify socket exists\nls -la \"$(getconf DARWIN_USER_TEMP_DIR)\u002Fclaude-mcp-browser-bridge-$USER\"\n\n# 8. Restart Claude Code\n```\n\n## Other Common Causes\n\n### Multiple Chrome Profiles\n\nIf you have the Claude extension installed in multiple Chrome profiles, each spawns its own native host and socket. This can cause confusion.\n\n**Fix:** Only enable the Claude extension in ONE Chrome profile.\n\n### Multiple Claude Code Sessions\n\nRunning multiple Claude Code instances can cause socket conflicts.\n\n**Fix:** Only run one Claude Code session at a time, or use `\u002Fmcp` to reconnect after closing other sessions.\n\n### Hardcoded Version in Wrapper\n\nThe wrapper at `~\u002F.claude\u002Fchrome\u002Fchrome-native-host` may have a hardcoded version that becomes stale after updates.\n\n**Diagnosis:**\n```bash\ncat ~\u002F.claude\u002Fchrome\u002Fchrome-native-host\n# Bad: exec \"\u002FUsers\u002F...\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F2.0.76\" --chrome-native-host\n# Good: Uses $(ls -t ...) to find latest\n```\n\n**Fix:** Use the dynamic version wrapper shown in the Full Reset Procedure above.\n\n### TMPDIR Not Set\n\nClaude Code expects `TMPDIR` to be set to find the socket.\n\n```bash\n# Check\necho $TMPDIR\n# Should show: \u002Fvar\u002Ffolders\u002FXX\u002F...\u002FT\u002F\n\n# Fix: Add to ~\u002F.zshrc\nexport TMPDIR=\"${TMPDIR:-$(getconf DARWIN_USER_TEMP_DIR)}\"\n```\n\n## Diagnostic Deep Dive\n\n```bash\necho \"=== Native Host Binary ===\"\nps aux | grep chrome-native-host | grep -v grep\n\necho -e \"\\n=== Socket (Claude Code location) ===\"\nls -la \"$(getconf DARWIN_USER_TEMP_DIR)\u002Fclaude-mcp-browser-bridge-$USER\" 2>&1\n\necho -e \"\\n=== Socket (Claude.app location) ===\"\nls -la \u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F 2>&1\n\necho -e \"\\n=== Native Host Open Files ===\"\npgrep -f chrome-native-host | xargs -I {} lsof -p {} 2>\u002Fdev\u002Fnull | grep -E \"(sock|claude-mcp)\"\n\necho -e \"\\n=== Active Native Messaging Configs ===\"\nls ~\u002FLibrary\u002FApplication\\ Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic*.json 2>\u002Fdev\u002Fnull\n\necho -e \"\\n=== Custom Wrapper Contents ===\"\ncat ~\u002F.claude\u002Fchrome\u002Fchrome-native-host 2>\u002Fdev\u002Fnull || echo \"No custom wrapper\"\n\necho -e \"\\n=== TMPDIR ===\"\necho \"TMPDIR=$TMPDIR\"\necho \"Expected: $(getconf DARWIN_USER_TEMP_DIR)\"\n```\n\n## File Reference\n\n| File | Purpose |\n|------|---------|\n| `~\u002F.claude\u002Fchrome\u002Fchrome-native-host` | Custom wrapper script for Claude Code |\n| `\u002FApplications\u002FClaude.app\u002FContents\u002FHelpers\u002Fchrome-native-host` | Claude.app (Cowork) native host |\n| `~\u002F.local\u002Fshare\u002Fclaude\u002Fversions\u002F\u003Cversion>` | Claude Code binary (run with `--chrome-native-host`) |\n| `~\u002FLibrary\u002FApplication Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_browser_extension.json` | Config for Claude.app native host |\n| `~\u002FLibrary\u002FApplication Support\u002FGoogle\u002FChrome\u002FNativeMessagingHosts\u002Fcom.anthropic.claude_code_browser_extension.json` | Config for Claude Code native host |\n| `$TMPDIR\u002Fclaude-mcp-browser-bridge-$USER` | Socket file (Claude Code) |\n| `\u002Ftmp\u002Fclaude-mcp-browser-bridge-$USER\u002F\u003CPID>.sock` | Socket files (Claude.app) |\n\n## Summary\n\n1. **Primary issue:** Claude.app (Cowork) and Claude Code use different native hosts with incompatible socket formats\n2. **Fix:** Disable the native messaging config for whichever one you're NOT using\n3. **After any fix:** Must restart Chrome AND Claude Code (MCP connects at startup)\n4. **One profile:** Only have Claude extension in one Chrome profile\n5. **One session:** Only run one Claude Code instance\n\n---\n\n*Original skill by [@jeffzwang](https:\u002F\u002Fgithub.com\u002Fjeffzwang) from [@ExaAILabs](https:\u002F\u002Fgithub.com\u002FExaAILabs). Enhanced and updated for current versions of Claude Desktop and Claude Code.*\n",{"name":5,"risk":24,"source":25,"description":7},"critical","community","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fclaude-in-chrome-troubleshooting",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill claude-in-chrome-troubleshooting",{"tool":40,"command":41},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill claude-in-chrome-troubleshooting",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill claude-in-chrome-troubleshooting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fclaude-in-chrome-troubleshooting\u002FSKILL.md",true,[],[49,57,62,69,76,83],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":56},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":58,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":56},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":56},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":56},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":56},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":56},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]