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.
In this repository79 other files it gives its agents.
- AGENTS.mdAGENTS.md
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-bulk-archive-changeSkill
- openspec-continue-changeSkill
- openspec-exploreSkill
- openspec-ff-changeSkill
- openspec-new-changeSkill
- openspec-onboardSkill
- openspec-sync-specsSkill
- openspec-verify-changeSkill
- ai-proxy-disciplineSkill
- analysis-coreSkill
- android-webview-debugSkill
- article-writerSkill
- brainstorm-workflowSkill
- browser-debug-toolkitSkill
- clarifying-question-disciplineSkill
- code-design-reviewSkill
- competitive-researchSkill
- completion-evidence-disciplineSkill
- context-budget-disciplineSkill
- decision-fog-disciplineSkill
- delivery-disciplineSkill
- design-approval-gateSkill
- domain-language-disciplineSkill
- effective-web-researchSkill
- essence-diagnosisSkill
- evolution-reviewSkill
- explain-clearlySkill
- feature-branch-closeoutSkill
- figma-pixel-implementSkill
- figma-pixel-verifySkill
- git-branch-protectSkill
- git-commitSkill
- git-conflict-resolveSkill
- git-release-finishSkill
- git-release-startSkill
- git-worktree-disciplineSkill
- goal-driven-queueSkill
- goal-driven-workflowSkill
- go-deploySkill
- hybrid-debugSkill
- intake-interview-disciplineSkill
- jira-fix-queueSkill
- jira-fix-workflowSkill
- jira-readSkill
- jira-status-lifecycleSkill
- jira-status-writebackSkill
- jira-wiki-markupSkill
- known-issue-researchSkill
- learn-and-improveSkill
- merge-disciplineSkill
- multi-agent-debateSkill
- node-version-disciplineSkill
- opsx-jira-fix-queueSkill
- opsx-jira-fix-workflowSkill
- opsx-solve-workflowSkill
- opsx-workspace-gateSkill
- perf-optimize-workflowSkill
- The first 60 shown.
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
- Very specific: line 14
Run the bundled script from this skill's base directory (the directory containing this SKILL.md):
- Distinctive: line 42
Teardown latency: after Toggle OFF the tunnel process exits ~10 s later than the UI flips.
- Very specific: line 45
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 …
≈ “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.
Files
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/OFFcan 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
| Signal | How collected | Meaning |
| App process | pgrep -x astrill | prerequisite for GUI control; kept alive after off so on reconnects faster |
| VPN tunnel | pgrep -x asovpnc | primary judge under OpenVPN mode; teardown takes ~10 s (script polls through it) |
| GUI menu | System Events reads items of the Menu menu | Toggle OFF present = connected; Toggle ON present = disconnected |
| Exit IP | curl --max-time 6 ipinfo.io/ip | cross-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
asovpnctunnel 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 appalso disconnects but drops the GUI session; the script uses Toggle so the app keeps running and a lateronreconnects without relaunching. - Menu drift after updates: macOS or Astrill major updates may rename menus. When
MenuorToggle ON/OFFdisappears, re-probe withosascript -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 -uthen reports unbound variable). Always write${var}.
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
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.

