QClaw Restart

v1.0.4

Prompt user to confirm before restarting QClaw by closing all its processes, waiting 5 seconds, then relaunching via its desktop or Start Menu shortcut.

0· 173·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for chenguangwu/qclaw-restart.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "QClaw Restart" (chenguangwu/qclaw-restart) from ClawHub.
Skill page: https://clawhub.ai/chenguangwu/qclaw-restart
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install qclaw-restart

ClawHub CLI

Package manager switcher

npx clawhub@latest install qclaw-restart
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (restart QClaw) match the SKILL.md: it locates running QClaw processes, closes them, waits, and relaunches. No unrelated credentials, binaries, or installs are requested.
Instruction Scope
The runtime instructions create and execute a PowerShell script in the agent workspace and operate on local processes. This is expected for a restart helper, but the agent will write a file to <workspace> and run it with ExecutionPolicy Bypass — the script contents should be reviewed before execution. The script also force-stops processes if they don't close, which may cause data loss; this is documented in the SKILL.md.
Install Mechanism
No install spec or external downloads; instruction-only skill (lowest install risk).
Credentials
No environment variables, credentials, or config paths are requested. The script reads only $env:OS (to check Windows) and queries running processes, which is proportional to the task.
Persistence & Privilege
The skill does write a restart script into the agent <workspace> (its own working area) if missing, but it does not request permanent 'always' inclusion or modify other skills. Writing a file to workspace is normal but worth noting.
Assessment
This skill appears to do what it says, but review before allowing it to run: (1) Confirm the agent always asks you for explicit confirmation before restarting (SKILL.md requires this). (2) Inspect the generated <workspace>/restart-qclaw.ps1 file before execution — the script runs with PowerShell ExecutionPolicy Bypass, which lets it execute without usual restrictions. (3) Be aware it will force-stop QClaw processes that don't close, which can lose unsaved work. (4) Ensure the process name "QClaw" uniquely identifies the intended application so the script doesn't affect other programs. (5) Only use on Windows as documented.

Like a lobster shell, security has layers — review code before you run it.

latestvk973z8x6tyvegr0f3b9xz96wy583652y
173downloads
0stars
5versions
Updated 1mo ago
v1.0.4
MIT-0

QClaw Restart Skill

重启 QClaw 应用程序。

⚠️ 仅限 Windows 系统使用

使用场景

  • 用户要求重启 QClaw
  • 用户说"重启一下"、"重启你自己"
  • 配置修改后需要重启生效

重要规则

重启前必须先询问用户确认!

不要直接执行重启,先询问:

"确定要重启 QClaw 吗?重启后配置变更将生效。"

等待用户确认后再执行。

重启脚本

脚本路径: <workspace>/restart-qclaw.ps1(workspace 为 OpenClaw 工作目录)

如果脚本不存在,根据下方脚本内容自动创建。

执行命令:

powershell -ExecutionPolicy Bypass -File "<workspace>\restart-qclaw.ps1"

脚本内容

# QClaw 重启脚本 - 仅限 Windows 系统

# 检查操作系统
if ($env:OS -ne "Windows_NT") {
    Write-Host "ERROR: This script only supports Windows."
    exit 1
}

# 从当前运行的 QClaw 进程获取路径
$proc = Get-Process -Name "QClaw" -ErrorAction SilentlyContinue | Select-Object -First 1
if (-not $proc -or -not $proc.Path) {
    Write-Host "ERROR: QClaw is not running."
    exit 1
}

$qclawExe = $proc.Path
Write-Host "QClaw path: $qclawExe"

# 优雅关闭 QClaw
Write-Host "[1/4] Closing QClaw gracefully..."
$qclawProcs = Get-Process -Name "QClaw" -ErrorAction SilentlyContinue
foreach ($p in $qclawProcs) {
    try {
        $p.CloseMainWindow() | Out-Null
    } catch {}
}

# 等待 3 秒让进程正常关闭
Start-Sleep -Seconds 3

# 检查是否已关闭,未关闭则强制终止
$stillRunning = Get-Process -Name "QClaw" -ErrorAction SilentlyContinue
if ($stillRunning) {
    Write-Host "Force stopping remaining processes..."
    $stillRunning | Stop-Process -Force
}

Write-Host "[2/4] Waiting 5 seconds..."
Start-Sleep -Seconds 5

# 使用 explorer 启动 QClaw
Start-Process "explorer.exe" -ArgumentList "`"$qclawExe`""
Write-Host "[3/4] QClaw started via explorer"

Start-Sleep -Seconds 5
$running = Get-Process -Name "QClaw" -ErrorAction SilentlyContinue
if ($running) {
    Write-Host "[4/4] SUCCESS: QClaw running with $($running.Count) processes"
} else {
    Write-Host "[4/4] FAILED: QClaw not running"
}

注意事项

  • 仅限 Windows 系统使用
  • 通过当前运行的 QClaw 进程获取路径(无需硬编码路径)
  • 使用 CloseMainWindow() 优雅关闭进程,避免强制终止导致数据丢失
  • 仅在进程未响应时才会强制终止
  • 使用 explorer.exe 启动(模拟双击效果)
  • QClaw 必须在运行才能执行重启
  • 重启后当前会话会中断

Comments

Loading comments...