ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified utilities Safety 4/5

Clash Auto Switch

Skill by adminlove520

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/adminlove520/clash-auto-switch
Or

What This Skill Does

Clash Auto Switch is a powerful automation skill for OpenClaw designed to manage and maintain your Clash proxy connections. It eliminates the hassle of manual network troubleshooting by continuously monitoring the health of your proxies. The skill features an intelligent health-check mechanism that validates connectivity against major services like Telegram, Google, and Anthropic. If a connection failure is detected, the skill automatically performs a latency test across your available nodes—prioritizing regions like Singapore, Japan, Hong Kong, and the US—and switches to the best-performing node without manual intervention. It also supports granular control through area-specific commands and proxy group management.

Installation

To integrate this skill into your environment, use the OpenClaw command-line interface:

clawhub install openclaw/skills/skills/adminlove520/clash-auto-switch

Once installed, you must configure your Clash API settings for the skill to communicate with your proxy instance. Run the following command in your terminal:

/clash config set --api http://127.0.0.1:58871 --secret YOUR_SECRET

Alternatively, you may set environment variables CLASH_API and CLASH_SECRET within your configuration file.

Use Cases

  • Automated Network Maintenance: Set up a Cron job to run /clash auto every 15 minutes, ensuring your proxy is always optimized for maximum throughput.
  • Instant Troubleshooting: When a streaming service or productivity tool hangs, simply ask the AI to check your network health to see if a switch is necessary.
  • Geographic Routing: Use specialized commands like /clash sg or /clash us to manually force traffic through specific regional nodes when accessing region-locked content.
  • Status Reporting: Quickly audit your entire proxy infrastructure using /clash list to see which groups and nodes are currently active.

Example Prompts

  1. "Check if my current proxy connection is healthy and working for Google and Telegram."
  2. "My internet feels slow while using ChatGPT, please find the best node and switch to it automatically."
  3. "I need to access content in Japan, please switch my proxy group to a Tokyo node."

Tips & Limitations

  • Proactive Monitoring: Integrate the /clash health command into your HEARTBEAT.md file to ensure you receive proactive alerts before you even notice connection drops.
  • Node Selection: The automatic switching logic favors specific geographic regions; ensure your Clash configuration includes these regions to get the best results.
  • Permissions: This skill requires network access to communicate with the Clash API and potentially external servers for health checking. Ensure your environment allows local socket communication.

Metadata

Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-adminlove520-clash-auto-switch": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#proxy#clash#network#automation#vpn
Safety Score: 4/5

Flags: network-access, external-api