Skip to content
Development
Skill

/optimize-network

Safely diagnose and improve local network speed, latency, jitter, DNS, Wi-Fi, Ethernet, macOS network services, and bufferbloat. Use this skill whenever the user asks to optimize internet/network speed, make the network faster, diagnose slow Wi-Fi, latency, packet loss, DNS

From plugin
majiayu000-spellbook
277104 skills7 agents2 commands
Install
$ npx -y skills add majiayu000/spellbook --skill optimize-network --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/optimize-network

Context preview

The summary Claude sees to decide when to auto-load this skill.

Safely diagnose and improve local network speed, latency, jitter, DNS, Wi-Fi, Ethernet, macOS network services, and bufferbloat. Use this skill whenever the user asks to optimize internet/network speed, make the network faster, diagnose slow Wi-Fi, latency, packet loss, DNS

SKILL.md

optimize-network.SKILL.md
name: optimize-network
description: Safely diagnose and improve local network speed, latency, jitter, DNS, Wi-Fi, Ethernet, macOS network services, and bufferbloat. Use this skill whenever the user asks to optimize internet/network speed, make the network faster, diagnose slow Wi-Fi, latency, packet loss, DNS delay, unstable Codex/AI tool connectivity, or asks about the viral Codex network optimization workflow. Always protect VPN/proxy tools such as Clash Verge, Mihomo, Shadowrocket, Tailscale, V2Ray, Surge, and corporate VPNs; do not modify or disable them unless the user explicitly asks for that specific change.
allowed-tools: Bash
metadata:
  argument-hint: "[diagnose|optimize|report|skill] [target-domain]"

Optimize Network

Use this skill to run a safe, evidence-first network optimization workflow. The default posture is read-only diagnosis, then small reversible experiments, then before/after verification. Never treat VPN, proxy, TUN, or routing tools as junk processes.

Safety Contract

Follow these rules before any command that could affect connectivity:

  • Intent lock: the goal is speed, latency, responsiveness, and stability, not cleaning network configuration.
  • Proxy/VPN protection: do not stop, restart, unload, delete, reconfigure, or bypass Clash, Mihomo, Shadowrocket, Tailscale, V2Ray, Surge, WireGuard, OpenVPN, corporate VPNs, or their TUN interfaces unless the user explicitly requests that exact operation.
  • Default read-only: diagnostics may run directly; changes require a short proposal with risk, rollback, and expected effect.
  • Reversible first: prefer temporary A/B tests, service reordering, DNS experiments, cache flushes, and user-confirmed app closure over deletion.
  • No silent degradation: if a change breaks access to AI tools, proxy, remote work, DNS, or LAN devices, revert it or report the blocker immediately.
  • No destructive cleanup: do not delete network locations, profiles, VPN configs, proxy configs, launch agents, routes, or firewall rules. If deletion looks useful, propose disable/dry-run first.
  • Sudo caution: any `sudo`, interface down/up, DHCP reset, route change, or network service disable must be confirmed by the user first.
  • Remote session caution: if the user may be connected through SSH, remote desktop, RustDesk, Tailscale, or VPN, ask before any change that could disconnect them.

Routing Decision

Choose one mode and state it briefly:

  • `execute_direct`: read-only diagnosis, report generation, or a user-approved reversible command.
  • `plan_first`: multi-step optimization, DNS change, service-order change, AWDL/AirDrop test, or anything that may affect connectivity.
  • `clarify_first`: OS is unknown, user is remote over the network, proxy/VPN ownership is unclear, or the requested change would modify VPN/proxy/TUN state.

Use these handoff fields in the report: goal, context, constraints, actions, evidence, decision, rollback, next step.

Evidence Hierarchy

Prefer fresh local measurements over assumptions:

1. System route/proxy/DNS state: `scutil --nwi`, `scutil --dns`, `scutil --proxy`, `route -n get default`. 2. Link quality: gateway ping, packet loss, Wi-Fi RSSI/noise/Tx Rate/channel, Ethernet state. 3. Responsiveness: macOS `networkQuality -v` and, when available, `speedtest-cli`. 4. DNS: repeated `dig +tries=1 +time=2 +stats` against relevant domains. 5. Process/network load: `nettop`, `lsof`, Mihomo read-only connections API when present. 6. Before/after comparison from the same commands, same route/proxy state, and close in time.

Do not claim improvement from a single noisy datapoint. Call out variance when results are mixed.

Workflow

1. Preflight

Identify the operating system and active path:

uname -a
sw_vers 2>/dev/null || true
command -v networkQuality || true
command -v speedtest-cli || true
command -v speedtest || true
scutil --nwi 2>/dev/null || true
scutil --proxy 2>/dev/null || true

If macOS is detected, prefer the bundled read-only snapshot helper:

~/.claude/skills/optimize-network/scripts/macos_network_snapshot.sh

Run the bandwidth/responsiveness portion only when the user is ready for a bandwidth-consuming test:

RUN_NETWORKQUALITY=1 ~/.claude/skills/optimize-network/scripts/macos_network_snapshot.sh

If testing from a local Codex skill copy instead of an installed Spellbook copy, use the equivalent path under `~/.agents/skills/optimize-network/scripts/`.

2. Baseline

Record:

  • OS, timestamp, active network service/interface, default gateway, route table summary.
  • Whether tests are direct or proxied. If system proxy/TUN is active, say that throughput and latency measure the proxy path.
  • `networkQuality -v` or `speedtest-cli` download/upload/latency.
  • Gateway ping and at least one regional public ping.
  • DNS servers and `dig` timing for user-relevant domains.
  • Wi-Fi channel, band, RSSI/noise, Tx Rate, and PHY mode when available.
  • Active proxy/VPN processes and read-only connection counts if relevant.

3. Diagnose Top Bottlenecks

Limit the finding list to the most likely 3-4 bottlenecks. Common categories:

  • Local link jitter: gateway ping spikes, Wi-Fi channel contention, AWDL/AirDrop/Handoff scanning, router CPU/load.
  • Bufferbloat: good bandwidth but high loaded latency in `networkQuality`.
  • DNS instability: repeated lookup variance or slow first query for domains the user actually uses.
  • Proxy path mismatch: speed tests or AI tools are routed through slow proxy groups or residential nodes.
  • Service order drift: unused adapters ahead of the active Wi-Fi/Ethernet service.
  • Background traffic: high network throughput from sync, browser, remote desktop, update, or chat apps.
  • MTU/path issues: large ping failure with DF set, packet loss to nearby destinations.

Separate confirmed facts from hypotheses.

4. Safe Optimization Menu

Only apply a change after explaining risk and rollback.

**DNS A/B test**

Use when DNS lookup is repea

Read more
Ships withmajiayu000-spellbook

Cross-runtime skills for Claude Code, Codex, and multi-agent workflows.

Get the whole plugin

Other skills on majiayu000-spellbook.

idea-analogist
Skill

idea-analogist

想法群聊室 — 类比者角色。被 idea-team 主编排器调用,或用户单独说"类比一下"、"别的行业有没有"、"yes-and 扩展"、"X 让你想到什么"、"跨界启示"时触发。**专门做跨界类比 + yes-and 扩展——不评判、不挑刺、不要求事实证据**。Do NOT use when 用户要数据(用…

idea-devils-advocate
Skill

idea-devils-advocate

想法群聊室 — 反方角色。被 idea-team 主编排器调用,或用户单独说"反方意见"、"挑这个想法的刺"、"为什么会失败"、"找漏洞 / 反例"、"devil's advocate"时触发。**专门挑漏洞、找隐藏假设、给反例——不安慰、不"也许可以这样"、不全盘否定**。Do NOT use when…

idea-research
Skill

idea-research

想法群聊室 — 调研员角色。被 idea-team 主编排器调用,或用户单独说"调研一下 X"、"X 的现状/竞品/数据"、"找 2026 数据"、"事实底"时触发。**用 WebSearch 拉真实 2026 数据、列竞品、引来源——只给事实,不评判,不建议**。Do NOT use when…

idea-team
Skill

idea-team

想法群聊室主持人 — 把一句话想法丢给多角色 AI 团队(调研员/反方/类比者)做查漏补缺。每个角色有自己的 voice,他们互相 @ 接话;你随时插话。**这是创意扩展工具,不打分、不否决、不堵路**。Use when 用户说"组个团队聊一下"、"开会讨论这个想法"、"找几个角度看看"、"群聊一下 X"、"team…

idea-to-product
Skill

idea-to-product

端到端产品教练 — 把一句话想法走到 PRD + 可点击 HTML 原型。会顶嘴、强制砍功能、用 Nielsen + Norman 做友好性硬检。Use when user 说"我有一个想法"、"想做一个产品"、"做 MVP"、"写 PRD"、"做用户友好的产品",或调用插件命令…