agentleFS
FuDesign2008FuDesign2008/open-skills/skills/astrill-control/SKILL.md

astrill-control

Skill6 starsChanged 6 days agoMITView on GitHub

Control Astrill VPN on macOS through its menu-bar GUI: status (app / tunnel / GUI menu / exit IP), connect, disconnect — all idempotent, verified by dual probes (tunnel process + exit IP) plus GUI menu state. Use whenever the user mentions Astrill, asks to turn the VPN on or off, connect or disconnect the VPN, check VPN status or exit IP, or needs to switch VPN state around network-sensitive steps where one platform requires the proxy and another requires a direct connection. Prerequisite (one-time): the app hosting the agent holds the macOS Accessibility permission. Do NOT use for other VPN clients or general network debugging. Triggers — 「Astrill」「打开 VPN」「连接 VPN」「VPN 开」「VPN on」「断开 VPN」「关掉 VPN」「VPN 关」「VPN off」「查 VPN 状态」「VPN 状态」「切换 VPN」「VPN 出口 IP」 / Astrill, turn on VPN, connect VPN, disconnect VPN, turn off VPN, check VPN status, toggle VPN, VPN exit IP.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the bundled script from this skill's base directory (the directory containing this SKILL.md):

    line 14
  2. Distinctive:

    Teardown latency: after Toggle OFF the tunnel process exits ~10 s later than the UI flips.

    line 42
  3. Very specific:

    Bash pitfall when editing the script: after a $var, a CJK/full-width character makes bash merge the following UTF-8 bytes into the variable …

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Astrill VPN Control (macOS Menu-Bar Toggle + Dual-Probe Verification)

The Astrill macOS app ships no official CLI. Its menu-bar item Menu → Toggle ON/OFF can be located and clicked via AppleScript (System Events), and the menu item text mirrors the connection state — that menu anchor is what this skill relies on. Field-tested 2026-08-28 on OpenVPN full-tunnel mode with an on↔off round-trip.

Usage

Run the bundled script from this skill's base directory (the directory containing this SKILL.md):

bash <skill-dir>/scripts/astrill.sh status   # inspect: app / tunnel / GUI menu / exit IP
bash <skill-dir>/scripts/astrill.sh on       # connect (idempotent: no-op when already connected)
bash <skill-dir>/scripts/astrill.sh off      # disconnect (idempotent: no-op when already disconnected; app stays alive)

Resolve <skill-dir> from the skill base directory announced at load time; when unavailable, ask the user for the installed skill path.

State Machine and Probes

SignalHow collectedMeaning
App processpgrep -x astrillprerequisite for GUI control; kept alive after off so on reconnects faster
VPN tunnelpgrep -x asovpncprimary judge under OpenVPN mode; teardown takes ~10 s (script polls through it)
GUI menuSystem Events reads items of the Menu menuToggle OFF present = connected; Toggle ON present = disconnected
Exit IPcurl --max-time 6 ipinfo.io/ipcross-check: connected → foreign node IP; disconnected → local direct IP

on and off are idempotent: each first reads the current state and returns success immediately when the desired state already holds.

One-Time Prerequisite: Accessibility Permission

The app that hosts the agent (terminal, IDE, or desktop app) must hold the macOS Accessibility permission: System Settings → Privacy & Security → Accessibility → add the host app. Without it the script reports GUI unreachable and the status output names the cause.

Known Boundaries

  • OpenVPN vs OpenWeb: probes are most accurate under OpenVPN (full tunnel). In OpenWeb (browser-only proxy) mode the asovpnc tunnel probe does not apply — the GUI menu text stays the primary judge, and the exit-IP probe (curl) may not reflect the browser proxy state.
  • Teardown latency: after Toggle OFF the tunnel process exits ~10 s later than the UI flips; the script's 30 s polling window covers it.
  • Toggle, not quit: quit app also disconnects but drops the GUI session; the script uses Toggle so the app keeps running and a later on reconnects without relaunching.
  • Menu drift after updates: macOS or Astrill major updates may rename menus. When Menu or Toggle ON/OFF disappears, re-probe with osascript -e 'tell application "System Events" to tell process "Astrill" to get name of every menu of menu bar 1' and update the script accordingly.
  • Bash pitfall when editing the script: after a $var, a CJK/full-width character makes bash merge the following UTF-8 bytes into the variable name (set -u then reports unbound variable). Always write ${var}.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.