agentleFS
wmy2981wmy2981/skills/wake-on-lan/SKILL.md

wake-on-lan

Skill1 starsChanged 4 months agoMITView on GitHub

Remote wake-up computers on a local network via Wake-on-LAN (Magic Packet). Manage host configurations (add, edit, remove, list) and send wake-up signals by host name or MAC address. Triggered whenever the user mentions "开机", "远程开机", "唤醒主机", "wake on lan", "WOL", "远程唤醒", "帮我把XX电脑打开", "服务器关了帮我开一下", "把电脑开着", or asks to start a computer on the local network. Also use for managing wake-up host lists.

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the user's requested command directly without pre-checking dependencies, environment variables, or configuration.

    line 20
  2. Distinctive:

    All output is JSON:

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Wake on LAN

Send Magic Packets via UDP broadcast to wake up WoL-compatible computers on the local network. Manage host configurations through the script — no manual YAML editing needed.

Execution Rule

Run the user's requested command directly without pre-checking dependencies, environment variables, or configuration. If something is wrong, the script will fail with a clear error — check and fix only then.

Environment Variables

VariableRequiredDescription
WOL_CONFIG_PATH❌Custom path to hosts.yaml (default: ~/.wmyskills/wake-on-lan/hosts.yaml)

The script loads these from ~/.wmyskills/.env (shared across skills) automatically; a scripts/.env in the script directory takes priority if present. Use scripts/.env.example as the template — add the variables to ~/.wmyskills/.env, never overwriting an existing file.

Requirements

pip install pyyaml python-dotenv

Usage

Script: scripts/wol.py

Manage Hosts

# List all configured hosts
python scripts/wol.py list

# Add a host
python scripts/wol.py add my-pc AA:BB:CC:DD:EE:FF --ip 192.168.1.100

# Edit a host's fields
python scripts/wol.py edit my-pc --mac 00:11:22:33:44:55 --ip 192.168.1.10

# Remove a host
python scripts/wol.py remove my-pc

Wake a Host

# Wake by name (from host list)
python scripts/wol.py wake my-pc

# Wake with more packets (improves reliability on lossy networks)
python scripts/wol.py wake my-pc --count 5

# Wake by raw MAC address (no config needed)
python scripts/wol.py wake-mac AA:BB:CC:DD:EE:FF

# Wake by MAC with custom broadcast
python scripts/wol.py wake-mac AA:BB:CC:DD:EE:FF --broadcast 192.168.1.255 --port 9

Add Command Options

FlagDescription
--ip IPIP address (for display/reference)
--broadcast BCBroadcast address (default: 255.255.255.255)
--port PORTUDP port (default: 9)
--count NNumber of magic packets to send (default: 3)

Wake / Wake-MAC Options

FlagDescription
--broadcast BCOverride broadcast address
--port PORTOverride UDP port (default: 9)
--count NNumber of packets to send (default: 3; higher counts improve reliability)

Edit Options

FlagDescription
--new-name NAMERename the host
--mac MACChange MAC address
--ip IPChange IP address
--broadcast BCChange broadcast address
--port PORTChange UDP port
--count NChange packet count

Output Format

All output is JSON:

{"success": true, "host": "my-pc", "mac": "AA:BB:CC:DD:EE:FF", "broadcast": "255.255.255.255", "port": 9, "packets_sent": 3, "message": "Magic packet sent to AA:BB:CC:DD:EE:FF (3x via 255.255.255.255:9)"}

On failure:

{"success": false, "error": "Host 'xyz' not found", "available_hosts": ["my-pc", "my-server"]}

Notes

  • The target computer's network adapter and motherboard must support WoL and have it enabled in BIOS/UEFI.
  • Magic Packet is a UDP broadcast — it stays within the local subnet. Cross-subnet WoL requires directed broadcast or relay configuration.
  • Host configurations are stored in ~/.wmyskills/wake-on-lan/hosts.yaml by default. The script auto-creates this file on first run.
  • Dependencies: Python 3.8+, pyyaml. Standard library sockets used for packet construction.

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.