optimize-network

optimize-network is a skill for Claude Code from majiayu000/spellbook. It costs 132 tokens per session (2,634 once invoked), scanned B, original, MIT.

A read-only process for finding causes of slow or unstable local network connections. It covers latency, jitter, packet loss, DNS, Wi-Fi, Ethernet, and bufferbloat, which is delay caused by overloaded network queues.

In plain words
What is it for?
Use it to diagnose slow Wi-Fi or internet access, test latency and stability, compare DNS or network setups, and verify whether a change helped.
Why use it?
It helps identify whether the problem is wireless access, name lookup, routing, or overloaded queues before changing settings. Any experiments are intended to be small and reversible.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Codex.

Good fit Use it to diagnose slow Wi-Fi or internet access, test latency and stability, compare DNS or network setups, and verify whether a change helped.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/optimize-network
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add majiayu000/spellbook --skill optimize-network
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for optimize-network

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/optimize-network/github.svg)](https://agentmods.dev/skills/majiayu000/spellbook/optimize-network)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/optimize-network"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/optimize-network/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for optimize-network

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/optimize-network"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/optimize-network.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,634 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 23
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 165
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 167
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 174
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 178
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00132 $0.02634
Opus 5 $0.00066 $0.01317
Sonnet 5 $0.00026 $0.00527
Haiku 4.5 $0.00013 $0.00263

Measured 8d ago against content hash 98d7ebd9bc60, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

optimize-network scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/macos_network_snapshot.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo ifconfig awdl0 down

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Candidate examples for China mainland networks: `223.5.5.5`, `119.29.29.29`, `114.114.114.114`. Test by setting, flushing cache, repeating `dig` and `curl -w`, then keep only if it clearly improves results. Roll back wit
skills/optimize-network/SKILL.md · 276 lines

How it starts

The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 276 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 276 lines · 132 tokens per session scan B 98d7ebd9bc60

Subscribe to this mod's changes

optimize-network is a skill published in the GitHub repository majiayu000/spellbook (278 stars, last pushed today), licensed MIT. It adds 132 tokens to every session and 2,634 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.