About wake-on-lan
wake-on-lan is a command-line skill for sending UDP Magic Packets to WoL-compatible computers on a local network. It also manages saved host settings and returns results as JSON.
Key features
- 01Wake hosts with UDP Magic Packets
- 02Add, edit, and list host configurations
- 03Wake directly by MAC address
- 04Set broadcast, port, and packet count
- 05Return results as JSON
Use cases
- 01Wake a configured computer by its host name
- 02Wake a computer using only its MAC address
- 03Adjust packet count for a lossy network
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ wmy2981/ skills --skill wake-on-lanAfter installing, type/wake-on-lanin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
.claude-plugin/plugin.jsonscripts/.env.examplewol.pyDetails
From the project READMEWake 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
| Variable | Required | Description |
|---|---|---|
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
| Flag | Description |
|---|---|
--ip IP | IP address (for display/reference) |
--broadcast BC | Broadcast address (default: 255.255.255.255) |
--port PORT | UDP port (default: 9) |
--count N | Number of magic packets to send (default: 3) |
Wake / Wake-MAC Options
| Flag | Description |
|---|---|
--broadcast BC | Override broadcast address |
--port PORT | Override UDP port (default: 9) |
--count N | Number of packets to send (default: 3; higher counts improve reliability) |
Edit Options
| Flag | Description |
|---|---|
--new-name NAME | Rename the host |
--mac MAC | Change MAC address |
--ip IP | Change IP address |
--broadcast BC | Change broadcast address |
--port PORT | Change UDP port |
--count N | Change 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.yamlby default. The script auto-creates this file on first run. - Dependencies: Python 3.8+,
pyyaml. Standard library sockets used for packet construction.