# Send PowerShell Reliable Execution to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "powershell-reliable",
    "name": "PowerShell Reliable Execution",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Dalomeve/powershell-reliable",
    "canonicalUrl": "https://clawhub.ai/Dalomeve/powershell-reliable",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/powershell-reliable",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=powershell-reliable",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "references/privacy-checklist.md",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "powershell-reliable",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T08:39:31.875Z",
      "expiresAt": "2026-05-14T08:39:31.875Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=powershell-reliable",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=powershell-reliable",
        "contentDisposition": "attachment; filename=\"powershell-reliable-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "powershell-reliable"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/powershell-reliable"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/powershell-reliable",
    "downloadUrl": "https://openagent3.xyz/downloads/powershell-reliable",
    "agentUrl": "https://openagent3.xyz/skills/powershell-reliable/agent",
    "manifestUrl": "https://openagent3.xyz/skills/powershell-reliable/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/powershell-reliable/agent.md"
  }
}
```
## Documentation

### 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:

IssueBashPowerShellSolutionCommand chainingcmd1 && cmd2cmd1 -ErrorAction Stop; if ($?) { cmd2 }Use semicolons + error handlingParameter parsing-arg value-Argument value (case-insensitive)Use full parameter namesPath separators/\\ (or / in some cmdlets)Use Join-PathOutput redirection> >>> >> (encoding issues)Use Out-File -Encoding UTF8Environment vars$VAR$env:VARUse $env: prefix

### 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\\name\\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"
}

### 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:

CriteriaVerificationNo && chainingSelect-String '&&' script.ps1 returns nothingError handling present\`Select-String 'tryPaths use Join-Path\`Select-String 'Join-PathOutput encoding specifiedSelect-String 'Out-File.*Encoding' script.ps1 matchesCheckpoint for long opsCheckpoint file pattern present for ops > 60sNo hardcoded secrets\`Select-String 'password

### Common Cmdlet Mappings

TaskBashPowerShellList filesls -laGet-ChildItem -ForceChange dircd /pathSet-Location C:\\pathCreate dirmkdir xNew-Item -ItemType Directory xCopy filecp a bCopy-Item a bMove filemv a bMove-Item a bDeleterm xRemove-Item xView filecat xGet-Content xEdit filevim xnotepad xFind textgrep xSelect-String xPipe|| (same)Redirect>> (use Out-File)

### Splatting Template

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

### References

references/privacy-checklist.md - Privacy security checklist
Microsoft Docs: PowerShell Best Practices

Execute reliably. Recover gracefully.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Dalomeve
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T08:39:31.875Z
- Expires at: 2026-05-14T08:39:31.875Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/powershell-reliable)
- [Send to Agent page](https://openagent3.xyz/skills/powershell-reliable/agent)
- [JSON manifest](https://openagent3.xyz/skills/powershell-reliable/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/powershell-reliable/agent.md)
- [Download page](https://openagent3.xyz/downloads/powershell-reliable)