Coding

Clashx Node Switcher

Try it

Control ClashX VPN via Peekaboo to test latency and switch to the US proxy node with the lowest latency using menu bar automation.

What it does

Overview Control ClashX VPN client via Peekaboo to switch between proxy nodes, prioritizing US nodes with lowest latency.

The skill document

ClashX Node Switcher

Overview

Control ClashX VPN client via Peekaboo to switch between proxy nodes, prioritizing US nodes with lowest latency.

Prerequisites

  • Peekaboo installed and permissions granted
  • ClashX running as menu bar app

Key Coordinates (1920x1080)

  • ClashX menu bar icon: (1578, 12) (found via peekaboo menubar list)
  • "延迟测速" menu item: Y ~340 from menu top
  • "国外流量" proxy group: Y ~65 from menu top

Workflow

1. Open ClashX Menu

peekaboo click --coords 1578,12

2. Run Latency Test (Cmd+T)

peekaboo hotkey --keys "cmd,t" --app ClashX
sleep 3  # Wait for test to complete

3. Wait for Results Dialog

The dialog shows "延迟测速完成" (Latency test complete). Capture screenshot to see results.

4. Dismiss Results and See Node List

peekaboo press return  # Close dialog
sleep 0.3
peekaboo click --coords 1578,12  # Reopen menu

5. Expand "国外流量" Submenu

Hover over "国外流量" or its current node to reveal submenu with all nodes:

peekaboo move 900,65  # Approximate position of 国外流量 row
sleep 0.3
screencapture -x /tmp/clash_nodes.png

6. Identify US Nodes

US nodes typically have names containing:

  • "美国"
  • "US"
  • "USA"
  • "美西" (US West)
  • "美东" (US East)

7. Switch to US Node with Lowest Latency

# Click on the desired US node in the submenu
peekaboo click --coords X,Y  # Coordinates of target US node

Notes

  • The menu is a menu bar app (no window), requires specific coordinates
  • Submenu appears to the right of the main menu when hovering
  • Only one US node (SSR-美国 8 中转) was visible in testing
  • Network issues may require trying multiple nodes

Debugging

# List menu bar items to find ClashX
peekaboo menubar list

# See full UI elements
peekaboo see --mode screen --screen-index 0

# Capture current screen
screencapture -x /tmp/screen.png

Error Handling

  • If menu doesn't open: Try clicking again
  • If submenu doesn't appear: Move mouse to trigger hover
  • If dialog doesn't dismiss: Try pressing Escape

Related skills

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván555 installs18 stars

Trade crypto, manage a multi-chain wallet, and query an AI analyst from one CLI.

by lowesyang162 installs109 stars

Query Twitter/X profiles, tweets, follower events, and KOL data through the 6551 REST API.

by infra403840 installs27 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai21 installs8 stars

More from shifengwang333-ai

Browse all skills

One CLI for real-time web search, vertical-domain queries, parallel batches, and URL content extraction.

by AnySearch

A股量化监控系统 - 7维度市场情绪评分、智能选股引擎(短线5策略+中长线7策略)、实时价格监控、涨跌幅排行榜。支持全市场5000+股票数据采集与分析,多指标共振评分,精确买卖点计算,动态止损止盈。每日自动推荐短线3-5只、中长线5-10只优质股票。包含Web界面、自动化Cron任务、历史数据回溯。适用于A股量化...

by shifengwang333-ai6 installs