pc

PC: Implements scheduled wake-on-LAN using magic packets, executes shutdown remotely via SSH, and supports custom workday scheduling policies.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "pc" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-d4c5dca32353e922bf108055d2c18ccdc98cef040acb019e32954ec583155ee5. Verify the upstream source and version against https://skillhub.cn/skills/user_9355e276/shdskill183 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

PC: Implements scheduled wake-on-LAN using magic packets, executes shutdown remotely via SSH, and supports custom workday scheduling policies.

0 Downloads

Introduction source: third_party · user_9355e276 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: PC定时开关机
description: 通过WOL魔术包实现定时开机,通过SSH远程执行关机命令,支持自定义工作日定时策略
version: 1.0.0
author: YourName
tags: [pc, power, schedule, wol, ssh]

# 定时触发器(Cron 表达式)
triggers:
  - id: boot_workday
    type: cron
    cron: "0 8 * * 1-5"          # 周一至周五 08:00 开机
    action: power_on
  - id: shutdown_workday
    type: cron
    cron: "0 18 * * 1-5"         # 周一至周五 18:00 关机
    action: power_off

# 技能所需参数(用户需在界面填写或通过环境变量注入)
params:
  - name: mac_address
    type: string
    required: true
    description: 目标电脑的 MAC 地址(格式:AA:BB:CC:DD:EE:FF)
    example: "00:1A:2B:3C:4D:5E"
  - name: broadcast_ip
    type: string
    required: false
    default: "192.168.1.255"
    description: 子网广播 IP 地址
  - name: host_ip
    type: string
    required: true
    description: 目标电脑的局域网 IP(用于 SSH 连接)
    example: "192.168.1.100"
  - name: ssh_username
    type: string
    required: true
    description: SSH 登录用户名(需具有关机权限)
  - name: ssh_password
    type: string
    required: true
    secret: true                  # 标记为敏感字段,平台会加密存储
    description: SSH 登录密码
  - name: ssh_port
    type: integer
    required: false
    default: 22
    description: SSH 端口号

# 执行器配置(引用同目录下的 Python 脚本)
executor:
  type: python
  script: pc_power_script.py
  entry_point: main
  args_mapping:
    power_on:
      - "--action"
      - "power_on"
      - "--mac"
      - "{{mac_address}}"
      - "--broadcast"
      - "{{broadcast_ip}}"
    power_off:
      - "--action"
      - "power_off"
      - "--host"
      - "{{host_ip}}"
      - "--username"
      - "{{ssh_username}}"
      - "--password"
      - "{{ssh_password}}"
      - "--port"
      - "{{ssh_port}}"

PC 定时开关机技能

功能说明

  • 定时开机:通过发送 Wake‑on‑LAN 魔术包唤醒目标电脑(需主板和网卡支持 WOL)。
  • 定时关机:通过 SSH 连接到目标电脑并执行关机命令(支持 Windows / Linux)。

使用前提

  1. 目标电脑:
    • 已开启 WOL 功能(BIOS 及网卡设置)。
    • 已开启 SSH 服务(Windows 需安装 OpenSSH Server,Linux 默认或手动开启)。
    • 若使用 Linux 且关机需 sudo,请配置 sudoers 允许无密码执行 shutdown。
  2. 执行环境(Skill Hub 运行端):
    • Python 3.6+ 已安装 wakeonlan 和 paramiko 库(若缺失,脚本会自动提示安装)。
    • 与目标电脑处于同一局域网(WOL 依赖广播)。

参数配置说明

上传技能后,在 Skill Hub 界面填写以下参数(敏感信息如密码会被加密存储):

参数名 必填 说明
mac_address ✅ 目标电脑的 MAC 地址
broadcast_ip ❌ 广播 IP,通常为子网末位 .255
host_ip ✅ 目标电脑的局域网 IP
ssh_username ✅ SSH 用户名
ssh_password ✅ SSH 密码(加密)
ssh_port ❌ SSH 端口,默认 22

自定义定时规则

如需修改开关机时间,请编辑 SKILL.md 中 triggers 下的 cron 表达式:

  • 开机触发器 ID boot_workday:0 8 * * 1-5(工作日 8:00)
  • 关机触发器 ID shutdown_workday:0 18 * * 1-5(工作日 18:00)

更多 Cron 语法参考 crontab.guru。

测试方法

您可以在 Skill Hub 中手动触发动作(若平台支持),或使用命令行测试脚本:


# 测试开机
python pc_power_script.py --action power_on --mac AA:BB:CC:DD:EE:FF --broadcast 192.168.1.255

# 测试关机
python pc_power_script.py --action power_off --host 192.168.1.100 --username yourname --password yourpass

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value65/100

Highlights

  • 通过 WOL 和 SSH 实现 PC 定时开关机,满足远程电源管理需求
  • 支持自定义工作日定时策略,提升办公/家庭自动化效率
Trigger Precision85/100

Highlights

  • 触发词精准完整,覆盖 WOL 开机、SSH 关机、自定义策略等核心功能
Structure and Standards90/100

Highlights

  • 结构清晰,包含功能说明、使用前提、参数配置、自定义规则和测试方法
  • 提供端到端命令行测试示例,frontmatter 完整
Execution Reliability75/100

Areas to improve

  • 不可逆操作缺少显式确认机制 Reported severity: Minor

    关机操作通过 SSH 执行,但未在 Skill 层面提供显式确认机制(依赖平台调度,非交互式场景)

    Recommendation: 建议在文档中明确说明关机操作由平台定时触发,用户需确保参数正确以避免误操作

Highlights

  • 工具来源明确(wakeonlan、paramiko),参数映射正确
  • 脚本会自动提示安装缺失依赖,提升执行成功率
Evidence Verifiability (mean of the first four)79/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • crontab.guru

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.