Token导航 LogoToken导航TokenDH.com
研究检索可写文件clawhub未标认证来源可访问clear审计通过

powershell-reliablepowershell 可靠

Agent Skill

powershell-reliable 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

22,558

周安装

969

GitHub Stars

公开资料未说明

下载量

7,907
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:powershell-reliable(powershell 可靠)
来源仓库:https://github.com/dalomeve/powershell-reliable
安装命令:
openclaw skills install powershell-reliable
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install powershell-reliable

简介

在 Windows 上可靠地执行 PowerShell 命令。避免&&,处理参数解析,中断恢复,保证跨会话连续性。

SKILL.md

name
powershell-reliable
description
Execute PowerShell commands reliably on Windows. Avoid &&, handle parameter parsing, recover from interruptions, and ensure cross-session continuity.

PowerShell Reliable Execution

Execute commands reliably on Windows PowerShell. Avoid common pitfalls like && chaining, parameter swallowing, and session interruptions.

Problem Statement

Windows PowerShell differs from bash in critical ways:

IssueBashPowerShellSolution
Command chainingcmd1 && cmd2cmd1 -ErrorAction Stop; if ($?) { cmd2 }Use semicolons + error handling
Parameter parsing-arg value-Argument value (case-insensitive)Use full parameter names
Path separators/\ (or / in some cmdlets)Use Join-Path
Output redirection> >>> >> (encoding issues)Use Out-File -Encoding UTF8
Environment vars$VAR$env:VARUse $env: prefix

Core Patterns

1. Safe Command Chaining

Wrong:

mkdir test && cd test && echo done

Right:

$ErrorActionPreference = 'Stop'
try {
    New-Item -ItemType Directory -Path test -Force
    Set-Location test
    Write-Host 'done'
} catch {
    Write-Error "Failed: $_"
    exit 1
}

2. Parameter Safety

Wrong:

git commit -m "message"

Right:

git commit -Message "message"
# Or use splatting:
$params = @{ Message = "message" }
git commit @params

3. Path Handling

Wrong:

$path = "C:/Users/name/file.txt"

Right:

$path = Join-Path $env:USERPROFILE "file.txt"
# Or use literal paths:
$path = 'C:\Users\
ame\file.txt'

4. Output Encoding

Wrong:

echo "text" > file.txt

Right:

"text" | Out-File -FilePath file.txt -Encoding UTF8

5. Session Continuity

For long-running commands:

# Start background job
$job = Start-Job -ScriptBlock {
    param($arg)
    # Long operation
} -ArgumentList $arg

# Wait with timeout
Wait-Job $job -Timeout 300

# Get results
if ($job.State -eq 'Completed') {
    Receive-Job $job
} else {
    Stop-Job $job
    Write-Warning "Job timed out"
}

Error Recovery

Retry Pattern

function Invoke-Retry {
    param(
        [scriptblock]$Command,
        [int]$MaxAttempts = 3,
        [int]$DelaySeconds = 2
    )
    
    $attempt = 0
    while ($attempt -lt $MaxAttempts) {
        try {
            $attempt++
            return & $Command
        } catch {
            if ($attempt -eq $MaxAttempts) { throw }
            Start-Sleep -Seconds $DelaySeconds
        }
    }
}

# Usage
Invoke-Retry -Command { Invoke-WebRequest -Uri $url } -MaxAttempts 3

Interruption Recovery

# Checkpoint pattern
$checkpointFile = ".checkpoint.json"

if (Test-Path $checkpointFile) {
    $state = Get-Content $checkpointFile | ConvertFrom-Json
    Write-Host "Resuming from step $($state.step)"
} else {
    $state = @{ step = 0 }
}

switch ($state.step) {
    0 { 
        # Step 1
        $state.step = 1
        $state | ConvertTo-Json | Out-File $checkpointFile
    }
    1 {
        # Step 2
        Remove-Item $checkpointFile
    }
}

Privacy Security

All execution is local:

  • NO command logging to external services
  • NO credential capture in scripts
  • NO automatic upload of execution results
  • Sensitive data handled via [SecureString]
  • Checkpoint files stored in working directory only

Sensitive Data Filter: Before writing any checkpoint or log:

  • Exclude Password, Token, Secret, ApiKey
  • Use [SecureString] for credentials
  • Never echo sensitive variables

Executable Completion Criteria

A PowerShell command execution is reliable if and only if:

CriteriaVerification
No && chainingSelect-String '&&' script.ps1 returns nothing
Error handling present`Select-String 'trycatchErrorAction' script.ps1` matches
Paths use Join-Path`Select-String 'Join-Path\\$env:' script.ps1` matches
Output encoding specifiedSelect-String 'Out-File.*Encoding' script.ps1 matches
Checkpoint for long opsCheckpoint file pattern present for ops > 60s
No hardcoded secrets`Select-String 'passwordtokensecret' script.ps1` returns nothing

Quick Reference

Common Cmdlet Mappings

TaskBashPowerShell
List filesls -laGet-ChildItem -Force
Change dircd /pathSet-Location C:\path
Create dirmkdir xNew-Item -ItemType Directory x
Copy filecp a bCopy-Item a b
Move filemv a bMove-Item a b
Deleterm xRemove-Item x
View filecat xGet-Content x
Edit filevim xnotepad x
Find textgrep xSelect-String x
Pipe`\``\` (same)
Redirect>> (use Out-File)

Splatting Template

$params = @{
    Path = $filePath
    Encoding = 'UTF8'
    Force = $true
}
Set-Content @params

References


Execute reliably. Recover gracefully.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

81.85%
按下载量换算6,472

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills